How to Connect ChatGPT to Slack (Free Bot Template or Zapier, Step by Step)
How to connect ChatGPT to Slack: build a free bot from Slack's official template, or use Zapier. Exact steps, costs and limits, checked 13 October 2026.
Quick answer: The free route is Slack's official sample bot, which talks to ChatGPT models through an OpenAI API key. The no-code route is a Zapier Zap. Free? The Slack template costs nothing to run, but OpenAI API use needs credits. Time: about 20 to 30 minutes.
Slack's Bolt for Python tutorial builds a bot called Bolty that can use OpenAI, Anthropic or Google Cloud Vertex AI. Zapier's guide covers two no-code bots. This page walks through both, then compares them.
What do you need before you start?
You need three things, whichever method you pick.
- A Slack workspace where you can install apps. If you do not have one, Slack's tutorial points to the free Slack Developer Program sandbox, which it says gives access to all Slack features.
- An OpenAI API key. Go to platform.openai.com/api-keys, click +Create a new secret key, then +Create secret key. Zapier's guide warns that the key cannot be viewed a second time, so copy it right away. Slack's tutorial says the OpenAI account needs credits.
- For Method 1 only: Python 3.7 or later, per Slack's tutorial, and a terminal.
A ChatGPT subscription is a different product from the API. The bots here call the API, so they use API credits.
How do you connect ChatGPT to Slack for free? (Method 1: Slack's official sample bot)
Use Slack's sample project. It needs no code changes to switch to OpenAI. The steps below follow Slack's tutorial for macOS and Linux.
- Open a terminal.
- Install the Slack CLI:
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash - Log in:
slack login - Create the project:
slack create ai-chatbot --template slack-samples/bolt-python-ai-chatbot - Move into the new folder:
cd ai-chatbot - Add your key. Replace the placeholder with your own key:
export OPENAI_API_KEY=<your-api-key>
- Create a virtual environment and activate it:
python3 -m venv .venvthensource .venv/bin/activate. On Windows usepy -m venv .venvthen.venv\Scripts\activate. - Install the requirements:
pip install -r requirements.txt - Start the bot:
slack run. A successful start prints "Bolt app is running!" - In Slack, open the bot's app page and go to its App Home. Pick OpenAI from the provider drop-down. The drop-down lists only providers whose keys you have set.
- Type
/ask-boltyfollowed by your question in a channel, or open the Messages tab on the app page and chat directly.
If Bolty does not appear under Apps, mention @Bolty in a public channel first, as Slack's tutorial advises.
Prefer to set up the Slack app by hand?
The sample repository (MIT licence) offers a manual path. It needs two tokens:
- Go to api.slack.com/apps/new and choose From an app manifest, then pick your workspace.
- Paste the repository's
manifest.jsoninto the JSON tab, click Next, then Create. - Click Install to Workspace, then Allow.
- Copy the Bot User OAuth Token from OAuth & Permissions. This is
SLACK_BOT_TOKEN. - Under Basic Information > App-Level Tokens, create a token with the
connections:writescope. This isSLACK_APP_TOKEN. - Export both tokens and
OPENAI_API_KEY, create a virtual environment, runpip install -r requirements.txt, thenpython3 app.py.
The manifest turns on Socket Mode, so you do not need a public web address. It requests 15 bot scopes, including chat:write, commands, channels:history and im:history. Read them before you click Allow.
How do you connect ChatGPT to Slack without code? (Method 2: Zapier)
Zapier connects Slack to ChatGPT through forms in your browser. Zapier's guide describes two bots, last updated in November 2025.
Bot A: reply to every message in one channel
- Open the Zap editor.
- For the trigger, choose Slack and the event New Message Posted to Channel. Connect your account and pick the channel.
- Click Test trigger, then Continue with selected record.
- For the action, choose ChatGPT and the event Conversation.
- Connect your account. Paste your API key and click Yes, Continue to ChatGPT (OpenAI).
- Pick a model. In the User Message field, map the Slack message text and add your instructions for the bot.
- Test the step, then click the + button below it.
- Add a second action: Slack, event Send Channel Message. Select the same channel.
- In Message Text, choose Full Response from the data drop-down.
- Optional: in the Thread field, set the parent message's timestamp (Ts) so replies stay in a thread. Zapier recommends this.
- Click Continue, then Test action.
Bot B: a slash command that works in any channel
- Go to api.slack.com/apps, click Create an App, and build from scratch.
- Under Features, click Slash Commands, then Create New Command. Enter the command, a description and a usage hint.
- In a new tab, create a Zap with Webhooks by Zapier as the trigger app and Catch Hook as the event.
- Click Continue twice to reach the Test tab and copy the webhook URL.
- Paste that URL into the slash command's Request URL field. Save, then install the app into your workspace.
- Type your command plus a prompt in Slack. Back in Zapier, click Test Trigger.
- Add the action ChatGPT > Conversation. In the Message field, insert the Text value.
- Add a final action: Slack > Send Channel Message. Click the kebab menu (three dots) next to Channel, choose Custom, and map the channel from the trigger so the reply lands where you typed the command.
Which method should you choose?
Pick Method 2 if you want browser-only setup and accept a monthly fee. Pick Method 1 if you are comfortable with a terminal and want fewer moving parts.
| Method | Cost | Difficulty | Limits | Best for |
|---|---|---|---|---|
| 1. Slack sample bot | Free to run; OpenAI API credits for usage | Medium (terminal) | Your computer must stay on while the bot runs; not usable in threads | Developers and tinkerers |
| 2A. Zapier reply bot | Zapier plan plus OpenAI API credits | Easy | Free plan is two-step Zaps only (this Zap has three steps) | Answering every message in one channel |
| 2B. Zapier slash command | Paid Zapier plan plus OpenAI API credits | Medium | Needs your own Slack app and webhooks | Asking the bot from any channel |
What's free and what costs money?
As of 13 October 2026, Zapier's pricing page says Free includes 100 tasks per month. It lists Free as two-step Zaps only, with no premium apps or webhooks. Professional starts at $19.99 a month billed annually (750 tasks) or $29.99 billed monthly, with a 14-day trial that needs no credit card.
Bot A has a trigger and two actions, which is three steps. Bot B uses Webhooks by Zapier. On Zapier's published limits, both therefore point to a paid plan. That is our reading of the pricing page, so check it against your account.
The Slack sample bot is MIT-licensed and free to run. The only cost is OpenAI API usage. Slack's tutorial states that you need an account with credits, and API billing is separate from any ChatGPT subscription.
What can go wrong, and how do you fix it?
operation_timeoutafter a slash command. Slack requires an acknowledgment within 3000 milliseconds, per its slash command docs. Acknowledge first, then answer later usingresponse_url.- The bot does not appear under Apps. Mention @Bolty in a public channel, as the Slack tutorial advises.
- The provider drop-down is empty. Slack's tutorial says it lists only providers whose keys are set. Export
OPENAI_API_KEYin the same terminal where you runslack run. - The command does nothing in a thread. Slack says app slash commands cannot be used in message threads. Type it in the channel, or use the Zapier reply bot with the Thread field.
- Everyone sees your command and the answer. Slack's default response type is ephemeral, meaning only the sender sees it. Setting
response_typetoin_channelposts to the channel and shows the command. - Two commands with one name. Slack says slash commands are not namespaced, and the most recently installed command wins. Choose a distinctive name.
- Lost API key. Zapier warns the key cannot be viewed again. Generate a new one and update the connection.
Is this allowed?
Yes, using Slack's own app framework and the official OpenAI API is allowed. You are building a normal Slack app. Two cautions apply.
- Privacy. Anything people type to the bot goes to OpenAI through your API key. Tell your team, and do not point the bot at channels with confidential data unless your company policy permits it.
- Security. Slack's slash command docs say to verify request signatures. If you write your own endpoint, do it.
You may also have an admin who controls which apps can be installed. If the install step is blocked, ask them.
What's still unclear?
Zapier's guide does not say which plan a given Zap needs, so the plan advice above comes from reading the guide next to the pricing page. Slack's tutorial and the repository README also differ slightly: the tutorial says Bolty does not work in threads, while the README lists mentions in channels and threads. Test in your workspace.
Last checked: 13 October 2026.
For more Slack automations, see How to Send Google Form Responses to Slack.
Frequently asked questions
Can I connect ChatGPT to Slack for free?
Partly. Slack's sample bot is free to run (MIT licence) in a free Slack Developer Program sandbox, but the OpenAI API needs an account with credits, billed separately from any ChatGPT subscription. Zapier's Free plan allows 100 tasks a month and two-step Zaps only, so the bots in this guide need a paid Zapier plan.
Do I need an OpenAI API key?
Yes, for both build methods here. The Slack template reads OPENAI_API_KEY, and Zapier's ChatGPT action asks you to paste a key. Create it at platform.openai.com/api-keys, copy it immediately, and never paste it into a public channel or code you share.
Why does my slash command say operation_timeout?
Slack requires your app to acknowledge a slash command with an HTTP 200 within 3000 milliseconds. A slow AI call will miss that window. Acknowledge first, then send the AI answer afterwards through the response_url Slack provides. The Bolt template and the Zapier webhook flow handle this pattern for you.
Can the bot reply inside a thread?
Slash commands from apps cannot be used in message threads, according to Slack's documentation. Slack's tutorial also says Bolty does not work in threads. With Zapier's reply bot you can set the Thread field to the parent message's timestamp so replies stay in a thread.
Does the bot see every message in my workspace?
No. A bot only receives events for channels it belongs to and the scopes it was granted. Slack's sample manifest lists 15 bot scopes, including channels:history and im:history. Review scopes before installing and invite the bot only to channels where you want it active.
Which method should a non-technical person pick?
Zapier, if a paid plan is acceptable, because every step is a form in a browser. Choose Slack's sample bot if you can paste commands into a terminal and want to avoid a per-task automation fee.
Sources
- AI Chatbot (Bolt for Python tutorial), Slack developer docs (2026-10-13)
- slack-samples/bolt-python-ai-chatbot, GitHub / Slack Samples (2026-10-13)
- bolt-python-ai-chatbot manifest.json, GitHub / Slack Samples (2026-10-13)
- Implementing slash commands, Slack developer docs (2026-10-13)
- How to build a ChatGPT Slack bot, Zapier (2025-11-01)
- Zapier pricing, Zapier (2026-10-13)