DEV Community

Pirate Prentice
Pirate Prentice

Posted on

How to send Slack notifications with n8n (free workflow JSON, no code needed)

If you're running n8n workflows, you probably want to know when something important happens — a new lead, a failed payment, a form submission, a cron job finishing. Slack notifications close that loop instantly.

This is the exact setup I use. Free workflow JSON at the end.

What you'll build

  • Triggers on any event (webhook, schedule, form, API call)
  • Sends a formatted Slack message to a channel or DM
  • Includes dynamic data from the trigger (name, amount, email, etc.)
  • Takes under 10 minutes to set up

Step 1: Get a Slack incoming webhook URL

  1. Go to api.slack.com/apps and click "Create New App"
  2. Choose "From scratch" → name it (e.g. "n8n Notifier") → pick your workspace
  3. In the left sidebar, click Incoming Webhooks
  4. Toggle "Activate Incoming Webhooks" ON
  5. Click "Add New Webhook to Workspace" → pick a channel → Allow
  6. Copy the webhook URL (starts with https://hooks.slack.com/services/...)

Step 2: Build the workflow in n8n

Add a trigger node

Pick whichever fits your use case:

  • Webhook — for form submissions or external events
  • Schedule Trigger — for daily/weekly reports
  • Stripe Trigger — for payment events

Add a Slack node

  1. Add a Slack node after your trigger
  2. Set Resource to Message, Operation to Send
  3. Under Authentication, choose Webhook and paste your Slack webhook URL
  4. In the Text field, use n8n expressions:
New lead: {{ $json.name }} ({{ $json.email }})
Source: {{ $json.source }}
Time: {{ $now.format('YYYY-MM-DD HH:mm') }}
Enter fullscreen mode Exit fullscreen mode

Test it

Click Test Workflow in n8n, then send a POST to your webhook URL:

{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "source": "landing page"
}
Enter fullscreen mode Exit fullscreen mode

The Slack message should appear in seconds.

Step 3: Better formatting with Block Kit

Switch from plain text to JSON blocks for clean, scannable messages:

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*New lead:* {{ $json.name }}\n*Email:* {{ $json.email }}"
      }
    },
    {
      "type": "context",
      "elements": [{"type": "plain_text", "text": "{{ $now.format('YYYY-MM-DD HH:mm') }}"}]
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Common patterns

Payment received: 💰 Payment: ${{ $json.amount }} from {{ $json.customer_email }}

Error alert: Error Trigger → Slack. Get pinged when any workflow fails.

Daily digest: Schedule Trigger (9am) → HTTP Request (pull data) → Slack summary.

Troubleshooting

Message not sending? Test with curl: curl -X POST -H 'Content-type: application/json' --data '{"text":"test"}' YOUR_WEBHOOK_URL

Expression showing undefined? Check field names in the Input panel — keys are case-sensitive.

Rate limits? Slack allows ~1 msg/sec per webhook. Add a Wait node for high-volume workflows.

Free workflow JSON

Webhook trigger → Slack notification, ready to import:

{
  "name": "Webhook to Slack Notification",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "slack-notify",
        "responseMode": "onReceived",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "authentication": "webhook",
        "webhookUrl": "YOUR_SLACK_WEBHOOK_URL",
        "resource": "message",
        "operation": "post",
        "text": "=Event: {{JSON.stringify($json)}}"
      },
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [500, 300]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [[{"node": "Slack", "type": "main", "index": 0}]]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

To import: Workflows → Import from clipboard in n8n. Replace YOUR_SLACK_WEBHOOK_URL with your own, then activate.


I keep a pack of 10+ pre-built n8n workflows (Slack alerts, Stripe receipts, CRM lead capture, scheduled reports) at pirateprentice.gumroad.com/l/sxcoe — $29 one-time, import and go.

What are you using n8n + Slack for? Drop it in the comments.

Top comments (1)

Collapse
 
pirateprentice profile image
Pirate Prentice

Quick note: the Slack node in n8n also supports OAuth2 (not just webhooks) — if you want to post to multiple channels dynamically or get richer message threading, the OAuth2 route gives you more control. The webhook approach above is faster to set up for single-channel use.

What workflows are you piping into Slack? Curious what people are actually monitoring.