At Zapier, everyone works remotely—so Slack is our central hub for communication. And one of our favorite ways to get even more out of Slack is by connecting it to other tools, like ChatGPT, using Zapier.
By integrating ChatGPT with Slack, you can build AI-powered bots that answer questions, summarize information, and retrieve company data—all without leaving your chat window.
In this post, I’ll show you how to build two kinds:
- 
A ChatGPT reply bot: This bot auto-responds when someone posts a message in a designated Slack channel.
 - 
A ChatGPT slash command bot: This bot auto-responds when someone types a custom command (like
/askchatgpt) in any Slack channel. 
Let’s get into it.
Zapier is the most connected AI orchestration platform—integrating with thousands of apps from partners like Google, Salesforce, and Microsoft. Use interfaces, data tables, and logic to build secure, automated, AI-powered systems for your business-critical workflows across your organization’s technology stack. Learn more.
Skip ahead
Before you build a ChatGPT Slack bot
To build either bot, you’ll need an OpenAI account and an API key.
A note about cost: You can sign up for an OpenAI account for free. But for your API key to work with these bots, you’ll need to enable billing. OpenAI charges based on usage (per token, which is a chunk of text used by the model) each time your bot sends a prompt and gets a response. To check current rates, visit OpenAI’s API pricing page.
If you already have an account for ChatGPT, that means you’ve got an OpenAI account, too. Otherwise, create one here.
Once you’re logged in, head to the API keys page, click +Create a new secret key in the top-right corner, then +Create secret key. A pop-up will display your new key. Be sure to copy it now and save it somewhere because you won’t be able to view the key a second time. (But if you lose it, all good—just generate another.)
Create a ChatGPT reply bot in Slack
With Zapier, you can create automated workflows (we call them Zaps) that send information between apps. You can create a Zap from scratch or use a template to get started fast.
Using a template is easy. Click on the Zap template below, which will take you to the Zap editor. You’ll be prompted to create a Zapier account if you don’t have one already. After that’s done, just follow the setup instructions below.
New to Zapier? It’s workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with thousands of apps to build and automate anything you can imagine. Sign up for free.
Set up your Slack trigger
Time to set up your trigger—the event that starts your Zap.
Choose Slack for your trigger app and New Message Posted to Channel as your action event. If you’re using the Zap template, this will already be selected for you. Then click Select to connect your account. First time doing this? Just click +Connect a new account in the modal that appears, then click Continue.
Next, select the channel where your ChatGPT bot will answer questions. Click the dropdown menu to see the list of channels in your selected Slack account, pick one, then click Continue.
Now click Test trigger. Zapier will find a recently posted message in your chosen channel and use it to set up the rest of your Zap. After you pick a record, click Continue with selected record.

Set up your ChatGPT action
Now let’s set up your action—the event your Zap will perform once it’s triggered.
Choose ChatGPT as your action app and Conversation as your action event. If you’re using the Zap template, this will already be selected for you.
Pro tip: Instead of ChatGPT, you can also use AI by Zapier. It’s our built-in AI tool that comes with a prompt generator, prompt templates, and an improved testing experience—and no API key is required. Learn more in our AI by Zapier feature guide.

Now connect your account. If this is the first time you’ve connected OpenAI to Zapier, you’ll be taken to a window where you enter that API key from earlier. Drop in that key, then click Yes, Continue to ChatGPT (OpenAI).

Click Continue to move on to configuring this step.
Pick the ChatGPT model you’d like to use. Then, in the User Message field, map data from your Slack step, pulling in a sample question posted in your Slack channel of choice. To map data from a previous step, click the + sign in the field or type a forward slash (/).

Finally, give your OpenAI bot some instructions. For the purposes of this tutorial, I’m going to build a content assistant to answer my teammates’ questions about blog content. But you can tailor your instructions to suit any use case.
Click Continue, then test your step. Zapier will pull the response from your bot, according to how you customized your fields. Once your action is working, click the + button below your action step. (If you’re using a template, just click into the next step.)
Set up your Slack action
Now, you’ll set up the final step: sending your ChatGPT response to Slack.
If you’re not using the template, choose Slack for your action app and Send Channel Message for your action event. Again, you’ll be asked to connect your Slack account. In most cases, this will be the same account you connected earlier. When you’re done, click Continue.
Now, set up how the message from your ChatGPT bot will look in Slack and where it’ll be posted. Select the Slack channel from your previous Slack step.

Add any other context you want to the Message Text field, and make sure to pick Full Response from the data dropdown, as that contains your response from ChatGPT.
Pro tip: Slack has its own formatting rules for things like links, bolded text, and block quotes. Get to know them so your bot’s messages look clean and consistent.
You can also customize where the message comes from, such as from a bot or yourself. If you choose a bot, you can customize things like the bot name and the icon that appears next to it.

If you’d like your bot to reply in a thread rather than in your Slack channel (and I recommend this), navigate down to the Thread field. Click in the field and select the timestamp (shown in Zapier as Ts) of the parent message in the dropdown to let Zapier know which message to create a thread for.
Once you’ve customized your message, click Continue, then click Test action. Zapier will post a message in your chosen Slack channel to make sure your Zap is working.
If everything looks good with the message thread that Zapier posted to your question, your Zap is ready to use! If something looks off or your test fails, go back and adjust until your message looks how you’d like it to.

Build a ChatGPT slash command bot
Now you know how to integrate ChatGPT with Slack to reply to particular channel messages. But what if you don’t want to limit yourself to just one channel?
With a slash command bot, you can send prompts from any channel in your Slack account. Here’s how to set it up.
Create your Slack app and set up your webhook trigger
To create a command bot in Slack, you’ll need to start by building a Slack app. Don’t worry, it’s not as intimidating as it sounds. First go to the Slack API page and click Create an App.

In the pop-up window, choose whether you want to build from scratch or from a manifest—basically, a short text file with JSON or some other structured information serving as a blueprint for what you want to build.

For simplicity, let’s build from scratch. You’ll be prompted to pick an app name and workspace.

Slack will then show you a bunch of information about your new app. In the left-hand menu, under Features, click Slash Commands. Then click Create New Command.
From there, choose the word or phrase you want to use as your command. Then, you can add a short description of what the command does, as well as a usage hint that lets people know how to use it.

We still need to add the Request URL, which we’ll get from Zapier’s webhooks integration.
In a new tab or window, make a new Zap using Webhooks by Zapier as the trigger app and Catch Hook as the trigger event.

Click Continue twice to reach the Test tab, where you’ll see your webhook URL. Copy it.

With that webhook link copied, go back to your Slack slash command’s setup page and paste the link into the Request URL field. Then save your settings and install the app into your Slack workspace.
Pro tip: Need support while setting up your Zap? There’s an AI assistant built right into the Zap editor called Copilot. Along with answering questions, it can help you build, configure, and maintain cross-product systems in Zapier. To learn more about how to use Copilot, check out our feature guide.
Now it’s time to test your slash command. Zapier will use the information from your test throughout the rest of your Zap. Just open Slack and type in your command followed by the prompt you’d like to send to ChatGPT.

After that, go back to the Zap editor and click Test Trigger. Zapier will pull in your test prompt from Slack, as well as other information, like the channel and username.
Once you see your webhook working correctly, click Continue.
Set up your ChatGPT action
Now let’s set up the ChatGPT action step. Start by choosing ChatGPT as your trigger app and Conversation as your trigger event, then click Continue.

Connect your OpenAI account to Zapier and click Continue.
Next, customize how you’ll send the prompt to ChatGPT. Since your prompt is just going to be what you typed into Slack, click in the Message field and select Text from the Insert Data dropdown.
Once you’ve finished customizing these fields, click Continue.
Next, click Test Step. If everything works smoothly, click the + button below your action step.
Set up your Slack action
Now it’s time to set up your Slack action step and customize how your results from ChatGPT look when they make it to Slack.
You’ll follow the same steps that we did previously. Pick Slack as your action app and choose Send Channel Message as your action event. Then connect your Slack account with Zapier.
Now, to customize your message. One of the differences between this Zap and the previous one we built is that we want to be able to post ChatGPT results in any channel, not just one specific one.
Instead, click the kebab menu (⋮) to the right of the Channel field and choose Custom—then click the + sign or type a forward slash (/) to map that to the channel name from your trigger step.

This will let your Zap know to post your ChatGPT result where your slash command was entered rather than in one specific channel.
After that, you can customize your message, as well as the name and icon of your bot, just like we did in the previous Zap. Once you’re done customizing, click Continue.
Finally, click Test step. Zapier will send a test message to your Slack channel for you to look at. If your message looks good, you’re ready to use your Zap! Or you can tinker with it until your message looks just right.

Bring the power of ChatGPT to Slack
ChatGPT Slack bots are amazing for streamlining work, whether you’re answering FAQs, pulling data from other apps, or summarizing messages on demand. And beyond the two workflows we covered in this post, there are so many other ways you can leverage AI easily and securely.
Explore more ways to orchestrate AI with Zapier—or, if you’re eager to just start building, dive straight into our Zap editor.
This article was originally published in April 2023. It was most recently updated in November 2025 by Steph Spector.

		    



