Draft social posts from Slack threads with AI
Type socialbot in a public Slack thread and AI drafts a social post from it in your voice. Ask for changes in the same thread.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/draft-social-posts-from-slack-threads-with-ai/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Marketing · Social media marketing
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/draft-social-posts-from-slack-threads-with-ai
Set it up with the CLI
- Add it. Copies the folder into
zaps/draft-social-posts-from-slack-threads-with-ai/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/draft-social-posts-from-slack-threads-with-ai - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy draft-social-posts-from-slack-threads-with-ai - Check it. Its recent runs, with status and errors.
npx zap-pack logs draft-social-posts-from-slack-threads-with-ai
zaps/draft-social-posts-from-slack-threads-with-ai/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 1 to fill in
- connections/ai.tsThe
aiaccount it uses - connections/slack.tsThe
slackaccount it uses - triggers/mention-v2.tsWhat starts it:
slackmention_v2 - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a new message in a public Slack channel contains the word
socialbot(slack,mention_v2). Bot messages are ignored, so the Zap's own replies don't start it again. - Slack gets a short "One sec." reply in the thread, so people know the request was heard.
- Workflow reads the whole thread (up to 50 messages) with Slack's
conversations.repliesand labels the bot's earlier drafts. Attached files are listed by name. - AI by Zapier writes the draft in the user's voice guide, for LinkedIn unless the request names another platform. It opens on the angle a reader would care about and marks a missing fact that would make the post stronger as
[NEED: …]. When the thread already has a draft, it revises the latest one to match the newest request ("shorter", "two versions"). - Slack posts the draft in the thread as the bot. It never posts to a social network. A person copies the draft out.
Ask the user
Each REPLACE_… value is set per person.
| Setting | Where | What goes there |
|---|---|---|
REPLACE_VOICE_GUIDE |
VOICE_GUIDE in config.ts |
How their posts should sound (tone, words to use and avoid), plus two or three past posts they like, pasted in |
The voice guide decides most of the drafts' quality, so ask for real past posts rather than adjectives.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/draft-social-posts-from-slack-threads-with-ai, replace each REPLACE_… value as this file says, then run npx zap-pack deploy draft-social-posts-from-slack-threads-with-ai, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. Either way, name the workflow Draft social posts from Slack threads with AI (zapier.sh/draft-social-posts-from-slack-threads-with-ai): zap-pack takes that name from this file's title, so leave the title as it is, and with Zapier MCP give the workflow that name when you create it. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
slackto the user's Slack connection for the workspace where people will call the bot.aiuses AI by Zapier and needs no account of its own. - Source: publish
workflow.tsandconfig.ts, with theREPLACE_values set to the user's answers.triggers/mention-v2.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect the Slack
channel_messageaction and the AI by Zapierget_completionaction with the user's connections before the first test run, and fix any key inworkflow.tsthat doesn't match. Confirm the mention event's payload haschannel(the channel ID),ts,thread_tsandtext, and map any name that differs.
Test it
Run this sample as a draft test (run_workflow_draft in Zapier MCP) in a test channel the user owns. Post a parent message there first, labelled [install-test], such as "[install-test] We shipped dark mode today. It's live on web for every plan, and the mobile apps get it next month." Then replace the sample channel with the test channel's ID, and ts and thread_ts with that message's timestamp:
{
"ts": "1700000000.000200",
"thread_ts": "1700000000.000200",
"channel": "C0123456789",
"text": "socialbot write a LinkedIn post about this"
}
Confirm that the thread gets "One sec.", then a reply with a post draft in a code block. Then run it again with "text": "socialbot shorter, and give me two versions" and a new ts, and confirm the reply revises the first draft. The user deletes the test messages, not the agent.
Notes
- Change the trigger word in
triggers/mention-v2.tsandBOT_NAMEinconfig.tstogether, so the name people see is the word they type. Slack matches the word inside longer words too, so pick one that doesn't appear in everyday messages. - The model sees file names in the thread but can't open the files. Paste the key text from a screenshot or PDF into the thread when the post depends on it.
- People in any public channel the connected user can see can call the bot. To limit it to some channels, add a filter on the channel in the Zapier editor.
- The draft says only what the thread says and marks gaps, but a person still checks every post before it goes out.