{
  "id": "leDF96qh65pW1bug",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Daily AI News Digest with RSS, Llama 3.2 Summarization & Telegram Delivery",
  "tags": [],
  "nodes": [
    {
      "id": "5fb7ed54-fa74-480f-8734-9f150e359286",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "Execute the automation every day at midnight.",
      "position": [
        0,
        -260
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtMinute": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f3ac161c-a171-48f8-9f9d-f2ca6d6ee7ab",
      "name": "Select RSS Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        -260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fe60f39a-1ff5-4405-9f0f-4808c1e4410a",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "b8f3a32a-eb0a-4542-aa67-380a081d6401",
              "name": "creator",
              "type": "string",
              "value": "={{ $json.creator }}"
            },
            {
              "id": "270a0b42-a2cd-489d-8cef-48da5113ab75",
              "name": "pubDate",
              "type": "string",
              "value": "={{ $json.pubDate }}"
            },
            {
              "id": "1a1efa19-ee2c-4b71-9640-84bc8d20b31a",
              "name": "content",
              "type": "string",
              "value": "={{ $json.content }}"
            },
            {
              "id": "eaea5576-eead-49cb-8063-b4cf4b37d79a",
              "name": "link",
              "type": "string",
              "value": "={{ $json.link }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8cc95bda-5eac-4316-8933-8dc3bcfacca4",
      "name": "Filter Yesterday's News",
      "type": "n8n-nodes-base.filter",
      "position": [
        880,
        -260
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e9008b5f-8f75-4bef-b002-342a914807ee",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ new Date($json.pubDate).toISOString().slice(0,10) }}",
              "rightValue": "={{ $today.minus({ days:1 }).toISODate() }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b21de896-0f4b-4076-ab7f-0cccb4415a47",
      "name": "Send News Digest to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1916,
        -260
      ],
      "parameters": {
        "text": "=Hello!\u00a0 I have here one interesting summary for you:\n\n<b>Title:</b> {{ $json.Title }}\n<b>Author:</b> {{ $json.Author }}\n<b>Publication date:</b> {{ $json[\"Publication date\"] }}\n<b>News link:</b> {{ $json.Link }}\n<b>Summary:</b>\n{{ $json.Summary }}",
        "chatId": "",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false,
          "disable_notification": false,
          "disable_web_page_preview": true
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4925500c-27b4-4a3f-9681-d9c59626ae35",
      "name": "Summarize Article with Ollama",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1100,
        -135
      ],
      "parameters": {
        "text": "=Summarize this AI news in bullet points. Give only the result in this format:\n\n*\ud83d\udcf0 Title:* {{ $json.title }}\u00a0 \n*\u270d\ufe0f Author:* {{ $json.creator }}\u00a0 \n*\ud83d\udd17 Link:* {{ $json.link }}\u00a0 \n*\ud83e\udde0 Summary:* \n\nNews text:\u00a0 \n{{ $json.content }}",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "c942acb8-a8d9-4c23-a5c1-9c4eb25e0296",
      "name": "Ollama Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        1188,
        85
      ],
      "parameters": {
        "model": "llama3.2:1b",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "db3caaa4-9db7-47c5-acf7-91094d4c5638",
      "name": "RSS Read - ai-techpark",
      "type": "n8n-nodes-base.rssFeedRead",
      "notes": "Get news from this source via RSS.",
      "position": [
        220,
        -660
      ],
      "parameters": {
        "url": "https://ai-techpark.com/category/ai/feed/",
        "options": {
          "ignoreSSL": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8c4611d1-cd7a-45a8-b8a8-b130eb76a084",
      "name": "RSS Read - knowtechie",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        220,
        -460
      ],
      "parameters": {
        "url": "https://knowtechie.com/category/ai/feed/",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "c39528fd-0562-4c54-a0ae-063d5e7a716a",
      "name": "RSS Read - aibusiness",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        220,
        -260
      ],
      "parameters": {
        "url": "https://aibusiness.com/rss.xml",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "50fed843-a0dc-4d5f-ae62-0c4499bf5d1f",
      "name": "RSS Read - theguardian",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        220,
        -60
      ],
      "parameters": {
        "url": "https://www.theguardian.com/technology/artificialintelligenceai/rss",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "74a6191d-78b5-44b5-bb26-2763cef6c574",
      "name": "RSS Read - huggingface",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        220,
        140
      ],
      "parameters": {
        "url": "https://huggingface.co/blog/feed.xml",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "4f01ab90-0c3b-4f1c-861d-a7317580e8d5",
      "name": "Merge RSS Feeds",
      "type": "n8n-nodes-base.merge",
      "position": [
        440,
        -302
      ],
      "parameters": {
        "numberInputs": 5
      },
      "typeVersion": 3.2
    },
    {
      "id": "62884214-0a36-489f-906f-a13f363da91e",
      "name": "Combine Summary with Original Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1476,
        -260
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "f413a55b-1c77-466c-a23c-52f2c9178d51",
      "name": "Format Final Message Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1696,
        -260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "87c73153-b3d2-42df-915d-2a40845d422e",
              "name": "Title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "8227dcb1-7134-4661-a8f3-9db9e443b1b8",
              "name": "Author",
              "type": "string",
              "value": "={{ $json.creator }}"
            },
            {
              "id": "7a9da734-219e-4817-97df-569a4344cfb3",
              "name": "Publication date",
              "type": "string",
              "value": "={{ $json.pubDate }}"
            },
            {
              "id": "408d67c9-51e2-4d3d-83fd-68442d060601",
              "name": "Summary",
              "type": "string",
              "value": "={{ $json.text }}"
            },
            {
              "id": "2e36c66e-479a-4365-b038-84894d4aed3d",
              "name": "Link",
              "type": "string",
              "value": "={{ $json.link }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "de74a290-1bf0-46a9-9126-1ca4f0a37607",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -440
      ],
      "parameters": {
        "content": "## Trigger\nStart every day at 00:01 am"
      },
      "typeVersion": 1
    },
    {
      "id": "86fa4e8a-9daa-4ed9-ba35-1bd8c82ea070",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -440
      ],
      "parameters": {
        "content": "## Filter \nKeep only news of the day before"
      },
      "typeVersion": 1
    },
    {
      "id": "46718c2f-bd52-4d09-9154-7cc08d9374c5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -440
      ],
      "parameters": {
        "content": "## Send to Telegram\nSend news to Telegram"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "timezone": "Europe/Madrid",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "af635d36-a951-47da-9cc2-47e5c627562e",
  "connections": {
    "Ollama Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Article with Ollama",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge RSS Feeds": {
      "main": [
        [
          {
            "node": "Select RSS Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Read - knowtechie",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read - ai-techpark",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read - aibusiness",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read - theguardian",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read - huggingface",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select RSS Fields": {
      "main": [
        [
          {
            "node": "Filter Yesterday's News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read - aibusiness": {
      "main": [
        [
          {
            "node": "Merge RSS Feeds",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "RSS Read - knowtechie": {
      "main": [
        [
          {
            "node": "Merge RSS Feeds",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "RSS Read - ai-techpark": {
      "main": [
        [
          {
            "node": "Merge RSS Feeds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read - huggingface": {
      "main": [
        [
          {
            "node": "Merge RSS Feeds",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "RSS Read - theguardian": {
      "main": [
        [
          {
            "node": "Merge RSS Feeds",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Filter Yesterday's News": {
      "main": [
        [
          {
            "node": "Summarize Article with Ollama",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Summary with Original Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Final Message Fields": {
      "main": [
        [
          {
            "node": "Send News Digest to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send News Digest to Telegram": {
      "main": [
        []
      ]
    },
    "Summarize Article with Ollama": {
      "main": [
        [
          {
            "node": "Combine Summary with Original Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Combine Summary with Original Data": {
      "main": [
        [
          {
            "node": "Format Final Message Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}