How do I build a Slack bot that sends memes?
Build a Slack app with a slash command (for example /meme), have your server search a meme source for the query, then post the image to the channel with Slack's chat.postMessage using an image block or attachment. memecub's REST API and remote MCP server at https://memecub.com/mcp give you searchable memes and a keyless trial of 20 searches a day, so you can wire up the bot before paying for anything. Keep the command short, return one meme per call, and let people pick from a few results instead of flooding the channel.
Send when someone keeps hinting at something instead of just asking.
The reply when a teammate drops obvious hints in the channel.
Use when a deploy or task is about to go very wrong.
Post it when someone announces they are quitting the project.
A dry reaction to a giant refactor pull request.
For jokes about new AI keys and tooling on laptops.
A soft goodbye or end-of-day sign-off in the channel.
Send when a new developer-themed product launch lands.
How the bot works
A Slack meme bot is three pieces: a slash command registered in your Slack app, a small web server that receives the command payload, and a meme source that returns an image URL. Slack sends the command to your request URL; your server searches for a meme, then calls chat.postMessage with the channel and an image block pointing at the meme URL.
Slack requires you to verify the request signature and respond within three seconds. If your meme search is slow, acknowledge first and post the meme asynchronously with the response_url Slack gives you.
A minimal slash command example
Register /meme in your Slack app, point it at your server, and handle the payload like this (Node example, using memecub's API for search):
const r = await fetch('https://memecub.com/api/search?q=' + encodeURIComponent(text)); const data = await r.json(); const url = data.results[0].image; await slack.chat.postMessage({ channel, blocks: [{ type: 'image', image_url: url, alt_text: 'meme' }] });
The exact endpoint paths and response fields are in memecub's developer docs; the keyless trial gives you 20 searches a day, and the free plan includes 1000 credits a month with 1 credit per search. If you use an AI agent or Claude Code, install the skill with npx skills add https://memecub.com or connect the MCP server at https://memecub.com/mcp instead of writing the search call yourself.
Tone and etiquette
Post one meme per command and let the person who typed the command choose from two or three options rather than dumping a wall of images. Add a short caption or alt text so the channel stays readable in notifications.
Most memes in public libraries are collected from the web: fine for personal chats, but copyright stays with the original creators, so do not treat them as commercial assets. If your workspace is a company channel used for marketing, filter for openly licensed images (Openverse, open-source emoji, public-domain art) that can be used commercially.
When nothing fits
If search returns nothing good, the AI meme maker at /generate lets you describe a character, action and caption, or start from an existing meme as a reference. It takes about 10 seconds per image and 500 credits each, and it refuses real people, which keeps the bot from generating memes about coworkers.
For long posts, /match takes an article and picks a fitting meme for each paragraph, which is handy if your bot also summarizes threads.
Nothing quite right? Make one
Pick a character, type a caption, get it in about 10 seconds — free to try.
More that fit
FAQ
How do I make a Slack meme bot?
Create a Slack app, add a slash command such as /meme, and run a small server that searches a meme source and posts the result with chat.postMessage. memecub's REST API or MCP server can handle the search side.
How do I add a meme command to my Slack bot?
In the Slack app settings, create a slash command, set its request URL to your server, and parse the text field as the search query. Reply with an image block or attachment containing the meme URL.
How do I post memes into a Slack channel from a bot?
Call chat.postMessage with the channel ID and a block of type image whose image_url points at the meme. The bot needs the chat:write scope and must be invited to the channel.
Can I use memecub memes in a company Slack?
Most memes are collected from the web and are fine for personal chats, but copyright stays with the original creators. For commercial or public-facing channels, use the filter that shows only openly licensed images.
Do I need an API key to try a meme bot?
No. memecub offers a keyless trial of 20 searches a day, so you can test the bot before choosing a plan.