The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Email to Slack",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"mailbox": "INBOX",
"options": {
"customEmailConfig": "UNSEEN"
}
},
"id": "email-trigger",
"name": "Email Trigger",
"type": "n8n-nodes-base.emailTrigger",
"typeVersion": 1,
"position": [
250,
300
],
"credentials": {
"imap": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "={{ $json.from }}",
"rightValue": "urgent|important|alert",
"operator": {
"type": "string",
"operation": "regex"
}
}
]
},
"renameOutput": true,
"outputKey": "urgent"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "={{ $json.subject }}",
"rightValue": "invoice|payment|order",
"operator": {
"type": "string",
"operation": "regex"
}
}
]
},
"renameOutput": true,
"outputKey": "business"
}
]
}
},
"id": "switch-node",
"name": "Filter Rules",
"type": "n8n-nodes-base.switch",
"typeVersion": 2,
"position": [
450,
300
]
},
{
"parameters": {
"jsCode": "// Format email for Slack\nconst email = $input.first().json;\nconst branch = $branchName; // 'urgent' or 'business'\n\n// Emoji based on type\nconst emoji = branch === 'urgent' ? '\ud83d\udea8' : '\ud83d\udcbc';\n\n// Channel based on type\nconst channel = branch === 'urgent' ? '#alerts' : '#notifications';\n\n// Truncate preview\nconst preview = email.text?.substring(0, 200) || 'No preview available';\n\nreturn {\n channel: channel,\n text: `${emoji} *New Important Email*,\n blocks: [\n {\n type: 'header',\n text: {\n type: 'plain_text',\n text: `${emoji} New Important Email`\n }\n },\n {\n type: 'section',\n fields: [\n {\n type: 'mrkdwn',\n text: `*From:*\\n${email.from}`\n },\n {\n type: 'mrkdwn',\n text: `*Subject:*\\n${email.subject}`\n }\n ]\n },\n {\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `*Preview:*\\n${preview}${email.text?.length > 200 ? '...' : ''}`\n }\n },\n {\n type: 'context',\n elements: [\n {\n type: 'mrkdwn',\n text: `\ud83d\udcc5 ${new Date(email.date).toLocaleString()}`\n }\n ]\n },\n {\n type: 'actions',\n elements: [\n {\n type: 'button',\n text: {\n type: 'plain_text',\n text: 'Reply'\n },\n url: `mailto:${email.from}?subject=Re: ${email.subject}`\n }\n ]\n }\n ],\n originalEmail: email\n};"
},
"id": "format-node",
"name": "Format Message",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
300
]
},
{
"parameters": {
"channel": "={{ $json.channel }}",
"text": "={{ $json.text }}",
"blocks": "={{ $json.blocks }}",
"otherOptions": {}
},
"id": "slack-node",
"name": "Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [
850,
300
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Email Trigger": {
"main": [
[
{
"node": "Filter Rules",
"type": "main",
"index": 0
}
]
]
},
"Filter Rules": {
"main": [
[
{
"node": "Format Message",
"type": "main",
"index": 0
}
],
[
{
"node": "Format Message",
"type": "main",
"index": 0
}
]
]
},
"Format Message": {
"main": [
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 0,
"updatedAt": "2026-03-02T19:00:00.000Z",
"versionId": "1"
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
imapslackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Email to Slack. Uses emailTrigger, slack. Event-driven trigger; 4 nodes.
Source: https://github.com/kcurtet/n8n-workflows/blob/4c219a8a1bf2c2d5f89cf34542ce0f5b26c870ef/templates/email-to-slack/workflow.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Webhook Slack. Uses theHiveProjectTrigger, stickyNote, httpRequest, theHiveProject. Event-driven trigger; 63 nodes.
Key Features: Direct Case Management: Modify case details such as assignee, severity, status, and more through intuitive form inputs embedded within Slack messages. Seamless Integration: Assumes match
Transform your lead list into an AI-powered calling machine. This workflow automates your entire cold calling process using Vapi's conversational AI to initiate calls, qualify leads, capture detailed
Type in Slack. Walk away. Get a professional PDF report and a structured Excel fix sheet delivered to Google Drive and posted back in your Slack thread — fully automated, zero manual work.
This workflow automates the full company enrichment pipeline: Simply import CSV company lists to Slack and save time on enrichment and CRM maintenance. It processes uploaded files, extracts company do