Respond to user mentions in Slack with AI-generated support answers
Each public Slack mention of your support account gets a ChatGPT answer in the same thread, so questions get a timely first reply.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/respond-to-slack-mentions-with-chatgpt-support-answers/
Paste into Claude, ChatGPT, Cursor or any agent.
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/respond-to-slack-mentions-with-chatgpt-support-answers
Set it up with the CLI
- Add it. Copies the folder into
zaps/respond-to-slack-mentions-with-chatgpt-support-answers/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/respond-to-slack-mentions-with-chatgpt-support-answers - 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 respond-to-slack-mentions-with-chatgpt-support-answers - Check it. Its recent runs, with status and errors.
npx zap-pack logs respond-to-slack-mentions-with-chatgpt-support-answers
zaps/respond-to-slack-mentions-with-chatgpt-support-answers/
- 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
- connections/chatgpt.tsThe
chatgptaccount it uses - connections/slack.tsThe
slackaccount it uses - triggers/mention-v2.tsWhat starts it:
slackmention_v21 to fill in - 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 public channel message mentions the support account (
slack,mention_v2). Bot messages are ignored. - Workflow removes the mention from the text, skips mentions with no question, and sends the rest to ChatGPT with a short support prompt.
- ChatGPT writes the answer. The Zap polls for it until it is ready, for up to ten minutes.
- Slack posts the answer in the mention's thread, or starts a thread under a top-level mention.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
REPLACE_SLACK_USER_ID |
user_id in triggers/mention-v2.ts |
The Slack user whose mentions get answers, such as the support account: pick it from the user list on the user's Slack connection (U…) |
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/respond-to-slack-mentions-with-chatgpt-support-answers, replace each REPLACE_… value as this file says, then run npx zap-pack deploy respond-to-slack-mentions-with-chatgpt-support-answers, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. 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 mention the support account, andchatgptto the user's ChatGPT (OpenAI) connection. - Source: publish
workflow.tsandconfig.ts.triggers/mention-v2.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, withREPLACE_SLACK_USER_IDreplaced by the user's answer. 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 ChatGPT
conversation_responses_apiaction and the Slackchannel_messageaction 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,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, with the support account mentioned in it:
{
"ts": "1700000000.000200",
"channel": "C0123456789",
"text": "<@U0123456789> how do I reset my password for the staging portal?",
"user": { "name": "test.user", "real_name": "Test User" }
}
Replace the sample channel with the test channel's ID before running. Confirm that the thread reply contains a short ChatGPT answer about password resets. The user deletes the test message, not the agent.
Notes
- Every public mention opens an answer. To answer only mentions in one channel, add the channel to the trigger's filters in the Zapier editor.
- The reply has no review step, so the system prompt in
config.tsis the only guard on what it says. Read it before publishing. - Mentions inside threads are answered in that thread, so follow-up questions get the same treatment.
- To answer private channel mentions too, set
public_onlytofalsein the trigger.