DEV Community

Pirate Prentice
Pirate Prentice

Posted on

n8n Slack Node: Send Messages, Manage Channels, and Build Bots in Your Workflows [Free Workflow JSON]

If your team lives in Slack, your automations should live there too. The n8n Slack node lets you send messages, post to channels, create and archive channels, manage users, upload files, set reactions — all without writing a Slack app from scratch.

This guide covers every operation, the gotchas that will bite you, three production-ready workflow patterns, and a free downloadable workflow JSON.


What the Slack Node Can Do

The Slack node has three broad operation groups:

Message operations

  • Send — post a message to a channel or user (by channel ID, name, or DM to user ID)
  • Update — edit an existing message (requires original ts timestamp)
  • Delete — remove a message
  • Get Permalink — get a shareable link to a specific message
  • Search — search messages by query (requires search:read scope)

Channel operations

  • Create — create a public or private channel
  • Archive / Unarchive
  • Get / Get Many — fetch channel info and list channels
  • Invite / Kick — manage channel membership
  • Set Topic / Set Purpose
  • Join / Leave

Other operations

  • File: Upload — attach a file to a channel or DM
  • Reaction: Add / Remove / Get — emoji reactions on messages
  • User: Get / Get Many — look up user profiles
  • User Group: Create / Update / Enable / Disable / Get Many

Authentication

Use a Slack OAuth2 credential in n8n (under Credentials → New → Slack OAuth2 API). You'll need to create a Slack app at api.slack.com/apps, enable the OAuth scopes your workflows need, and install it to your workspace.

Common scopes:

  • chat:write — post messages
  • channels:read, groups:read — list/read channels
  • files:write — upload files
  • reactions:write — add reactions
  • users:read — look up users
  • search:read — search messages

Tip: Start with the minimal scopes and add more as needed. Slack's OAuth flow is workspace-scoped — every workspace needs its own credential.


Core Gotchas

1. Channel ID vs. channel name

The Slack node accepts either #channel-name or C012345ABCD (the channel ID). Always prefer the channel ID — names change, IDs don't. Find the ID by right-clicking a channel in Slack → View channel details → scroll to the bottom.

2. Updating or deleting messages requires the original ts

When you send a message, the API returns a ts (timestamp string like "1720050000.123456"). Store this in your data flow if you'll need to edit or delete the message later. Without ts, you can't target the message.

3. Bot token vs. user token

A bot token (xoxb-...) lets the bot post as itself. A user token (xoxp-...) lets you post as the authenticated user. For most automations, use the bot token and invite the bot to the channels it needs to post in.

4. Private channels need the bot invited

If you're posting to a private channel (groups:write scope), the bot must be explicitly invited to that channel first, otherwise you'll get channel_not_found.

5. not_in_channel error

The bot can only post to channels it has joined. For public channels, add channels:join scope and the bot can auto-join. For private channels, a workspace admin must invite it.

6. Block Kit vs. plain text

The Slack node's "Text" field accepts plain text. For rich formatting (buttons, sections, images, dividers), switch to Block Kit by toggling "Blocks" and passing a JSON array of block objects. Mix and match — a blocks payload overrides text for display, but keep text as a fallback for notifications.

7. Rate limits

Slack's Tier 3 methods (most chat.postMessage calls) allow ~50 req/min per workspace. For bulk notifications, use n8n's Split in Batches node with a 1–2 second delay to avoid hitting the limit.


Pattern 1: Approval Bot with Interactive Buttons

Use case: A form submission (e.g., expense request, content approval, access request) needs a human decision before the workflow continues.

Flow:

  1. Webhook Trigger — receives form data (requester, amount, description)
  2. Slack node (Send message) — posts a Block Kit message to #approvals with "Approve" and "Reject" buttons
  3. Wait node (Webhook resume) — pauses the workflow, waiting for a Slack interaction callback
  4. Slack Interaction Webhook — Slack sends a POST to your n8n webhook when a button is clicked
  5. IF node — routes on payload.actions[0].value (approve vs reject)
  6. Slack node (Update message) — replaces the original message with the decision and who made it
  7. Gmail / Resend node — emails the requester with the outcome

Key detail: The "Wait" node's webhook URL is what you register as your Slack app's Interactivity Request URL. Set it once in your Slack app settings.


Pattern 2: Daily Digest Bot

Use case: Aggregate overnight alerts, metric summaries, or task lists into one clean Slack message every morning.

Flow:

  1. Schedule Trigger — fires at 08:00 every weekday
  2. HTTP Request node — pulls metrics from your API, Stripe, or a Google Sheet
  3. Code node — formats the data into a Block Kit blocks array (sections with key metrics, a divider, action items)
  4. Slack node (Send message) — posts the digest to #daily-standup
  5. Slack node (Add reaction) — adds a 📊 emoji to the message for quick visual scanning

Block Kit tip: Use *bold* and _italic_ in mrkdwn text fields. The section block with a fields array is perfect for two-column metric displays (Metric | Value).


Pattern 3: Error Alert Routing

Use case: When a production workflow fails, alert the right on-call engineer directly via Slack DM instead of (or in addition to) email.

Flow:

  1. Error Trigger node — fires on any workflow error
  2. Code node — extracts $json.workflow.name, $json.execution.id, $json.error.message
  3. Slack node (User: Get Many) — looks up the on-call user by email from a rotation list
  4. Slack node (Send message) — DMs the user: channel = @user-id, includes workflow name, error message, and a direct link to the execution
  5. Slack node (Send message) — also posts to #alerts for team visibility

Tip: Use conversations.open (the "channel" field accepts a user ID for DMs) — in n8n, set Channel to the user's Slack user ID (starts with U).


Free Workflow JSON

Download the workflow JSON for all three patterns above from the n8n Workflow Starter Pack on Gumroad — includes the Approval Bot, Daily Digest, and Error Alert Routing workflows ready to import into your n8n instance.

👉 Get the n8n Workflow Starter Pack ($29)

Includes:

  • Approval Bot with Block Kit buttons and interactive resume
  • Daily Digest with Stripe + Google Sheets data pull
  • Error Alert routing to Slack DM + channel
  • All 3 ready-to-import workflow JSONs
  • Lifetime access + updates

Quick Reference: Slack Node Operations

Operation Key inputs Returns
Message: Send Channel, Text/Blocks ts, channel
Message: Update Channel, ts, Text/Blocks Updated message
Message: Delete Channel, ts
Channel: Create Name, Is Private Channel object
Channel: Invite Channel, User IDs
File: Upload Channel, File Binary, Filename File object
Reaction: Add Channel, ts, Emoji Name
User: Get User ID or email User profile

What's Next?

Once you have Slack wired up, combine it with:

  • n8n HTTP Request node — pull data from any API before sending
  • n8n Code node — build dynamic Block Kit JSON for rich messages
  • n8n Wait node — pause a workflow until a Slack reply or button click
  • n8n Error Trigger — send all workflow errors to Slack automatically

The Slack node is one of the highest-ROI integrations in n8n — most teams already use Slack, and adding automation into it takes minutes once the app is set up.


Building something with the Slack node? Drop your pattern in the comments — what are you automating?

Top comments (1)

Collapse
 
pirateprentice profile image
Pirate Prentice

Are you using the Slack node to send messages, build approval workflows, or route error alerts in n8n? Drop your pattern in the comments — Block Kit makes these flows so much cleaner.