To connect n8n to Slack, follow these steps to set up the integration and start automating workflows with Slack messages, events, or notifications.
✅ Step 1: Create a Slack App
Go to Slack API.
Click "Create New App".
Choose:
Click Create App.
✅ Step 2: Add OAuth Scopes
In the left sidebar, go to "OAuth & Permissions".
Scroll to "Scopes":
Click Install App to Workspace.
Allow permissions and copy the Bot User OAuth Token (starts with xoxb-).
✅ Step 3: Configure Slack Credentials in n8n
Go to your n8n dashboard.
Click Credentials > New Credential > Search for Slack OAuth2 API.
Fill in:
Client ID – from Slack App settings
Client Secret – from Slack App settings
Access Token – paste the xoxb- token
Save the credentials.
✅ Step 4: Create Your First Slack Workflow in n8n
Go to Workflows > New Workflow.
Add a Trigger node (e.g., Webhook or Cron).
Add a Slack node:
Select Operation: Post Message
Choose your Slack credentials
Set the channel and message
Connect the nodes and Execute workflow or Activate.
🎯 Example Use Case
Send a message to Slack when a webhook is triggered:
- Trigger: Webhook node listens to a form submission.
- Action: Slack node posts
“New form submitted!” to a selected channel.
🛠️ Optional: Use Slack Trigger (Events API)
If you want Slack to trigger workflows:
In your Slack App, go to Event Subscriptions.
Enable and enter your n8n Webhook URL.
Subscribe to events like:
Note: You'll need to verify the endpoint challenge using n8n's Webhook node.
Here’s a sample n8n workflow that sends a Slack message when a webhook is triggered. This is useful for notifications, alerts, or form submissions.
📦 Sample Workflow: Webhook → Slack Message
🔗 Use Case:
When someone accesses a webhook URL (like from a form or another app), n8n sends a custom message to a Slack channel.
🧩 JSON to Import
Copy this and import it into your n8n editor:
{
"nodes": [
{
"parameters": {
"path": "send-to-slack",
"responseMode": "onReceived"
},
"id": "Webhook",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "webhook-slack-test"
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#general",
"text": "🚀 A new event just triggered this Slack message!",
"attachments": []
},
"id": "Slack",
"name": "Send to Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [550, 300],
"credentials": {
"slackApi": "YOUR_SLACK_CREDENTIAL_NAME"
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Send to Slack",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"name": "Webhook to Slack",
"tags": []
}
✅ Steps After Importing
- Replace
YOUR_SLACK_CREDENTIAL_NAME with the name of your saved Slack credentials in n8n.
- Replace General` with your actual channel name.
- Activate the workflow.
- Open the Webhook node and copy the Test URL or Production URL.
- Test the workflow by visiting the URL in a browser or sending a
POST request (e.g. using Postman or curl).