Slack (Custom App)

Creating Your Own Slack App

If you prefer not to use OAuth2, you can connect via a custom Slack App using a Bot Token and a Channel ID.

⚠️ Important: Each action or trigger in Slack requires specific permissions. When connecting via API tokens, you are responsible for configuring the right scopes in your Slack App. Missing permissions may prevent certain actions, triggers, or even configuration selectors from working as expected. For this reason, we recommend using the OAuth2 connection whenever possible, as it comes pre-configured with all the necessary permissions and ensures full functionality.

Step 1: Create a Slack App Go to Slack API: Your Apps and create a new app in your workspace.

Step 2: Configure OAuth & Permissions (add all the ones they need!) Under OAuth & Permissions, add the following scopes to your Bot Token:

app_mentions:read
assistant:write
bookmarks:read
bookmarks:write
calls:read
calls:write
canvases:read
canvases:write
channels:read
channels:write.invites
channels:write.topic
channels:join
channels:manage
channels:history
conversations.connect:write
conversations.connect:manage
conversations.connect:read
chat:write
chat:write.customize
chat:write.public
commands
dnd:read
emoji:read
files:read
files:write
groups:read
groups:history
groups:write
groups:write.topic
groups:write.invites
im:read
im:history
im:write
im:write.topic
incoming-webhook
lists:read
lists:write
links:read
links:write
links.embed:write
metadata.message:read
mpim:read
mpim:history
mpim:write
mpim:write.topic
pins:read
pins:write
reactions:read
reactions:write
reminders:read
reminders:write
remote_files:read
remote_files:write
remote_files:share
team:read
team.billing:read
team.preferences:read
triggers:read
triggers:write
usergroups:read
usergroups:write
users:read
users:read.email
users:write
users.profile:read
workflow.steps:execute
workflows.templates:read
workflows.templates:write

Under the User Token Scopes:

search:read

Once added, install (or reinstall) the app in your workspace to apply these permissions.

Step 3: Include the URL for Interactivity:

Some actions, like Send & Wait for Response, require to include the url https://stack-us-east-1.onrender.com/workflow/v1/resume in the Interactivity & Shortcuts to work out. If you do not include that url, you will not be able to resume workflows using that particular action.

So now, it is time to include the URL. For that, enable Interactivity and include the URL, as follows:

Step 4: Add the Integration to a Channel

Once the app is installed in your workspace, you need to invite it to the channel where it should operate.

  1. Open Slack and go to the target channel.

  2. In the message box, type:

    /invite @YourAppName
  3. Hit Enter. The bot is now a member of the channel and will be able to read/write messages according to the permissions you configured.

Step 5: Retrieve Your Bot Token Copy the Bot User OAuth Token (starts with xoxb-). This token uniquely identifies your bot when making requests. Here more information on how to get it: Official guide.

You can also copy the User Token, highly recommended if you want to perform Search Messages.

Step 6: Find Your Channel ID Locate the ID of the Slack channel you want to connect. Here more information on how to get it: Guide to finding Channel IDs

Step 7: Configure the Connection in StackAI Enter the Bot Token and Channel ID in the connection form. Optionally, you can also provide a User Token (starts with xoxp-) for user-level search operations.

Once saved, the connection will be validated and ready for use in actions and triggers.

Last updated

Was this helpful?