n8n: Email Digest to Slack
Poll Gmail every 15 minutes. Filter by label or sender. Post a digest to a Slack channel.
Template
{
"name": "Email Digest to Slack",
"nodes": [
{
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": { "interval": [{ "field": "minutes", "minutesInterval": 15 }] }
}
},
{
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"parameters": {
"operation": "getAll",
"filters": {
"labelIds": ["INBOX"],
"readStatus": "unread",
"receivedAfter": "={{ $now.minus(15, 'minutes').toISO() }}"
},
"limit": 20
}
},
{
"name": "Filter Important",
"type": "n8n-nodes-base.filter",
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.labelIds.join(',') }}",
"operation": "contains",
"value2": "IMPORTANT"
}
]
}
}
},
{
"name": "Format Digest",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "const emails = items.map(i => `• ${i.json.subject} — ${i.json.from}`).join('\n'); return [{ json: { text: `*Email digest (last 15 min):*\n${emails || 'Nothing important.'}` } }];"
}
},
{
"name": "Slack",
"type": "n8n-nodes-base.slack",
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#email-digest",
"text": "={{ $json.text }}"
}
}
],
"connections": {
"Schedule Trigger": { "main": [[{ "node": "Gmail" }]] },
"Gmail": { "main": [[{ "node": "Filter Important" }]] },
"Filter Important": { "main": [[{ "node": "Format Digest" }]] },
"Format Digest": { "main": [[{ "node": "Slack" }]] }
}
}Setup
- 1
Copy the workflow JSON above.
- 2
In n8n, go to Workflows and click Import.
- 3
Paste the JSON and update credential references.
- 4
Activate the workflow.
Import into n8n
This is an n8n workflow. Import it directly into your n8n instance.
- 1
Open your n8n instance (localhost:5678 or your cloud URL).
- 2
Go to Workflows and click the + New button.
- 3
Click the three-dot menu in the top right, then select "Import from JSON".
- 4
Paste the workflow JSON from the template above.
- 5
Update any placeholder values (channel names, webhook URLs, credentials).
- 6
Activate the workflow with the toggle in the top right.
# Alternatively, import via n8n CLI:
n8n import:workflow --input=workflow.jsonVersion History
Framework
N8nRequirements
File type
Version
Updated Mar 8, 2026
You might also like
Email Triage Bot
Scan your inbox every morning. Flag what matters, summarize the rest.
~$0.30/day · ~5 min setup
Daily Standup Reporter
Generate standup reports from git, calendar, and tasks. Post to your team channel.
~$0.15/day · ~5 min setup
Calendar Prep
Brief you on upcoming meetings with context from email and docs.
~$0.25/day · ~5 min setup