{
  "name": "Daily RSS \u2192 Email Digest",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "a1f0c2d4-1111-4a01-8b01-0000000000a1",
      "name": "Every Morning 08:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -360,
        0
      ]
    },
    {
      "parameters": {
        "url": "https://hnrss.org/frontpage",
        "options": {}
      },
      "id": "b2e1d3c5-2222-4b02-9c02-0000000000b2",
      "name": "Read RSS Feed",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        -140,
        0
      ]
    },
    {
      "parameters": {
        "maxItems": 8
      },
      "id": "c3d2e4b6-3333-4c03-ad03-0000000000c3",
      "name": "Top 8 Items",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        80,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Build a single HTML digest from the incoming RSS items.\nconst rows = items.map((it) => {\n  const d = it.json;\n  const title = (d.title || 'Untitled').toString();\n  const link = (d.link || '#').toString();\n  const when = (d.isoDate || d.pubDate || '').toString();\n  return `<li><a href=\"${link}\">${title}</a><br><small>${when}</small></li>`;\n}).join('\\n');\nconst html = `<h2>Your daily digest</h2><ul>\\n${rows}\\n</ul><p style=\"color:#888\">Sent by an n8n workflow. Validate this template before production with FlowProof.</p>`;\nreturn [{ json: { html, count: items.length } }];"
      },
      "id": "d4e3f5c7-4444-4d04-be04-0000000000d4",
      "name": "Build HTML Digest",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "fromEmail": "digest@example.com",
        "toEmail": "you@example.com",
        "subject": "Your daily digest",
        "html": "={{ $json.html }}",
        "options": {}
      },
      "id": "e5f4a6c8-5555-4e05-cf05-0000000000e5",
      "name": "Send Email (SMTP)",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        520,
        0
      ]
    }
  ],
  "connections": {
    "Every Morning 08:00": {
      "main": [
        [
          {
            "node": "Read RSS Feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read RSS Feed": {
      "main": [
        [
          {
            "node": "Top 8 Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Top 8 Items": {
      "main": [
        [
          {
            "node": "Build HTML Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build HTML Digest": {
      "main": [
        [
          {
            "node": "Send Email (SMTP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "digest"
    }
  ]
}