{
  "name": "Daily News Digest",
  "nodes": [
    {
      "parameters": {
        "triggerAtTime": "08:00"
      },
      "name": "Run Daily",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "notes": "Triggers the workflow every day at 8:00 AM."
    },
    {
      "parameters": {
        "url": "http://feeds.bbci.co.uk/news/world/rss.xml"
      },
      "name": "Fetch News Source 1",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        650,
        200
      ],
      "notes": "Fetches news from the first source. **ACTION REQUIRED:** Change the RSS feed URL."
    },
    {
      "parameters": {
        "url": "https://feeds.reuters.com/reuters/topNews"
      },
      "name": "Fetch News Source 2",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        650,
        400
      ],
      "notes": "Fetches news from the second source. **ACTION REQUIRED:** Change the RSS feed URL."
    },
    {
      "parameters": {
        "url": "https://api.example.com/v1/chat/completions",
        "options": {},
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-4"
            },
            {
              "name": "messages",
              "value": "={{ [ { \"role\": \"system\", \"content\": \"You are a news editor. Summarize the following list of article titles into a concise daily digest. Group them by topic if possible.\" }, { \"role\": \"user\", \"content\": \"Here are the latest headlines: \" + JSON.stringify($items().map(item => item.json.title)) + \"\" } ] }}"
            }
          ]
        },
        "authentication": "headerAuth"
      },
      "name": "Summarize Articles",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        850,
        300
      ],
      "notes": "Sends all article titles to an LLM for summarization. **ACTION REQUIRED:** Configure the URL and authentication for your LLM API.",
      "credentials": {
        "httpHeaderAuth": {
          "id": "placeholder",
          "name": "LLM API Key"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "digest@example.com",
        "toEmail": "your-email@example.com",
        "subject": "Your Daily News Digest for {{ new Date().toLocaleDateString() }}",
        "html": "<h1>Your Daily News Digest</h1><p>{{ $json[\"choices\"][0][\"message\"][\"content\"] }}</p>"
      },
      "name": "Send Email Digest",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        1050,
        300
      ],
      "notes": "Sends the summarized digest via email. **ACTION REQUIRED:** Configure your email credentials and recipient address.",
      "credentials": {
        "smtp": {
          "id": "placeholder",
          "name": "Email Account"
        }
      }
    }
  ],
  "connections": {
    "Run Daily": {
      "main": [
        [
          {
            "node": "Fetch News Source 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch News Source 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch News Source 1": {
      "main": [
        [
          {
            "node": "Summarize Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch News Source 2": {
      "main": [
        [
          {
            "node": "Summarize Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Articles": {
      "main": [
        [
          {
            "node": "Send Email Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}