{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c5091fb1-5bc5-44bc-b804-201d5ffe0672",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2120,
        -40
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "60424e56-7429-48c5-831c-056e9874b8a3",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1560,
        -40
      ],
      "parameters": {
        "text": "=You are act as news expert and collect all news headlines  in below and summarise in 5 bullets.\n\n\n {{ $json.articles[1].title }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "2bd28b32-80f9-4a69-9b1a-0eee7ef3db42",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1560,
        140
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "792376e9-3312-4862-94a0-e38de2e6dda5",
      "name": "Pull News",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1840,
        -40
      ],
      "parameters": {
        "url": "https://newsapi.org/v2/top-headlines",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "country",
              "value": "us"
            },
            {
              "name": "apiKey",
              "value": "NEWS_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "596c8d5d-3c03-435e-abab-e7b93de28471",
      "name": "Send Mail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -980,
        -40
      ],
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "message": "=Hi {{ $json.Name }},\nPlease find the top news headlines as below:\n\n{{ $('AI Agent').item.json.output }}",
        "options": {},
        "subject": "News Headlines",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "125b6015-f220-4245-94eb-08d61ece41b3",
      "name": "Email list",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1200,
        -40
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2dLObdw_aicD6fTd-ElHSBBJIj1aBmKT7FecMtbyyE/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1L2dLObdw_aicD6fTd-ElHSBBJIj1aBmKT7FecMtbyyE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2dLObdw_aicD6fTd-ElHSBBJIj1aBmKT7FecMtbyyE/edit?usp=drivesdk",
          "cachedResultName": "Emails"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b4146559-5d6c-4db3-aad5-12a73621aa90",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3020,
        -300
      ],
      "parameters": {
        "width": 740,
        "height": 1280,
        "content": "\ud83d\udcf0 AI News Digest Agent: Auto News Summarizer & Emailer\nAutomatically fetch top news headlines, generate AI-powered summaries, and send personalized digests to your subscriber list. Perfect for:\n\u2705 Newsletter creators \u2014 deliver curated news content effortlessly\n\u2705 Teams & organizations \u2014 keep everyone informed with regular updates\n\u2705 Content curators \u2014 transform news into digestible insights\n\n\u2699\ufe0f What's Used\nn8n Nodes:\nSchedule Trigger \u2192 News API \u2192 AI Agent \u2192 OpenAI Chat Model \u2192 Google Sheets \u2192 Gmail\nExternal Tools:\n\nNewsAPI \u2013 Fetch latest headlines from reliable sources\nOpenAI GPT-4 \u2013 Generate concise 5-bullet summaries\nGoogle Sheets \u2013 Manage subscriber email lists\nGmail \u2013 Send personalized news digests\n\n\n\ud83d\udd11 Setup \u2013 Credentials Needed\n\nNewsAPI Key \u2192 Free account at newsapi.org for headline access\nOpenAI API Key \u2192 For AI-powered news summarization\nGoogle Sheets OAuth2 \u2192 Access subscriber email lists\nGmail OAuth2 \u2192 Send automated newsletter emails\n\n\n\ud83d\udcca Google Sheets Structure Required\nCreate a simple subscriber spreadsheet:\n\nName (subscriber's name for personalization)\nEmail (recipient email addresses)\n\n\n\ud83d\ude80 Workflow Steps\n\nScheduled News Collection\nRuns every 10 minutes to fetch latest US headlines from NewsAPI\nAI-Powered Summarization\nGPT processes news headlines and creates concise 5-bullet summaries\nSubscriber List Access\nRetrieves email list from Google Sheets for distribution\nPersonalized Email Delivery\nSends customized news digests to each subscriber with their name\n\n\n\ud83d\udca1 Pro Tips\n\nCustomize the country parameter (US, UK, CA, etc.) for regional news\nAdjust schedule frequency based on your audience preferences\nAdd category filters (technology, business, sports) for niche newsletters\nMonitor email delivery rates and subscriber engagement\nTest with small subscriber lists before scaling up\n\n\n\ud83d\udee0\ufe0f Customize It\n\nAdd multiple news sources for comprehensive coverage\nInclude trending topics and sentiment analysis\nConnect to Mailchimp or other email marketing platforms\nAdd unsubscribe functionality and list management\nCreate different digest formats (daily, weekly, breaking news)"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Email list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull News": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email list": {
      "main": [
        [
          {
            "node": "Send Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Pull News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}