{
  "name": "Daily news digest from RSS and YouTube using AI for Telegram",
  "nodes": [
    {
      "id": "a6b1fbdc-2d05-49b4-bf26-3c1dd6cf2d92",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -496,
        -96
      ]
    },
    {
      "id": "069ba213-9d37-4262-b79f-de447bdcf064",
      "name": "RSS Feed Read (TechCrunch)",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -208,
        -384
      ]
    },
    {
      "id": "4be9bbdd-8e45-4eab-bd19-a9d640730edc",
      "name": "RSS Feed Read (The Verge)",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -208,
        -192
      ]
    },
    {
      "id": "d699416f-d446-4c93-8cb6-cd3a82aec355",
      "name": "Merge - Tech (Append)",
      "type": "n8n-nodes-base.merge",
      "position": [
        48,
        -288
      ]
    },
    {
      "id": "276f62c2-69a7-4f30-8fc0-c96d187720c5",
      "name": "Code - Clean & Dedup (newsContext)",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        -96
      ]
    },
    {
      "id": "fab7cfbf-1b3f-4579-9111-239af2f8da4e",
      "name": "YouTube - Search (Latest 24h)",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -208,
        224
      ]
    },
    {
      "id": "2531e648-ab2a-4dc7-b130-7f30872843ac",
      "name": "Merge - Add YouTube (Append)",
      "type": "n8n-nodes-base.merge",
      "position": [
        720,
        -96
      ]
    },
    {
      "id": "cef6ff91-7995-4e39-8a65-1ec9b38a3b1a",
      "name": "Code - YouTube Normalize + Filter",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        224
      ]
    },
    {
      "id": "1c33a22a-aa9f-4cd2-bc01-6c033e15ea05",
      "name": "Set - Mark RSS",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        -112
      ]
    },
    {
      "id": "27f323b2-af06-4321-a498-fbe4e46fe432",
      "name": "Set - Mark YouTube",
      "type": "n8n-nodes-base.set",
      "position": [
        496,
        224
      ]
    },
    {
      "id": "a84e7155-1591-4000-94a2-2982a116f3c3",
      "name": "Google Gemini Chat (AI Analysis)",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1168,
        -96
      ]
    },
    {
      "id": "b5e21b3a-2f50-4437-aeb9-297d685319e1",
      "name": "Code - Robust Parser (Gemini JSON)",
      "type": "n8n-nodes-base.code",
      "position": [
        1488,
        -96
      ]
    },
    {
      "id": "acecf9dc-e3f6-4e55-b69c-9f45b6b6dbcd",
      "name": "Telegram - Send Briefing Text",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2016,
        -96
      ]
    },
    {
      "id": "a8477a99-b8a2-412b-8413-2ab509743f06",
      "name": "HTTP - OpenAI TTS (speech)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        224
      ]
    },
    {
      "id": "98377e3d-ec07-4b77-ad1a-fc7dc3106ffe",
      "name": "Telegram - Send Briefing Audio",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2016,
        224
      ]
    },
    {
      "id": "e6b67eae-8d2f-45e4-aab3-c7f3e1d29dfc",
      "name": "Code - Fix Audio Meta (filename + mime)",
      "type": "n8n-nodes-base.code",
      "position": [
        1744,
        224
      ]
    },
    {
      "id": "62b3256d-d14b-43c8-a9d5-a0daa724d841",
      "name": "Code - Build TTS Payload (OpenAI)",
      "type": "n8n-nodes-base.code",
      "position": [
        1744,
        32
      ]
    },
    {
      "id": "6fb4d594-8bbb-42b8-aff2-24e74dec3f96",
      "name": "RSS Feed Read (BBC World)",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -208,
        32
      ]
    },
    {
      "id": "d4caa68b-01fd-4c6c-8c0c-841c49ab99db",
      "name": "Merge - Add BBC World (Append)",
      "type": "n8n-nodes-base.merge",
      "position": [
        272,
        -112
      ]
    },
    {
      "id": "c8afa7c8-7490-4e81-9a81-0192884b1459",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -304
      ],
      "parameters": {
        "width": 512,
        "height": 704,
        "content": "## Daily News Digest: Text & Audio Briefing\nThis workflow automates your morning news routine by aggregating content from RSS feeds and YouTube, curating it with AI, and delivering a text summary plus"
      }
    },
    {
      "id": "3eb9ba99-6666-4969-8237-e3bf9b1d24e5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -480
      ],
      "parameters": {
        "width": 496,
        "height": 896,
        "content": "## 1. Input Sources\nFetches data from multiple sources.\n*Tip: Replace these RSS URLs and YouTube keywords to match your personal interests.*"
      }
    },
    {
      "id": "f7c33d4b-2d2a-45c5-94db-db784daff802",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -400
      ],
      "parameters": {
        "width": 1040,
        "height": 816,
        "content": "## 2. Data Preparation\nCleans HTML tags, deduplicates repeated articles, and mixes sources based on a defined ratio."
      }
    },
    {
      "id": "48ba11b1-9cc6-4aba-8f30-846bafd213de",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -224
      ],
      "parameters": {
        "width": 512,
        "height": 640,
        "content": "## 3. AI Analysis\nGemini curates the top stories.\n*Tip: Edit the Prompt in the Gemini node to change the item count (e.g., 10 vs 20) or max character limit.*"
      }
    },
    {
      "id": "9a59bebf-0f1b-479f-a594-e8301d51fd42",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        -224
      ],
      "parameters": {
        "width": 512,
        "height": 640,
        "content": "## 4. Audio Generation & Delivery\nConverts the script to speech (MP3) via OpenAI and delivers the full briefing to Telegram."
      }
    },
    {
      "id": "623a44a1-7ef5-4465-b789-a9f34d54fbab",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1968,
        80
      ],
      "parameters": {
        "width": 208,
        "height": 128,
        "content": "### ⚠️ Check Chat ID\nEnsure `TELEGRAM_CHAT_ID` is set in your Global Variables, or the message will fail to send."
      }
    }
  ],
  "connections": {
    "Set - Mark RSS": {
      "main": [
        [
          {
            "node": "Merge - Add YouTube (Append)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Feed Read (TechCrunch)",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Feed Read (The Verge)",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Feed Read (BBC World)",
            "type": "main",
            "index": 0
          },
          {
            "node": "YouTube - Search (Latest 24h)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set - Mark YouTube": {
      "main": [
        [
          {
            "node": "Merge - Add YouTube (Append)",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge - Tech (Append)": {
      "main": [
        [
          {
            "node": "Merge - Add BBC World (Append)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Read (BBC World)": {
      "main": [
        [
          {
            "node": "Merge - Add BBC World (Append)",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "RSS Feed Read (The Verge)": {
      "main": [
        [
          {
            "node": "Merge - Tech (Append)",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "HTTP - OpenAI TTS (speech)": {
      "main": [
        [
          {
            "node": "Code - Fix Audio Meta (filename + mime)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Read (TechCrunch)": {
      "main": [
        [
          {
            "node": "Merge - Tech (Append)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge - Add YouTube (Append)": {
      "main": [
        [
          {
            "node": "Code - Clean & Dedup (newsContext)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram - Send Briefing Text": {
      "main": [
        []
      ]
    },
    "YouTube - Search (Latest 24h)": {
      "main": [
        [
          {
            "node": "Code - YouTube Normalize + Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge - Add BBC World (Append)": {
      "main": [
        [
          {
            "node": "Set - Mark RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat (AI Analysis)": {
      "main": [
        [
          {
            "node": "Code - Robust Parser (Gemini JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Build TTS Payload (OpenAI)": {
      "main": [
        [
          {
            "node": "HTTP - OpenAI TTS (speech)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - YouTube Normalize + Filter": {
      "main": [
        [
          {
            "node": "Set - Mark YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Clean & Dedup (newsContext)": {
      "main": [
        [
          {
            "node": "Google Gemini Chat (AI Analysis)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Robust Parser (Gemini JSON)": {
      "main": [
        [
          {
            "node": "Code - Build TTS Payload (OpenAI)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Telegram - Send Briefing Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Fix Audio Meta (filename + mime)": {
      "main": [
        [
          {
            "node": "Telegram - Send Briefing Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}