{
  "name": "Daily inbox summary to Slack",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "96ffbd1d-0238-51ef-88cb-8d751b34779b",
      "name": "Every day at 08:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 50,
        "filters": {
          "q": "newer_than:1d in:inbox"
        }
      },
      "id": "c77bc36b-3597-5bf8-a8d9-f8e86a066590",
      "name": "Get yesterday's emails",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        420,
        300
      ]
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "emails",
        "options": {}
      },
      "id": "48a1a4f2-7e91-5258-9f89-110d07e4163d",
      "name": "Combine emails",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        640,
        300
      ]
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "=Summarize these emails in 5 bullet points. Put anything that needs a reply from me first. Skip newsletters and receipts.\n\n{{ $json.emails.map(e => '- From: ' + e.From + ' | Subject: ' + e.Subject + ' | ' + e.snippet).join('\\n') }}"
            }
          ]
        },
        "options": {}
      },
      "id": "5f1dc1d6-306b-53fc-8864-c42e4c3d4dee",
      "name": "Summarize with AI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        860,
        300
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#general",
          "mode": "name"
        },
        "text": "=*Your inbox, last 24 hours*\n{{ $json.message.content }}",
        "otherOptions": {}
      },
      "id": "436249b1-bd37-54ca-bd63-a1244eb80c82",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        1080,
        300
      ]
    },
    {
      "parameters": {
        "content": "## Draft, not yet tested\nThis workflow was written by Automation Recipes and has NOT been run end to end yet.\n\nAfter importing: open each node, connect your own accounts (credentials), and fill in anything left blank (sheet URL, Slack channel, label names). Then run it once by hand with test data before turning it on.",
        "height": 260,
        "width": 420
      },
      "id": "3be1353a-3427-599a-9e4e-86447470c6e0",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        20
      ]
    }
  ],
  "connections": {
    "Every day at 08:00": {
      "main": [
        [
          {
            "node": "Get yesterday's emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get yesterday's emails": {
      "main": [
        [
          {
            "node": "Combine emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine emails": {
      "main": [
        [
          {
            "node": "Summarize with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize with AI": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}