{
  "name": "Send a daily media briefing email with GPT-4.1-mini, NewsAPI, Gmail and Google Sheets",
  "nodes": [
    {
      "id": "ddfd0955-d4e7-4c41-a3dd-40fe8cc0ede0",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        912,
        416
      ]
    },
    {
      "id": "648120da-cf8c-48f4-86e3-8232975f1029",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        192
      ],
      "parameters": {
        "width": 784,
        "height": 560,
        "content": "Handling historic data"
      }
    },
    {
      "id": "bddc9400-d036-41d3-938f-4922fb6d2a2c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        192
      ],
      "parameters": {
        "width": 672,
        "height": 560,
        "content": "Setup"
      }
    },
    {
      "id": "87d045d2-bb8f-4935-b322-d6594ebf4d5e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        192
      ],
      "parameters": {
        "width": 576,
        "height": 560,
        "content": "Analysis & deep-dive"
      }
    },
    {
      "id": "79ec0cf5-4c62-480f-aab1-4afd6bcf9aed",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        192
      ],
      "parameters": {
        "width": 432,
        "height": 560,
        "content": "Output"
      }
    },
    {
      "id": "06fb6b77-b64d-4aff-926b-e793e1cbc504",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        432
      ]
    },
    {
      "id": "a67dcfb0-2416-4edc-b289-de9b0f4cd4ce",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        992,
        624
      ]
    },
    {
      "id": "6733b6e1-cd76-446f-ad96-15da84ad5447",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1152,
        624
      ]
    },
    {
      "id": "cfcdc9f8-4918-4235-9683-560ba8fa6381",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -256
      ],
      "parameters": {
        "width": 662,
        "height": 416,
        "content": "# How this works\nThis workflow finds articles, summarizes them and sends the findings via email. Therefore, it saves roughly **1 hour** of article research & writing the summary, deep-diving a topic w"
      }
    },
    {
      "id": "4fa3c66a-0847-4ae8-8486-7d08eaf05efc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        192
      ],
      "parameters": {
        "width": 416,
        "height": 560,
        "content": "Fetch news article"
      }
    },
    {
      "id": "f92b3f43-f8f9-4d27-8591-a79e893ada2d",
      "name": "Fetch news articles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -336,
        400
      ]
    },
    {
      "id": "c42414ee-0218-4058-b756-a5f04509f459",
      "name": "Set user config",
      "type": "n8n-nodes-base.set",
      "position": [
        -560,
        400
      ]
    },
    {
      "id": "62ed3d26-9631-4f3f-a4c8-89d0b379322e",
      "name": "Format date",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        -704,
        400
      ]
    },
    {
      "id": "cab2839d-6af2-46e8-8aa1-2690122f1ec4",
      "name": "Set timeframe to last 2 days",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        -864,
        400
      ]
    },
    {
      "id": "247fada4-7c40-4e93-9fdb-885be6cb60c2",
      "name": "Trigger daily",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1040,
        400
      ]
    },
    {
      "id": "1a1c1257-f62b-46bc-b452-5a9e9ebca5de",
      "name": "Understand number of results",
      "type": "n8n-nodes-base.set",
      "position": [
        -144,
        400
      ]
    },
    {
      "id": "25e252bf-a800-42be-805d-4efbb4d8c876",
      "name": "Get historic values from Google Sheets",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        288
      ]
    },
    {
      "id": "05eebaa8-2133-47cf-be43-3a7e24d1b309",
      "name": "Get Google Sheets data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        272
      ]
    },
    {
      "id": "8f605529-99f6-4c3e-9d54-7e08f59aaea0",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        528
      ]
    },
    {
      "id": "8c578dee-16f9-4734-8729-bc2d3012a807",
      "name": "Calculate average results",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        240
      ]
    },
    {
      "id": "68c7b72c-648d-49c5-b1b2-ef1c13541c3c",
      "name": "Topic deep-dive",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1296,
        624
      ]
    },
    {
      "id": "c6cd778e-d2a0-46bc-b4e0-1408d0eb70e1",
      "name": "Send the email (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1680,
        432
      ]
    },
    {
      "id": "7358cb03-7929-484b-8aa4-3e30824aeabe",
      "name": "Strip message before sending",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        432
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Strip message before sending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format date": {
      "main": [
        [
          {
            "node": "Set user config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Trigger daily": {
      "main": [
        [
          {
            "node": "Set timeframe to last 2 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set user config": {
      "main": [
        [
          {
            "node": "Fetch news articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Topic deep-dive": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch news articles": {
      "main": [
        [
          {
            "node": "Understand number of results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google Sheets data": {
      "main": [
        [
          {
            "node": "Get historic values from Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate average results": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Set timeframe to last 2 days": {
      "main": [
        [
          {
            "node": "Format date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Strip message before sending": {
      "main": [
        [
          {
            "node": "Send the email (Gmail)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Understand number of results": {
      "main": [
        [
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Google Sheets data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get historic values from Google Sheets": {
      "main": [
        [
          {
            "node": "Calculate average results",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    }
  }
}