Skip to content

Slack trigger#

Use the Slack trigger node to respond to events in Slack and integrate Slack with other applications. n8n has built-in support for a wide range of Slack events, including new messages, reactions and new channels.

On this page, you'll find a list of events the Slack trigger node can respond to, and links to more resources.

Credentials

You can find authentication information for this node here.

Examples and templates

For usage examples and templates to help you get started, refer to n8n's Slack integrations page.

Events#

  • Any Event: The node triggers on any event in Slack.
  • Bot / App Mention: The node triggers when your bot or app is mentioned in a channel the app is in.
  • File Made Public: The node triggers when a file is made public.
  • File Shared: The node triggers when a file is shared in a channel the app is in.
  • New Message Posted to Channel: The node triggers when a new message is posted to a channel the app is in.
  • New Public Channel Created: The node triggers when a new public channel is created.
  • New User: The node triggers when a new user is added to Slack.
  • Reaction Added: The node triggers when a reaction is added to a message the app is added to.

Parameters#

Once you've set the events to trigger on, use the remaining parameters to further define the node's behavior:

  • Watch Whole Workspace: Whether the node should watch for the selected Events in all channels in the workspace (turned on) or not (turned off, default).

    Caution

    This will use one execution for every event in any channel your bot or app is in. Use with caution!

  • Channel to Watch: Select the channel your node should watch for the selected Events. This parameter only appears if you don't turn on Watch Whole Workspace. You can select a channel:

    • From list: The node uses your credential to look up a list of channels in the workspace so you can select the channel you want.
    • By ID: Enter the ID of a channel you want to watch. Slack displays the channel ID at the bottom of the channel details with a one-click copy button.
    • By URL: Enter the URL of the channel you want to watch, formatted as https://app.slack.com/client/<channel-address>.
  • Download Files: Whether to download files and use them in the node's output (turned on) or not (turned off, default). Use this parameter with the File Made Public and File Shared events.

Options#

You can further refine the node's behavior when you Add Options:

  • Resolve IDs: Whether to resolve the IDs to their respective names and return them (turned on) or not (turned off, default).
  • Usernames or IDs to ignore: Select usernames or enter a comma-separated string of encoded user IDs to ignore events from. Choose from the list, or specify IDs using an expression.

n8n provides an app node for Slack. You can find the node docs here.

View example workflows and related content on n8n's website.

Refer to Slack's documentation for details about their API.

Required scopes#

To use this node, you need to create an application in Slack and enable event subscriptions. Refer to Slack credentials | Slack Trigger configuration for more information.

You must add the appropriate scopes to your Slack app for this trigger node to work.

The node requires scopes for the conversations.list and users.list methods at minimum. Check out the Scopes | Slack credentials list for a more complete list of scopes.