Reference > Nodes

Slack Node

Reference for the n8n Slack node -- operations, authentication, Block Kit formatting, and common patterns.

ReferenceIntermediate4 min read

The Slack node sends messages, uploads files, and manages channels in a Slack workspace. It is commonly used to deliver notifications, alerts, and reports from automated workflows.

Authentication

Two credential types are supported:

Method When to Use
Slack OAuth2 API Full API access -- send messages, read channels, upload files. Requires creating a Slack App at api.slack.com/apps.
Slack Webhook Simple message posting only. Uses an Incoming Webhook URL -- no OAuth flow required.

OAuth2 setup:

  1. Create a Slack App and add the required Bot Token Scopes (see scopes table below).
  2. Install the app to your workspace.
  3. In n8n, create a Slack OAuth2 API credential using the Client ID, Client Secret, and Bot User OAuth Token.

Common Bot Token Scopes:

Scope Required For
chat:write Sending and updating messages
channels:read Listing public channels
groups:read Listing private channels the bot is in
files:write Uploading files
users:read Looking up user information

Operations

Resource Operation Description
Message Send Post a message to a channel or DM
Message Update Edit an existing message by timestamp
Message Delete Remove a message
Message Get Permalink Get the permanent URL for a message
Channel Get All List channels in the workspace
Channel Get Retrieve info about a specific channel
File Upload Upload a file to a channel
User Get Look up a user by ID
User Get All List workspace users
Reaction Add Add an emoji reaction to a message

Key Parameters

Parameter Description
Channel Target channel name, ID, or user ID for DMs. Selected from dropdown or set via expression.
Text Plain-text message content. Used as fallback if blocks are provided.
Blocks (JSON) Block Kit JSON for rich message formatting. Overrides plain text display.
Thread Timestamp If set, posts the message as a reply in a thread.
Unfurl Links Whether to show link previews. Defaults to true.

Block Kit Formatting

Slack's Block Kit enables rich layouts with sections, buttons, images, and input fields. Pass Block Kit JSON in the Blocks parameter.

[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "*New Lead:* {{ $json.name }}\n*Email:* {{ $json.email }}"
    }
  },
  {
    "type": "divider"
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "Source: {{ $json.source }}"
    },
    "accessory": {
      "type": "button",
      "text": { "type": "plain_text", "text": "View in CRM" },
      "url": "{{ $json.crm_url }}"
    }
  }
]

Tip

Use the Slack Block Kit Builder to visually design layouts, then paste the JSON into n8n. Replace hardcoded values with n8n expressions.

Common Patterns

Post a formatted notification from a data pipeline:

Google Sheets (Read) --> Code (format) --> Slack (Send Message)

Read data, shape it into a Block Kit payload in a Code node, and send to a channel.

Thread replies for grouped alerts:

Send the first message and capture the ts (timestamp) from the output. Pass that ts into Thread Timestamp on subsequent Slack nodes to create a thread.

Conditional channel routing:

Webhook --> Switch node --> Slack (channel A) / Slack (channel B)

Route messages to different channels based on payload data using a Switch or IF node before the Slack node.

Tips and Gotchas

Warning: Bot must be in the channel

The Slack bot can only post to channels it has been invited to. If you get a channel_not_found or not_in_channel error, invite the bot by typing /invite @YourBotName in the target channel.

  • Webhook credentials only support sending messages. You cannot list channels, upload files, or update messages with a webhook URL. Use OAuth2 for full functionality.
  • Text is required even when using Blocks. Slack uses the Text field as a notification preview and accessibility fallback. Always provide it.
  • Rate limits: Slack allows roughly 1 message per second per channel. Burst posting to the same channel will trigger 429 Too Many Requests. Add a Wait node in loops.
  • User IDs, not names, for DMs. To send a direct message, set Channel to the user's Slack ID (e.g., U024BE7LH), not their display name.
  • Markdown differs from standard. Slack uses mrkdwn (not standard Markdown). Bold is *text*, italic is _text_, and code is `text`.

Common Errors

channel_not_found or not_in_channel when sending a message. The Slack bot is not a member of the target channel. Invite the bot by typing /invite @YourBotName in the channel. If using a private channel, the bot must be explicitly invited -- it cannot discover private channels on its own.

missing_scope error when performing an operation. The Slack app does not have the required bot token scope for the operation. Go to your app's settings at api.slack.com/apps, add the missing scope under OAuth & Permissions > Bot Token Scopes, and reinstall the app to your workspace. Then update the credential in n8n.

429 Too Many Requests when sending multiple messages in a loop. Slack rate-limits to approximately 1 message per second per channel. If your workflow sends messages in a loop, add a Wait node with a 1-second delay between iterations, or use the SplitInBatches node with a batch interval to throttle the rate.

See Also

Want this running in your stack?

I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.