workflow.jsonproductivityN8nv1.0

n8n: Email Digest to Slack

Poll Gmail every 15 minutes. Filter by label or sender. Post a digest to a Slack channel.

Setup time: ~10 min
Last updated: Mar 8, 2026
byFullVibeAIcontributor

Template

workflow.json
{
  "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. 1

    Copy the workflow JSON above.

  2. 2

    In n8n, go to Workflows and click Import.

  3. 3

    Paste the JSON and update credential references.

  4. 4

    Activate the workflow.

Import into n8n

This is an n8n workflow. Import it directly into your n8n instance.

  1. 1

    Open your n8n instance (localhost:5678 or your cloud URL).

  2. 2

    Go to Workflows and click the + New button.

  3. 3

    Click the three-dot menu in the top right, then select "Import from JSON".

  4. 4

    Paste the workflow JSON from the template above.

  5. 5

    Update any placeholder values (channel names, webhook URLs, credentials).

  6. 6

    Activate the workflow with the toggle in the top right.

# Alternatively, import via n8n CLI:
n8n import:workflow --input=workflow.json

Version History

v1.0Initial releaseMar 8, 2026

Framework

N8n

Requirements

Gmail (n8n node)
Slack (n8n node)

File type

workflow.json

Version

v1.0

Updated Mar 8, 2026

Contributor

FullVibeAI

Community submission

You might also like