{
 "id": "realrssweeklydig",
 "name": "AutomateRecipes \u2013 rss-weekly-digest",
 "nodes": [
  {
   "parameters": {
    "rule": {
     "interval": [
      {
       "field": "weeks",
       "triggerAtDay": [
        1
       ],
       "triggerAtHour": 8
      }
     ]
    }
   },
   "name": "Schedule Trigger",
   "type": "n8n-nodes-base.scheduleTrigger",
   "typeVersion": 1.2,
   "position": [
    0,
    0
   ],
   "id": "fbc759fc-cbf5-4b46-8596-99c262d8fc84"
  },
  {
   "parameters": {
    "jsCode": "// EDIT THESE SETTINGS\nreturn [{json:{\n \"ntfyTopic\": \"CHANGE-ME-to-a-long-random-topic\",\n \"feedUrl\": \"https://blog.n8n.io/rss/\",\n \"days\": 30,\n \"maxItems\": 5\n}}];"
   },
   "name": "Config",
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "position": [
    240,
    0
   ],
   "id": "5125b1a1-1216-4cc2-b5ca-99d60cb8ae99"
  },
  {
   "parameters": {
    "url": "={{ $json.feedUrl }}",
    "options": {}
   },
   "name": "Read RSS feed",
   "type": "n8n-nodes-base.rssFeedRead",
   "typeVersion": 1,
   "position": [
    480,
    0
   ],
   "id": "9192b158-4882-4f46-8501-9f20fa7f27d0"
  },
  {
   "parameters": {
    "jsCode": "const c=$('Config').first().json,since=Date.now()-c.days*864e5;const it=$input.all().map(i=>i.json).filter(x=>new Date(x.isoDate||x.pubDate).getTime()>=since).slice(0,c.maxItems);if(!it.length)return [];return [{json:{title:`Digest: ${it.length} new posts`,tags:'newspaper',message:it.map(x=>'- '+x.title+'\\n  '+x.link).join('\\n'),count:it.length}}];"
   },
   "name": "Build digest",
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "position": [
    720,
    0
   ],
   "id": "320f6005-7e93-4515-9564-7ca64f1c1c63"
  },
  {
   "parameters": {
    "method": "POST",
    "url": "=https://ntfy.sh/{{ $('Config').first().json.ntfyTopic }}",
    "sendHeaders": true,
    "headerParameters": {
     "parameters": [
      {
       "name": "Title",
       "value": "={{ $json.title }}"
      },
      {
       "name": "Tags",
       "value": "={{ $json.tags || 'bell' }}"
      }
     ]
    },
    "sendBody": true,
    "contentType": "raw",
    "rawContentType": "text/plain",
    "body": "={{ $json.message }}",
    "options": {}
   },
   "name": "Send ntfy alert",
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "position": [
    960,
    0
   ],
   "id": "6f2dbbc2-57ec-4585-9ca0-884113fc805d"
  },
  {
   "parameters": {},
   "name": "Run manually (test)",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    200
   ],
   "id": "a4f704b8-1b06-4236-85da-cd9ce9d341d0"
  }
 ],
 "connections": {
  "Schedule Trigger": {
   "main": [
    [
     {
      "node": "Config",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Config": {
   "main": [
    [
     {
      "node": "Read RSS feed",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Read RSS feed": {
   "main": [
    [
     {
      "node": "Build digest",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Build digest": {
   "main": [
    [
     {
      "node": "Send ntfy alert",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Run manually (test)": {
   "main": [
    [
     {
      "node": "Config",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1"
 },
 "active": false,
 "pinData": {}
}