Templates / 🤖 Advanced Slackbot with n8n

🤖 Advanced Slackbot with n8n

Ready for 3.0

by Mutasem ✓ · 11,970 views · created 2024-03-01 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 30 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Slack and Postgres.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).

  1. Set vars (Edit Fields (Set)): sets 5 fields: command_text, user, response_url…
  2. Reply to user directly (HTTP Request): calls an HTTP API
  3. If: checks a condition and branches into true / false
  4. Set config (Edit Fields (Set)): sets 6 fields: commands, alerts_channel, instance_url…
  5. If: checks a condition and branches into true / false
  6. Validate webhook signature (Code): runs custom JavaScript code
  7. Get user here for example (Postgres): select
  8. Validate Slack token (If): checks a condition and branches into true / false
  9. Format data into nice structure (Code): runs custom JavaScript code
  10. Reply to user that command was received (HTTP Request): calls an HTTP API

…plus 18 more steps. See the full node list below.

Services it uses

SlackPostgres

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Use case Slackbots are super powerful. At n8n, we have been using them to get a lot done.. But it can become hard to manage and maintain many different operations that a workflow can do. This is the base workflow we use for our most powerful internal…

Excerpt from Mutasem's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.