All posts
Nodox Team··11 min read

How to Build a Slack Bot with n8n (No Code Required)

Create powerful Slack bots using n8n without writing code. Learn to build slash commands, interactive messages, and automated notifications.

n8nslackbotintegrationtutorial

Slack bots used to require a developer, a server, and weeks of work.

With n8n, you can build powerful Slack bots in an afternoon — no coding required.

Here's how to create bots that actually solve problems for your team.

What You Can Build

Before diving in, let's clarify what's possible:

You CAN build:

  • Slash commands (/status, /report, /lookup)
  • Automated notifications (alerts, summaries, reminders)
  • Interactive messages (buttons, dropdowns, forms)
  • Message-triggered actions (react to keywords, process requests)
  • Channel monitoring (track mentions, aggregate discussions)

You'll need code for:

  • Real-time presence updates
  • Complex threading behavior
  • App home tabs with dynamic content

For 90% of use cases, n8n handles everything you need.

Setting Up Slack + n8n

Step 1: Create a Slack App

  1. Go to api.slack.com/apps
  2. Click "Create New App" → "From scratch"
  3. Name it and select your workspace
  4. You now have an app shell

Step 2: Configure Permissions

Under "OAuth & Permissions," add these scopes:

Bot Token Scopes (minimum):

  • chat:write — Send messages
  • commands — Handle slash commands
  • channels:read — Access channel info

Add more based on your needs:

  • files:write — Upload files
  • reactions:write — Add emoji reactions
  • users:read — Look up user info

Step 3: Install to Workspace

Click "Install to Workspace" and authorize. You'll get a Bot User OAuth Token — save this for n8n.

Step 4: Add Credentials in n8n

  1. In n8n, go to Credentials
  2. Add new "Slack API" credential
  3. Paste your Bot User OAuth Token

You're connected!

Project 1: Basic Notification Bot

Start simple. Send automated messages to a channel.

Use case: Daily standup reminder at 9 AM.

Workflow

  1. Schedule Trigger — Cron: 0 9 * * 1-5 (9 AM weekdays)
  2. Slack node

- Operation: Send Message

- Channel: #your-channel

- Message: "Good morning! Time for standup. What are you working on today?"

That's it. Your first Slack bot.

Making It Smarter

Add dynamic content:

  1. Add an HTTP Request node to fetch data (e.g., today's calendar events)
  2. Use expressions in the Slack message to include fetched data

Example message:

```

Good morning team!

Today's calendar:

{{ $json.events.map(e => '• ' + e.title).join('\n') }}

What are you working on?

```

Project 2: Slash Command Bot

Slash commands let users interact with your bot directly.

Use case: /weather command that returns local forecast.

Slack Setup

  1. In your Slack app, go to "Slash Commands"
  2. Click "Create New Command"
  3. Command: /weather
  4. Request URL: Your n8n webhook URL (we'll create this)
  5. Description: "Get current weather forecast"

n8n Workflow

  1. Webhook Trigger

- Method: POST

- Path: /slack-weather

- Copy this URL to Slack's Request URL

  1. HTTP Request — Fetch weather from an API

- Method: GET

- URL: Weather API endpoint

- Parse the response

  1. Respond to Webhook

- Response Code: 200

- Response Body:

```json

{

"response_type": "in_channel",

"text": "Current weather: {{ $json.temperature }}°F, {{ $json.condition }}"

}

```

Handling Command Arguments

Slack sends the command text in the webhook payload:

  • /weather london{{ $json.body.text }} = "london"

Use this to make commands dynamic:

```

Weather API URL: https://api.weather.com/forecast?city={{ $json.body.text }}

```

Project 3: Interactive Message Bot

Buttons and menus make bots actually useful.

Use case: Approval workflow with Approve/Reject buttons.

Sending Interactive Messages

Use Slack's Block Kit format:

```json

{

"channel": "#approvals",

"blocks": [

{

"type": "section",

"text": {

"type": "mrkdwn",

"text": "*New Request*\nFrom: {{ $json.requester }}\nAmount: {{ $json.amount }}"

}

},

{

"type": "actions",

"elements": [

{

"type": "button",

"text": {"type": "plain_text", "text": "Approve"},

"style": "primary",

"value": "approve_{{ $json.requestId }}"

},

{

"type": "button",

"text": {"type": "plain_text", "text": "Reject"},

"style": "danger",

"value": "reject_{{ $json.requestId }}"

}

]

}

]

}

```

Handling Button Clicks

  1. In Slack app settings, enable "Interactivity"
  2. Set Request URL to another n8n webhook

When someone clicks, Slack sends the button value. Parse it to know what was clicked:

```

{{ $json.body.payload.actions[0].value }}

```

Returns: "approve_123" or "reject_123"

Complete Approval Workflow

```

[New Request Webhook] → [Send Interactive Message to Slack]

[Button Click Webhook] → [IF: Approved?]

↓ true → [Process Approval] → [Update Slack Message: "Approved"]

↓ false → [Process Rejection] → [Update Slack Message: "Rejected"]

```

Project 4: Keyword Monitoring Bot

Monitor channels for specific keywords and take action.

Use case: Alert support team when "urgent" is mentioned.

Setup

  1. In Slack app, enable "Event Subscriptions"
  2. Subscribe to: message.channels event
  3. Request URL: n8n webhook

n8n Workflow

  1. Webhook Trigger — Receives all channel messages
  1. IF Node — Check for keywords

- Condition: {{ $json.body.event.text.toLowerCase().includes('urgent') }}

  1. Slack Node — Send alert

- Channel: #support-alerts

- Message: "Urgent message detected in #{{ $json.body.event.channel }}"

Avoiding Bot Loops

Important: Filter out bot messages!

Add condition: {{ !$json.body.event.bot_id }}

Otherwise your bot's own messages could trigger it — infinite loop.

Project 5: Daily Digest Bot

Aggregate information and send summaries.

Use case: Daily sales summary at 5 PM.

Workflow

  1. Schedule Trigger — 5 PM weekdays
  1. Multiple HTTP Requests (in parallel):

- Get today's sales from CRM

- Get open support tickets

- Get new signups

  1. Set Node — Format the data
  1. Slack Node — Send rich summary

```

*Daily Digest - {{ $now.format('MMM D, YYYY') }}*

💰 *Sales*

• New deals: {{ $json.deals.length }}

• Revenue: ${{ $json.totalRevenue }}

🎫 *Support*

• Open tickets: {{ $json.tickets.open }}

• Resolved today: {{ $json.tickets.resolved }}

👥 *Growth*

• New signups: {{ $json.signups }}

```

Best Practices for Slack Bots

1. Respond Fast

Slack expects responses within 3 seconds. For long operations:

  • Send an immediate acknowledgment
  • Do the work
  • Update the message or send a follow-up

2. Use Threading

Keep channels clean by replying in threads:

```json

{

"channel": "#channel",

"thread_ts": "{{ $json.messageTimestamp }}",

"text": "Your reply here"

}

```

3. Format Messages Well

Use Slack's mrkdwn:

  • *bold* for emphasis
  • _italic_ for notes
  • `code` for technical content
  • > for quotes

4. Handle Errors Gracefully

Always respond to users, even when something breaks:

```

Sorry, I couldn't complete that request. The team has been notified.

```

5. Rate Limits

Slack limits API calls. For bulk operations:

  • Batch messages when possible
  • Add delays between calls
  • Use Split In Batches with 1-second delays

Real-World Bot Ideas

For Engineering Teams:

  • Deployment notifications
  • Error alerting from monitoring
  • PR review reminders
  • Incident status updates

For Sales Teams:

  • New lead alerts
  • Deal stage changes
  • Daily pipeline summary
  • Customer activity notifications

For Operations:

  • Inventory alerts
  • Order status updates
  • Shift reminders
  • Approval workflows

For Everyone:

  • Meeting reminders
  • Birthday/anniversary announcements
  • Company news aggregation
  • Quick lookups (customer info, docs)

Ready to build real Slack bots? Nodox.ai includes integration challenges where you connect Slack with other tools. Build bots that solve actual problems, not just echo "Hello World."

Start building today

Stop reading. Start building.

The best way to learn automation is by doing. Nodox.ai gives you hands-on challenges that build real skills — no passive tutorials, no hand-holding. Just problems to solve and skills that compound.