{
  "name": "Curate and send weekly AI newsletters with Tavily, Gemini, and Gmail",
  "nodes": [
    {
      "id": "016c5451-563a-477e-8e22-b9d99e660ca5",
      "name": "Weekly schedule trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1680,
        624
      ]
    },
    {
      "id": "e2e4c91f-492d-41f0-9780-6004205ea4fe",
      "name": "Set newsletter config",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        624
      ]
    },
    {
      "id": "030cd0b3-9f5e-4c75-a489-b76f75bc097b",
      "name": "Generate newsletter content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3520,
        624
      ]
    },
    {
      "id": "1ea0bd18-8885-4812-b389-63e0bf557c7e",
      "name": "Send newsletter (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4144,
        624
      ]
    },
    {
      "id": "fae4711b-db62-4865-a3b3-7de0c80a62a4",
      "name": "Load email template",
      "type": "n8n-nodes-base.code",
      "position": [
        3264,
        624
      ]
    },
    {
      "id": "c421ab4e-b401-4430-ae32-d6eb84ae32c5",
      "name": "Build final email",
      "type": "n8n-nodes-base.code",
      "position": [
        3872,
        624
      ]
    },
    {
      "id": "b00176eb-82f0-45e3-af6a-11226a14a12c",
      "name": "Search company blog (Tavily)",
      "type": "@tavily/n8n-nodes-tavily.tavily",
      "position": [
        2224,
        768
      ]
    },
    {
      "id": "e51124a2-db62-4151-99d7-79387729c1ca",
      "name": "Search external news (Tavily)",
      "type": "@tavily/n8n-nodes-tavily.tavily",
      "position": [
        2224,
        512
      ]
    },
    {
      "id": "ac850d71-fe32-4c12-bc37-d28633304ff5",
      "name": "Combine search results",
      "type": "n8n-nodes-base.merge",
      "position": [
        2736,
        624
      ]
    },
    {
      "id": "d6d88dc5-b524-4f33-9e5d-616ad729503a",
      "name": "Aggregate all articles",
      "type": "n8n-nodes-base.code",
      "position": [
        2944,
        624
      ]
    },
    {
      "id": "fbc79854-e759-4886-9e0e-c3911d7aee4d",
      "name": "Gemini 1.5 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3392,
        832
      ]
    },
    {
      "id": "79cb9b73-39aa-4e3a-94c0-dd5890270186",
      "name": "Extract news results",
      "type": "n8n-nodes-base.set",
      "position": [
        2448,
        512
      ]
    },
    {
      "id": "3af5b005-ad64-4742-8c28-68dbd07b62ac",
      "name": "Extract blog results",
      "type": "n8n-nodes-base.set",
      "position": [
        2448,
        768
      ]
    },
    {
      "id": "ff3e458e-8fe7-44c6-881e-f73c07200344",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        448
      ],
      "parameters": {
        "width": 400,
        "height": 560,
        "content": "## How it works\nThis workflow automatically curates and sends a weekly AI newsletter by combining internal blog posts with external news.\n\n1. **Trigger** - Runs weekly on a schedule (configurable)\n2. "
      }
    },
    {
      "id": "582729d7-79ae-424a-b802-23ff191cb9de",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        400
      ],
      "parameters": {
        "width": 480,
        "height": 80,
        "content": "**Research Phase**\nSearches your blog and external news sources in parallel using Tavily"
      }
    },
    {
      "id": "5f3e80ea-6206-4127-989e-2520f4a08d10",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3376,
        512
      ],
      "parameters": {
        "width": 320,
        "height": 80,
        "content": "**AI Generation**\nGemini writes the newsletter content in structured HTML format"
      }
    },
    {
      "id": "cf72ee23-9ebf-4b2c-81f5-82daa592c642",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3776,
        512
      ],
      "parameters": {
        "width": 400,
        "height": 80,
        "content": "**Email Output**\nMerges AI content with HTML template and sends via Gmail"
      }
    }
  ],
  "connections": {
    "Gemini 1.5 Flash": {
      "ai_languageModel": [
        [
          {
            "node": "Generate newsletter content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Build final email": {
      "main": [
        [
          {
            "node": "Send newsletter (Gmail)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load email template": {
      "main": [
        [
          {
            "node": "Generate newsletter content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract blog results": {
      "main": [
        [
          {
            "node": "Combine search results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract news results": {
      "main": [
        [
          {
            "node": "Combine search results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set newsletter config": {
      "main": [
        [
          {
            "node": "Search external news (Tavily)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Search company blog (Tavily)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate all articles": {
      "main": [
        [
          {
            "node": "Load email template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine search results": {
      "main": [
        [
          {
            "node": "Aggregate all articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly schedule trigger": {
      "main": [
        [
          {
            "node": "Set newsletter config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate newsletter content": {
      "main": [
        [
          {
            "node": "Build final email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search company blog (Tavily)": {
      "main": [
        [
          {
            "node": "Extract blog results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search external news (Tavily)": {
      "main": [
        [
          {
            "node": "Extract news results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}