How to Build a Slack Bot with Claude Code (No Terminal Required)

David IyaDavid Iya July 8, 2026 9 min read
Person typing on a laptop with a team messaging app open on the screen at a modern desk
Photo via Pexels

What a Slack Bot Actually Is

A Slack bot is a custom program that lives inside your Slack workspace and can send messages, respond to commands, or take actions automatically. It is not the same as tagging Claude in a conversation. When you build a Slack bot with Claude Code, you are creating something your whole team can use - permanently - without anyone needing to have a Claude account.

Think of the bot as a small server that watches your Slack workspace and reacts when something happens. Claude Code writes that server for you. You describe the behavior in plain English, and it produces working code.

What You Can Build (and What Each Type is Good For)

Before you start, it helps to pick the shape of bot you want. Here are the most practical starting points.

Common Slack bot types and their best uses

Bot TypeWhat It DoesBest For
Notification botPosts messages to a channel when a trigger fires (form submission, new sale, cron schedule)Keeping a team informed without manual updates
Slash command botResponds when someone types /command in any channelQuick lookups, status checks, team shortcuts
Q and A botReads from a doc or database and answers questions in plain EnglishSupport teams, internal wikis, onboarding helpers
Approval botSends a message with buttons; records the responseSimple workflows that need a yes or no from a human
Daily digest botSummarises data on a schedule and posts a reportSales updates, task summaries, content calendars

You do not need to build all of these. Pick one. The skills transfer directly to the others once you have finished your first.

What You Will Need Before You Start

The list is short. You do not need a server, a cloud account, or a coding background.

  • The Claude Code desktop app installed on your computer
  • A Slack workspace where you have admin permissions (a free personal workspace works fine for testing)
  • A Slack account at api.slack.com to create your app
  • A folder on your computer where Claude Code will put the project files
  • About an afternoon of focused time for your first build

Step One - Create Your Slack App and Get the Credentials

Every Slack bot starts with a Slack app. Go to api.slack.com/apps, sign in, and click Create New App. Choose the From Scratch option. Give it a name and select the workspace you want it to live in.

Once the app is created, you need two things: a Bot Token and a Signing Secret. Here is where to find each one.

  1. In the left sidebar, click OAuth and Permissions. Under Scopes, add Bot Token Scopes. At minimum, add chat:write (so the bot can post messages) and app_mentions:read (so it can see when someone tags it).
  2. Scroll up and click Install to Workspace. Approve the permissions. Copy the Bot User OAuth Token - it starts with xoxb-. Keep this somewhere safe.
  3. Go back to Basic Information in the sidebar. Scroll down to App Credentials. Copy the Signing Secret. This is how your bot verifies that messages are genuinely coming from Slack.

If you are building a bot that responds to slash commands or button clicks, you also need to enable Event Subscriptions or Interactivity in the Slack app settings. Claude Code will remind you of this when it writes your code - just follow what it tells you.

Step Two - Describe What You Want to Claude Code

Open the Claude Code desktop app. Start a new project and point it at the folder where you want to build. Then describe your bot in plain language.

A good starting prompt looks like this: 'Build me a Slack bot in Node.js. When someone types /standup in any channel, the bot should reply with a short message asking for yesterday's update, today's plan, and any blockers. Use the Slack Bolt framework. I have a bot token and a signing secret ready to paste in.' That is enough. Claude Code will ask follow-up questions if it needs more detail.

Claude Code will write the entire bot file, a .env file template for your credentials, and a short README with instructions. Read through the .env template - it will show you exactly where to paste your bot token and signing secret.

Step Three - Wire the Credentials and Run the Bot

Once Claude Code has generated the files, paste your credentials into the .env file. Do not put them anywhere else - not in the code, not in a shared document.

Claude Code will also tell you what commands to run to install dependencies and start the bot. On a Mac, this usually means running npm install and then node app.js in the terminal, or Claude Code can handle this step for you through its built-in run feature.

For slash commands and event subscriptions, Slack needs a public URL to send messages to. While you are testing locally, Claude Code can set up a tool called ngrok for you - it creates a temporary public URL that tunnels to your computer. Paste that URL into the Slack app settings under Request URL.

Step Four - Test It in a Real Channel

Go into your Slack workspace and try the bot. If you built a slash command, type it in a channel. If you built a notification bot, trigger the event that should fire it. Watch what comes back.

When something does not work, copy the error message from your terminal or Claude Code's output and paste it back into the Claude Code chat. Say 'I got this error when I ran the bot - can you fix it?' Claude Code will diagnose and patch the issue, usually in one or two exchanges.

Testing in a private test channel first is smart. You can delete messages, experiment with edge cases, and break things without the whole team watching. Once it behaves correctly, invite the bot to the real channel where it belongs.

Making the Bot Smarter - Connecting It to Your Docs

Once the basic bot is working, you can extend it. One of the most useful upgrades is giving the bot access to a document or a small knowledge base so it can answer questions from your team.

The approach is straightforward: give Claude Code a folder of text files - a FAQ, a product guide, internal docs - and ask it to add a feature where the bot searches those files when someone asks it a question. Claude Code will write a simple retrieval system and connect it to the Slack response.

You can also connect the bot to external services. If you want it to pull in data from a spreadsheet, a CRM, or an API, describe that connection in the Claude Code chat. The MCP server layer (a tool that Claude Code can use to talk to external services) makes many of these connections much faster to build.

  • Connect a Google Sheet: bot reads from it on every query
  • Pull from a REST API: bot fetches live data before responding
  • Write back to a database: bot logs every interaction for review
  • Add a Slack MCP server: gives Claude Code direct access to send and read messages during the build phase, so you can test faster

Keep Building Inside Claude Code Club

Building a Slack bot with Claude Code is one of the fastest ways to produce something genuinely useful. It is the kind of build that gets you from 'I made a thing' to 'my team uses this every day' in a weekend.

Inside Claude Code Club, we walk through builds like this step by step. You can share your bot in the community, get feedback on your prompt approach, and see how other members have extended theirs into client tools and automation products. The classroom has dedicated lessons on wiring bots, working with APIs, and setting up MCP servers so you can move faster on your next build.

If this is your first Claude Code project, this is a good one to start with. The feedback loop is fast. You can see it working inside Slack within a few hours. And once you have done it once, the pattern applies to almost any bot you want to build next.

Frequently asked questions

Do I need to know how to code to build a Slack bot with Claude Code?

No. Claude Code writes the code for you. What you need is a clear description of what you want the bot to do. If you can explain it in plain English, Claude Code can build it.

Is this the same as using Claude inside Slack directly?

No - they are different things. Tagging Claude inside Slack is a personal assistant feature. Building your own Slack bot with Claude Code means you create a bot that your whole team can interact with, that you own and control, and that works whether or not anyone in your team has a Claude account.

How do I keep the bot running after I close my laptop?

While testing, the bot only runs when your computer is on. To keep it running permanently, ask Claude Code to help you deploy it to a simple hosting service. Claude Code can write the deployment setup for you - you just need to choose a host and follow the steps it gives you.

Can the bot respond to messages in multiple channels?

Yes. Once you invite the bot to a channel in your Slack workspace, it can operate there. You can invite it to as many channels as you like. You can also set it up to only respond in specific channels by adding a channel filter to the logic - just describe that to Claude Code and it will add it.

Last reviewed by David Iya on July 8, 2026

David Iya

Written by

David Iya

Forbes 30 Under 30 · Y Combinator

Keep reading

FreelancingBusiness

The Do's and Don'ts of Using AI on Client Work

AI on client work is normal now - but there is a right way and a fast way to lose a client. A clear, save-worthy list of the do's and don'ts that protect your quality, your reputation, and your relationship with the people paying you.

Duncan Rogoff 8 min
Read article

Ready to build it yourself?

Join Claude Code Club, the #1 community for learning claude code, for $9/month.

← Back to the blog