{
  "name": "Create weekly AI research briefings with Decodo, OpenAI, and Gmail",
  "nodes": [
    {
      "id": "0da43c80-0f67-49cc-a23b-b43502b41f83",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5776,
        -1488
      ],
      "parameters": {
        "width": 386,
        "height": 519,
        "content": "### How it works\nThis workflow automates the collection and analysis of AI/LLM research. It runs on a weekly schedule to:\n1. **Search:** Fetch the latest articles using the Decodo API.\n2. **Scrape:** "
      }
    },
    {
      "id": "62878aa3-dc4d-41d0-bd3b-b05462e19258",
      "name": "Section 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6176,
        -1328
      ],
      "parameters": {
        "width": 950,
        "height": 256,
        "content": "## 1. Search & Filter\nConfigure the search parameters, fetch results from Google via Decodo, and filter out non-article URLs (e.g., YouTube)."
      }
    },
    {
      "id": "389d463e-6da6-4d78-a402-771f11878e7d",
      "name": "Section 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7200,
        -1312
      ],
      "parameters": {
        "width": 900,
        "height": 592,
        "content": "## 2. Scrape & Sanitize\nLoop through each URL, download the raw HTML, and clean it to remove scripts/styles before passing to the LLM."
      }
    },
    {
      "id": "9c87b6e3-05d2-486a-8d74-1552ab66269a",
      "name": "Section 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8176,
        -1344
      ],
      "parameters": {
        "width": 480,
        "height": 480,
        "content": "## 3. Summarize Content\nGenerate concise, dense summaries for each individual article using an LLM Chain."
      }
    },
    {
      "id": "1b10ef37-abe3-4a5a-aa8d-0a4a9f78779d",
      "name": "Section 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8720,
        -1344
      ],
      "parameters": {
        "width": 1000,
        "height": 480,
        "content": "## 4. Analyze & Report\nAn AI Agent reviews all summaries, ranks them by relevance, and sends the final email report."
      }
    },
    {
      "id": "4a88cfde-00ef-466f-80e3-f244241c838f",
      "name": "Weekly Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        6208,
        -1232
      ]
    },
    {
      "id": "8467ff7c-d60a-46f1-8daa-94d895dcd0f3",
      "name": "Filter & Parse URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        7024,
        -1232
      ]
    },
    {
      "id": "f0fa2db8-c14c-4e98-925a-324ccb94610b",
      "name": "Batch Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        7232,
        -1232
      ]
    },
    {
      "id": "a9f2008f-883a-489f-8934-a162c5ff0166",
      "name": "Sanitize HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        7936,
        -1120
      ]
    },
    {
      "id": "70fe01b3-73ec-41c5-a8cc-f5f512063e59",
      "name": "Summarize Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        8208,
        -1248
      ]
    },
    {
      "id": "9975d7e1-6e4f-434b-b74b-e26f03320f6f",
      "name": "Aggregate Summaries",
      "type": "n8n-nodes-base.code",
      "position": [
        8544,
        -1248
      ]
    },
    {
      "id": "033d4d93-d8f3-4eb1-b843-94fc0bf7138e",
      "name": "Research Analyst Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        9136,
        -1248
      ]
    },
    {
      "id": "bf883fd6-ee8c-4bb5-ae8c-747c3bef9545",
      "name": "Send Email (Report)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        9584,
        -1248
      ]
    },
    {
      "id": "466aa3a8-93ba-480a-abab-a151baecba40",
      "name": "Search API (Decodo)",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        6832,
        -1232
      ]
    },
    {
      "id": "161455d9-906d-4492-8a64-f9c4e3e7f29b",
      "name": "Scrape Content (Decodo)",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        7376,
        -1120
      ]
    },
    {
      "id": "9774fd35-6fe5-449e-adfc-c13a49fcbd82",
      "name": "Set Search Config",
      "type": "n8n-nodes-base.set",
      "position": [
        6448,
        -1232
      ]
    },
    {
      "id": "b92d812a-ee0a-4e69-98c1-2cdba7cfb437",
      "name": "Check Content Quality",
      "type": "n8n-nodes-base.if",
      "position": [
        7600,
        -1104
      ]
    },
    {
      "id": "f267c3b2-6a23-4aed-a97c-bb91b8fdb56a",
      "name": "OpenAI Model (Summary)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        8208,
        -1040
      ]
    },
    {
      "id": "150b5b6b-cfc1-4cc9-8b2f-623f9cd4a81f",
      "name": "Check Results Exist",
      "type": "n8n-nodes-base.if",
      "position": [
        8752,
        -1248
      ]
    },
    {
      "id": "a44050d8-28b8-4da0-b907-9631058f8c3d",
      "name": "Send Email (Empty)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        8864,
        -1072
      ]
    },
    {
      "id": "11719afc-dcc6-4435-a212-574152fe9a2b",
      "name": "OpenAI Model (Agent)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9136,
        -1024
      ]
    },
    {
      "id": "795a8aae-0023-4a07-8d64-4dcdc47cb821",
      "name": "Telegram Error Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        7664,
        -864
      ]
    }
  ],
  "connections": {
    "Batch Loop": {
      "main": [
        [
          {
            "node": "Summarize Chain",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Scrape Content (Decodo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize HTML": {
      "main": [
        [
          {
            "node": "Batch Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Trigger": {
      "main": [
        [
          {
            "node": "Set Search Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Chain": {
      "main": [
        [
          {
            "node": "Aggregate Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Config": {
      "main": [
        [
          {
            "node": "Search API (Decodo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Summaries": {
      "main": [
        [
          {
            "node": "Check Results Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Results Exist": {
      "main": [
        [
          {
            "node": "Research Analyst Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email (Empty)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter & Parse URLs": {
      "main": [
        [
          {
            "node": "Batch Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search API (Decodo)": {
      "main": [
        [
          {
            "node": "Filter & Parse URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model (Agent)": {
      "ai_languageModel": [
        [
          {
            "node": "Research Analyst Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Content Quality": {
      "main": [
        [
          {
            "node": "Sanitize HTML",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model (Summary)": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Research Analyst Agent": {
      "main": [
        [
          {
            "node": "Send Email (Report)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Content (Decodo)": {
      "main": [
        [
          {
            "node": "Check Content Quality",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}