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
- Go to api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name it and select your workspace
- You now have an app shell
Step 2: Configure Permissions
Under "OAuth & Permissions," add these scopes:
Bot Token Scopes (minimum):
chat:write— Send messagescommands— Handle slash commandschannels:read— Access channel info
Add more based on your needs:
files:write— Upload filesreactions:write— Add emoji reactionsusers: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
- In n8n, go to Credentials
- Add new "Slack API" credential
- 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
- Schedule Trigger — Cron:
0 9 * * 1-5(9 AM weekdays) - 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:
- Add an HTTP Request node to fetch data (e.g., today's calendar events)
- 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
- In your Slack app, go to "Slash Commands"
- Click "Create New Command"
- Command: /weather
- Request URL: Your n8n webhook URL (we'll create this)
- Description: "Get current weather forecast"
n8n Workflow
- Webhook Trigger
- Method: POST
- Path: /slack-weather
- Copy this URL to Slack's Request URL
- HTTP Request — Fetch weather from an API
- Method: GET
- URL: Weather API endpoint
- Parse the response
- 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
- In Slack app settings, enable "Interactivity"
- 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
- In Slack app, enable "Event Subscriptions"
- Subscribe to:
message.channelsevent - Request URL: n8n webhook
n8n Workflow
- Webhook Trigger — Receives all channel messages
- IF Node — Check for keywords
- Condition: {{ $json.body.event.text.toLowerCase().includes('urgent') }}
- 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
- Schedule Trigger — 5 PM weekdays
- Multiple HTTP Requests (in parallel):
- Get today's sales from CRM
- Get open support tickets
- Get new signups
- Set Node — Format the data
- 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."