Slack Connection
The Slack connection type enables automations to send messages, post to channels, and interact with a Slack workspace through the Slack Web API. It is used by the plugin-slack plugin, which delegates to the slack-connector.
Connection Type
| Property | Value |
|---|---|
| Type enum | SLACK |
| Type ID | slack |
| Category | Enterprise Apps |
| Connector class | SlackConnectionDetails |
Friendly Example
| What you enter | Example |
|---|---|
| Connection name | Slack - Support Alerts |
| Used for | Posting alerts and summaries into Slack channels |
| Main details to collect | Bot token, workspace, and target channel |
| Best person to provide it | Slack workspace administrator |
After it is saved, workflow builders select Slack - Support Alerts in a node instead of entering these details again.
Mandatory Fields
| Field | Type | Required | Description |
|---|---|---|---|
botToken | String | Yes | The Bot User OAuth Token, starting with xoxb-. This is the primary authentication credential. Encrypted at rest. |
Advanced Fields
| Field | Type | Required | Description |
|---|---|---|---|
apiBaseUrl | String | No | Override the Slack API base URL. Defaults to https://slack.com/api. Useful for Slack Enterprise Grid with custom endpoints. |
workspaceId | String | No | The Slack workspace ID (e.g., T01ABCDEF). Informational; helps identify the target workspace. |
workspaceName | String | No | Human-readable workspace name for documentation purposes. |
Creating a Slack App
-
Go to https://api.slack.com/apps and click Create New App.
-
Choose "From scratch" and provide an app name (e.g.,
Qinfinite Automation) and select the target workspace. -
Navigate to OAuth & Permissions in the left sidebar.
-
Add Bot Token Scopes. The minimum scopes depend on what your automations need:
| Scope | Purpose |
|---|---|
chat:write | Post messages to channels the bot is a member of |
chat:write.public | Post messages to any public channel without joining |
channels:read | List public channels and get channel info |
groups:read | List private channels the bot is a member of |
files:write | Upload files to channels |
users:read | Look up user information |
users:read.email | Look up users by email address |
-
Install the app to your workspace by clicking Install to Workspace at the top of the OAuth & Permissions page.
-
Copy the Bot User OAuth Token (
xoxb-...) displayed after installation. This is the value for thebotTokenfield. -
Invite the bot to any channels where it needs to post. In Slack, go to the channel and type
/invite @YourBotName.
Token Rotation
Slack bot tokens do not expire by default, but they can be revoked if the app is reinstalled or uninstalled. If your organization requires token rotation:
- Enable Token Rotation in the app settings under OAuth & Permissions.
- When enabled, tokens have a limited lifespan and a refresh token is provided. The connector will need to handle token refresh (not currently automated; update the connection when the token is rotated).
Troubleshooting
| Symptom | Likely Cause |
|---|---|
invalid_auth | The bot token is invalid, revoked, or the app was uninstalled and reinstalled (generating a new token) |
channel_not_found | The channel ID or name is wrong, or the bot has not been invited to a private channel |
not_in_channel | The bot needs to be invited to the channel. Use /invite @BotName in the channel. |
missing_scope | The bot token does not have the required OAuth scope. Add the scope in app settings and reinstall. |
ratelimited | Slack enforces rate limits (typically 1 message per second per channel). Add delays between bulk sends. |