{
  "name": "Newsletter summarization & briefing with Gmail, AI, Google Sheets & Email",
  "nodes": [
    {
      "id": "d8679432-116c-482e-b600-9b2f9150f31f",
      "name": "Memory3",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1696,
        192
      ]
    },
    {
      "id": "2dfc95ed-abb8-4962-adb7-0a63fa010d58",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2208,
        0
      ]
    },
    {
      "id": "b5a64548-1654-4908-8037-d9943d486c1a",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1424,
        192
      ]
    },
    {
      "id": "5e2cd214-e13b-476a-9029-2983deba5271",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        192,
        0
      ]
    },
    {
      "id": "6f833907-1e69-494a-9826-fe8f942946e2",
      "name": "Google Spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -32,
        0
      ]
    },
    {
      "id": "e40152a4-2b46-4794-9ade-8bcd21a145b1",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -240,
        0
      ]
    },
    {
      "id": "e22ec30e-1e7f-468f-8a13-1942d192e127",
      "name": "Parse HTML-Code",
      "type": "n8n-nodes-base.code",
      "position": [
        416,
        0
      ]
    },
    {
      "id": "63fa5ffb-dad9-486e-aadc-fc89569b0145",
      "name": "Split in Chunks",
      "type": "n8n-nodes-base.code",
      "position": [
        640,
        0
      ]
    },
    {
      "id": "086ea1bd-8075-4856-be16-0f9d83e9c7bc",
      "name": "Set Table Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        864,
        0
      ]
    },
    {
      "id": "d1676830-038e-418a-950a-8539ca9f1791",
      "name": "Append Row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1088,
        0
      ]
    },
    {
      "id": "a9ebbba4-06a6-4137-8fce-8c94c31b8597",
      "name": "Public Affairs Consultant",
      "type": "@n8n/n8n-nodes-langchain.code",
      "position": [
        1440,
        0
      ]
    },
    {
      "id": "16ecc421-cb56-4e37-b544-cb061b17ed31",
      "name": "Structure HTML-Mail",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        0
      ]
    },
    {
      "id": "82ec1fd7-354c-4115-b27e-0efe0c108b81",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -176
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "## Overview\n\n**Step 1:** Collect: Fetch ~10 newsletters from Gmail and strip HTML noise.\n**Step 2:** Organize: Chunk long texts (token-safe), log chunks + metadata to Google Sheets.\n**Step 3:** Summar"
      }
    },
    {
      "id": "68c78878-0678-4500-85cf-40e842090ff9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -240
      ],
      "parameters": {
        "width": 432,
        "height": 464,
        "content": "## Group A – Timing & Destination\n\n**When & where**\n• Runs daily at the set time.\n• Creates/updates a Google Sheet to store raw text + metadata.\n\nCustomize: Interval/time; sheet name/tab."
      }
    },
    {
      "id": "aa154741-1d13-4eba-ab88-0df4a5bc8ade",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -304
      ],
      "parameters": {
        "width": 1088,
        "height": 528,
        "content": "## Inbox, Pre-Clean & Chunking \n\n**Collect & sanitize**\n• Pulls the 10 target newsletters via Gmail query.\n• Removes HTML clutter, trackers, inline styles → clean plain text.\n\n**Customize:** Gmail que"
      }
    },
    {
      "id": "4a01fa46-b13f-4fe8-be15-2220af449f28",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        -304
      ],
      "parameters": {
        "width": 528,
        "height": 688,
        "content": "## LLM Policy Digest\n\n**Create the daily brief**\n• Merges chunks into one digest with: Top topics, EU/DE relevance, risks/opportunities, action items.\n• Memory saves content when you want to analyze t"
      }
    },
    {
      "id": "739d7e59-6b61-4436-a46f-2f88d2530a91",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        -208
      ],
      "parameters": {
        "width": 496,
        "height": 416,
        "content": "Build & Send Email \n\n**Deliver the digest**\n• Generates a clean HTML email (headline, TL;DR, bullets, sources).\n• Sends to the PA Director/team (add CC/BCC as needed).\nCustomize: Recipients, subject ,"
      }
    }
  ],
  "connections": {
    "Gmail": {
      "main": [
        [
          {
            "node": "Parse HTML-Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Memory3": {
      "ai_memory": [
        [
          {
            "node": "Public Affairs Consultant",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Append Row": {
      "main": [
        [
          {
            "node": "Public Affairs Consultant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse HTML-Code": {
      "main": [
        [
          {
            "node": "Split in Chunks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split in Chunks": {
      "main": [
        [
          {
            "node": "Set Table Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Google Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Table Fields": {
      "main": [
        [
          {
            "node": "Append Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Spreadsheet": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structure HTML-Mail": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Public Affairs Consultant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Public Affairs Consultant": {
      "main": [
        [
          {
            "node": "Structure HTML-Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}