Skip to main content

Slack

The Slack Trigger allows you to initiate workflows based on specific events that occur in your Slack workspace. This trigger enables seamless integration with Slack, allowing you to automate actions such as responding to messages, monitoring channel activities, or processing user interactions.

Slack Trigger

How It Works

The Slack trigger listens for events in your Slack workspace, such as new messages, mentions, or reactions. When the specified event occurs, the trigger activates and executes the connected workflow.

Supported Events

  1. New Message Posted to Channel
    Trigger a workflow when a new message is posted in a specific channel.

  2. New Message Posted to Private Channel
    Trigger a workflow when a new message is posted in a specific private channel that the Boltic bot or your app is part of.

  3. Mention in Public Channel
    Trigger a workflow when:

    • A specific user is mentioned in a public channel, or
    • A specific keyword is mentioned in a public channel.
      If both are specified, the workflow is triggered only when both are mentioned in the same message.
  4. Mention in Private Channel
    Trigger a workflow when:

    • A specific user is mentioned in a private channel, or
    • A specific keyword is mentioned in a private channel.
      If both are specified, the workflow is triggered only when both are mentioned in the same message.
  5. Boltic Bot/App Mention
    Trigger a workflow when the Boltic bot or your Slack app is mentioned in either a public or private channel.

Slack Trigger Supported Events

Configuration

PropertyDescriptionRequiredDefault
Slack AccountCredentials to connect your Slack workspace. (either Boltic bot or your Slack app token)YesNone
EventThe event to monitor, e.g., New Message Posted to Channel.YesNone
Select ChannelThe specific channel to monitor. Only channels you are a member of will be listed.ConditionalNone
Listen for WorkspaceToggle to listen to events across all channels where the Boltic bot or your app is present.NoNo
Listen for Bot MessagesToggle to include or exclude messages sent by the Boltic bot or your app.NoNo
Mentioned User(For mention events) The specific user to watch for mentions.NoNone
Keyword(For mention events) The keyword to watch for in messages.NoNone

Either Select Channel or Listen for Workspace must be provided.

note

To enable monitoring, the Boltic bot or your custom Slack app must be added to both public and private channels.
Events will only be triggered if the bot/app is a member of the channel and has permission to read messages.
If Listen for Workspace is enabled, the integration will monitor all such accessible channels automatically.


Setup Instructions

Step 1: Configure Slack Credentials

Before setting up the trigger, you need to configure your Slack credentials in Boltic. There are two ways to add Slack integration:

Method 1: From Trigger Configuration

  1. In the Slack Trigger configuration page
  2. Click on "Add New" next to Slack Credentials
  3. Fill the authentication form with your preferred method:
    • OAuth: Recommended for most users. Automatically handles permissions and provides a simpler setup
    • Access Token: For advanced users who want to use their own Slack app with custom configurations

Method 2: From Boltic Dashboard

  1. On the Boltic Dashboard, click on "Integrations"
  2. Go to "Sources" section
  3. Click on "Add New Source"
  4. Search for "Slack" and select it
  5. Fill the authentication form with your preferred method
info

For detailed instructions on setting up Slack credentials, see our Slack Credentials Guide.

Step 2: Add the Boltic Bot to a Slack Channel

To ensure the Slack trigger works as expected, the Boltic bot must be present in the relevant Slack channels.

Public Channels

  1. Open the desired public channel in Slack.
  2. Type /invite @Boltic and press Enter.
  3. You should see a confirmation that the Boltic bot has been added.

Private Channels

  1. Open the desired private channel in Slack.
  2. Type /invite @Boltic and press Enter.
  3. If the bot doesn’t respond or is not invited, make sure:
    • The person inviting has permissions in that channel.

Using Your Own Slack App

You can also connect your own Slack app instead of using the Boltic bot.

Steps to Integrate

  1. Provide your Slack Bot Token
    While setting up the Slack integration in Boltic, paste the bot token from your custom Slack app (e.g., xoxb-...).

  2. Enable Event Subscriptions in Your App
    In your Slack app configuration:

    • Go to the Event Subscriptions page.
    • Turn on the Enable Events toggle.
    • Paste the webhook URL shown on the Slack trigger configuration page into the Request URL field.
    Important: Workflow Version Selection

    Since Slack triggered workflows can have multiple versions but your Slack app can only point to one webhook URL at a time, make sure to:

    • Choose the specific workflow version you want to be active
    • Copy the webhook URL from that exact version in your Slack trigger configuration
    • Use only that version's webhook URL in your Slack app's Event Subscriptions Request URL field

    Remember: Only the workflow version whose webhook URL is configured in your Slack app will receive and process Slack events.

  3. Subscribe to the Following Bot Events Under the Subscribe to bot events section, add:

    • app_mention
    • message.channels
    • message.groups
  4. Install Your App to Slack Workspace
    Make sure your app is installed in your workspace.
    You must also invite your app to each relevant channel using /invite @YourAppName.

  5. Add Your Bot to Target Channels
    Critical Step: Your bot must be added to all channels where you want to listen for messages and events.

    For Public Channels:

    • Open the desired public channel in Slack
    • Type /invite @YourAppName and press Enter
    • Confirm the bot has been added successfully

    For Private Channels:

    • Open the desired private channel in Slack
    • Type /invite @YourAppName and press Enter
    • Ensure you have permissions to invite members to that channel
    Important

    Events will only be triggered from channels where your bot is a member. If your bot is not in a channel, it cannot receive messages or events from that channel, and your triggers will not fire.

Important: Managing Workflow Versions

Workflow Version Limitation

Since a Slack app can only have one event request URL configured at a time, only one workflow version (including drafts) can be active for your Slack app simultaneously.

How Workflow Versioning Works:

  • Each workflow version and draft generates a unique webhook URL
  • Your Slack app's Request URL field can only contain one URL at a time
  • This means only the workflow version whose URL is currently configured in your Slack app will receive events

To Switch Between Workflow Versions:

  1. Enable the desired workflow version in Boltic (make it the active version)
  2. Copy the webhook URL shown for that specific version in the Slack trigger configuration
  3. Update your Slack app's Event Subscriptions:
    • Go to your Slack app's Event Subscriptions page
    • Replace the existing Request URL with the new webhook URL
    • Save the changes

This ensures that only the intended workflow version will be triggered by Slack events.

Best Practices for Workflow Version Management

Development and Testing:

  • Use separate Slack apps for development, staging, and production environments
  • This allows you to test different workflow versions without affecting your live production workflows
  • Each environment can point to its respective workflow version URL

Version Switching:

  • Always test your workflow changes thoroughly before switching the production URL
  • Keep track of which workflow version is currently active in your production Slack app
  • Consider documenting URL changes in your team's workflow management process

Rollback Strategy:

  • Keep the previous working workflow version available for quick rollback
  • If issues arise, you can quickly revert to the previous version's URL in your Slack app settings

Troubleshooting

Common Issues:

  1. Events Not Being Received

    • Verify the correct webhook URL is configured in your Slack app's Event Subscriptions
    • Check that the workflow version is enabled in Boltic
    • Ensure your Slack app is properly installed and has the required scopes
  2. Wrong Workflow Version Triggered

    • Confirm you've updated the Request URL in your Slack app to match the desired workflow version
    • Check that only one workflow version is enabled if you expect exclusive triggering
  3. URL Validation Errors in Slack

    • Ensure the workflow is properly saved and enabled in Boltic before configuring the URL in Slack
    • Verify that your Slack app has all the required scopes listed in the documentation

Required Scopes

Your Slack app must include the following scopes for the Slack trigger and Slack activity to function properly:

#ScopeWhy It’s Needed
1.app_mentions:readTo detect when the app is mentioned in any public or private conversation. Required for App Mention triggers.
2.channels:historyTo read messages and events in public channels. Required for triggers like New Message Posted to Channel, mention triggers, etc.
3.channels:readTo list and access metadata about public channels (e.g., for showing channel selectors or verifying presence).
4.channels:manageTo allow the app to create public channels.
5.chat:writeTo send messages to public or private channels using the chat.postMessage API (used in activity workflows).
6.groups:historyTo read messages from private channels where the app is a member. Needed for New Message in Private Channel, mention triggers, etc.
7.groups:readTo discover private channels and show them in channel selectors when the app has access.
8.groups:writeTo programmatically manage private channels if needed.
9.users:readTo fetch user lists for drop-downs, mentions, and user-level trigger filters.
10.users:read.emailTo map Slack users to email addresses (e.g., for identity resolution or cross-system integrations).
caution

If any of the required scopes are missing from your Slack app, Boltic will return a missing_scope error during Slack-triggered workflows or Slack activity execution.


Common Use Cases & Examples

Here are some practical examples of how to use the Slack trigger effectively:

1. Customer Support Automation

  • Trigger: New message in #support channel
  • Workflow: Automatically create tickets in your CRM and send acknowledgment messages

2. Team Notification System

  • Trigger: Mention of keyword "urgent" or "critical" in any channel
  • Workflow: Send alerts to on-call team members via email/SMS

3. Code Review Reminders

  • Trigger: Mention of "review needed" in #dev-team channel
  • Workflow: Create GitHub issues and notify relevant developers

4. Meeting Scheduling

  • Trigger: Bot mention with scheduling keywords
  • Workflow: Integrate with calendar APIs to check availability and book meetings

5. Security Monitoring

  • Trigger: Messages containing security-related keywords
  • Workflow: Log incidents and notify security team immediately

Rate Limits & Performance

Slack API Rate Limits

  • Slack enforces rate limits on API calls (typically 1+ requests per second)
  • Boltic automatically handles rate limiting with intelligent retry mechanisms
  • For high-volume channels, consider using filters to reduce unnecessary triggers

Performance Best Practices

  • Use specific channels instead of workspace-wide monitoring when possible
  • Filter by keywords to reduce noise and improve workflow efficiency
  • Combine related triggers into single workflows rather than creating multiple separate triggers
  • Test with low-traffic channels first before deploying to busy channels

Monitoring Workflow Performance

  • Check workflow execution logs for any rate limit errors
  • Monitor trigger frequency to ensure it matches your expectations
  • Use the "Listen for Bot Messages" toggle wisely to avoid infinite loops

Security Considerations

Access Control

  • Only grant minimum required scopes to your Slack app
  • Regularly review and audit which channels your bot has access to
  • Use separate apps for different environments (dev/staging/prod)

Bot Management

  • Monitor bot activity and remove from channels where it's no longer needed