{
  "name": "Daily News AI Agent",
  "nodes": [
    {
      "parameters": {},
      "id": "d42b4e2d-87f4-4a0e-a6c3-ab1b3501bcfa",
      "name": "Merge GNews & NewsAPI",
      "type": "n8n-nodes-base.merge",
      "position": [
        1960,
        560
      ],
      "typeVersion": 3.1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "id": "5dfacf8a-25d4-43fd-9b96-a34eeed45d39",
      "name": "GPT-4.1 Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2260,
        720
      ],
      "typeVersion": 1.2,
      "credentials": {
        "openAiApi": {
          "id": "QivR7SxB24l8KozV",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "chatId": "5991557141",
        "text": "={{ $json.output }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "id": "7a742531-4a08-408e-8b2c-558be75c1a8f",
      "name": "Send summary to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2620,
        560
      ],
      "webhookId": "21eb8e1c-87de-45af-888d-699fbd443bc8",
      "typeVersion": 1.2,
      "credentials": {
        "telegramApi": {
          "id": "3G1bf5W5dRCTRZtN",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "articles",
              "type": "string",
              "value": "={{ $json.articles }}",
              "id": "f030ab1f-df47-49fd-9a2e-020622f8a8f6"
            }
          ]
        },
        "options": {}
      },
      "id": "3cd42b1a-348a-486d-8217-592ce2b35e6c",
      "name": "Map to articles",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        460
      ],
      "typeVersion": 3.4
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "articles",
              "type": "string",
              "value": "={{ $json.articles }}"
            }
          ]
        },
        "options": {}
      },
      "id": "40692e2f-9289-448b-a5cb-ce4846b20264",
      "name": "Map to articles1",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        660
      ],
      "typeVersion": 3.4
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=** Select Top Articles **\nFrom {{$json.articles}}, choose the 15 most relevant articles related to finances advancements, tools, research, and applications.\n\n** Summarize Clearly **\nWrite in clear, professional, and readable language, summarizing the main point of each article in 1-2 short sentences.\n\n** Include Links **\nAfter each summary, add the article's URL for readers to explore more.\n\n** Add the Date **\nBegin the summary with today’s date:\n{{ $now.format('yyyy/MM/dd') }}\n",
        "options": {
          "systemMessage": "** Output Format **\nOnly return the summary in plain text – no explanations or additional formatting. Keep the response up to 2000 characters"
        }
      },
      "id": "430c8ddc-948e-4770-b816-591c6c43c617",
      "name": "AI News Summarizer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2240,
        560
      ],
      "typeVersion": 1.8
    },
    {
      "parameters": {
        "url": "https://gnews.io/api/v4/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "Finances"
            },
            {
              "name": "lang",
              "value": "en"
            },
            {
              "name": "apikey"
            }
          ]
        },
        "options": {}
      },
      "id": "d2a13562-9f21-4f99-8698-d5ba58245b02",
      "name": "Get GNews articles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        460
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "url": "https://newsapi.org/v2/everything",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "Finances"
            },
            {
              "name": "language",
              "value": "en"
            },
            {
              "name": "sortBy",
              "value": "publishedAt"
            },
            {
              "name": "pageSize",
              "value": "20"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key"
            }
          ]
        },
        "options": {}
      },
      "id": "0895bda6-5268-4454-a49f-732a3025947b",
      "name": "Get NewsAPI articles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        660
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "id": "9de68856-a2e1-4b06-a738-92e8db23f9ea",
      "name": "Trigger Every Day at 10am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        940,
        560
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "content": "## Get the Most Recent Articles",
        "height": 540,
        "width": 640
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1240,
        360
      ],
      "id": "735eae37-2887-4cc2-8c35-758779694b71",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Create Summarizon & Send via Telegram",
        "height": 540,
        "width": 720,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2140,
        360
      ],
      "id": "94be9803-fe0b-43fd-8236-ceff01ab31a2",
      "name": "Sticky Note1"
    }
  ],
  "pinData": {},
  "connections": {
    "GPT-4.1 Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI News Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge GNews & NewsAPI": {
      "main": [
        [
          {
            "node": "AI News Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map to articles": {
      "main": [
        [
          {
            "node": "Merge GNews & NewsAPI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map to articles1": {
      "main": [
        [
          {
            "node": "Merge GNews & NewsAPI",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "AI News Summarizer": {
      "main": [
        [
          {
            "node": "Send summary to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get GNews articles": {
      "main": [
        [
          {
            "node": "Map to articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get NewsAPI articles": {
      "main": [
        [
          {
            "node": "Map to articles1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Every Day at 10am": {
      "main": [
        [
          {
            "node": "Get GNews articles",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get NewsAPI articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "06415037-8fe7-44c6-87b3-c263f9297e3c",
  "meta": {
    "templateId": "3596",
    "instanceId": "f96a7e8659163312cbaf16ad76688747ea79fa6bf8e4ec720c14444abdf2c12c"
  },
  "id": "q4sZKIPPJ6bxCJV4",
  "tags": []
}