Slack bots2 minutes to read

Deploy a Slack bot from GitHub and verify each push

Connect a public or private GitHub branch to your Slack Bolt worker, keep tokens in Variables, and check what changed from a real workspace reply.

Put the Bolt project in a deployable branch

Choose a branch that contains the bot and its dependencies at the repository root. For the JavaScript starter, commit index.js, package.json and the npm lockfile. For Python, commit main.py and requirements.txt. Add rules to .gitignore for any local environment files or credential exports. If a token is already in Git history, replace it in Slack before deploying.

Create a matching Slack Socket Mode deployment. Save SLACK_BOT_TOKEN and SLACK_APP_TOKEN in Variables. Use a separate Slack app for development so your local and hosted workers can listen independently.

Connect the branch and test repository access

Open Deploy and connect the repository with the branch that should run in your workspace. Public and private repositories are available on compatible runtimes across all plans. Use the GitHub deployment guide for the App connection where enabled or the manual read credential and push webhook. Allow read access to the repository that actually contains the bot.

Select Deploy latest after connecting. Watch Recent deploys for the outcome, then open Console. A dependency error before Socket Mode starts usually points to the build or entry file. A successful build followed by a Slack startup error points to the two saved Slack tokens and the app’s Socket Mode settings.

Prove which code handled a Slack event

Change the example reply to a unique phrase and push it to the connected branch. Confirm the matching commit ID in the deploy history. Invite the app to a test channel, mention it and read the threaded reply. You can also use a dedicated test slash command. The changed text proves the hosted revision received the interaction and made a successful Slack API call.

If the next revision fails, record the working commit ID and the first error in Console before retrying. Follow the Git revision recovery steps. When a change also writes durable workspace records, check that older code can still read those records before recovering the source.