{ "meta": { "instanceId": "workflow-ba4f121e", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:53.427853", "updatedAt": "2025-09-29T07:07:53.427872", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production" }, "nodes": [ { "id": "6d0b95c8-db4f-4bc1-b51b-87da0b1cbca9", "name": "Data Collection", "type": "n8n-nodes-base.stickyNote", "position": [ 820, 3860 ], "parameters": { "width": 380, "height": 620, "content": "# Data Collection\nFetches latest news articles from two RSS sources: Calcalist and Mako" }, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow." }, { "id": "62a73f4d-229f-44fa-891d-c36dc50bad99", "name": "Data Processing", "type": "n8n-nodes-base.stickyNote", "position": [ 1260, 3860 ], "parameters": { "width": 740, "height": 360, "content": "# Data Processing\nFilters, sorts and prepares news articles for AI selection" }, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow." }, { "id": "13092778-b6a3-4436-b69d-f67245999ffe", "name": "AI Selection", "type": "n8n-nodes-base.stickyNote", "position": [ 2020, 3860 ], "parameters": { "width": 400, "height": 360, "content": "# AI Selection\nUses GPT-4o to select the top 5 most relevant articles for a senior executive" }, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow." }, { "id": "b1b25c3b-976e-41eb-a82d-e0571ba9b2f2", "name": "Email Generation", "type": "n8n-nodes-base.stickyNote", "position": [ 1260, 4260 ], "parameters": { "width": 1160, "height": 520, "content": "# Email Generation\nCreates and sends formatted HTML digest email with selected articles" }, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow." }, { "id": "d846f068-37c2-48d2-96cb-991a42ecadf4", "name": "Send Daily News", "type": "n8n-nodes-base.emailSend", "position": [ 2220, 4620 ], "webhookId": "0de4d8cd-3519-4a4a-a05b-a9c973b64141", "parameters": { "html": "={{ $json.html }}", "options": {}, "subject": "=סקירה ה-AI היומית שלך: {{ $json.date_today }}", "toEmail": "Elay Guez ", "fromEmail": "Elay's AI Assistant " }, "credentials": { "smtp": { "id": "583PMpoYf46gbncd", "name": "SMTP account" } }, "executeOnce": false, "typeVersion": 2.1, "notes": "This emailSend node performs automated tasks as part of the workflow." }, { "id": "1c4ae1dd-bf0e-4726-b106-6b1b868aae2e", "name": "Get Date", "type": "n8n-nodes-base.function", "position": [ 1300, 4640 ], "parameters": { "functionCode": "const now = new Date();\nconst options = {\n timeZone: 'Asia/Jerusalem',\n day: '2-digit',\n month: '2-digit',\n year: 'numeric'\n};\n\n// Format date according to Israeli format\nconst dateToday = new Intl.DateTimeFormat('en-GB', options).format(now);\n\n// Keep the item\nitems[0].json.date_today = dateToday; // 12/04/2025\n\nreturn items;" }, "typeVersion": 1, "notes": "This function node performs automated tasks as part of the workflow." }, { "id": "162bce34-bf3f-4f05-a9eb-dd2c3f6068de", "name": "Merge", "type": "n8n-nodes-base.merge", "position": [ 1480, 4620 ], "parameters": { "mode": "combine", "options": {}, "combineBy": "combineByPosition" }, "executeOnce": true, "typeVersion": 3.1, "notes": "This merge node performs automated tasks as part of the workflow." }, { "id": "6444d6ad-efc1-4fec-be03-f9822624b5a6", "name": "Create HTML", "type": "n8n-nodes-base.html", "position": [ 2220, 4360 ], "parameters": { "html": "\n\n\n\n \n\n\n
\n\n

\n סקירה ה-AI היומית שלך \"אל תבזבז זמן – תתמקד רק במה שחשוב באמת\"\n

\n\n

\nלהלן חמשת המאמרים המרכזיים שהתפרסמו ביממה האחרונה, המלווים בתקציר מקצועי שיסייע לך להתעדכן בהתפתחויות הבולטות ביותר בתחומי הכלכלה, הטכנולוגיה והאסטרטגיה.\n

\n\n \n
\n

\n 1. {{ $json.data[0].title }}\n

\n

{{ $json.data[0].summary }}

\n
\n לקריאה המלאה\n
\n
\n\n \n
\n

\n 2. {{ $json.data[1].title }}\n

\n

{{ $json.data[1].summary }}

\n
\n לקריאה המלאה\n
\n
\n\n \n
\n

\n 3. {{ $json.data[2].title }}\n

\n

{{ $json.data[2].summary }}

\n
\n לקריאה המלאה\n
\n
\n\n\n \n
\n

\n 4. {{ $json.data[3].title }}\n

\n

{{ $json.data[3].summary }}

\n
\n לקריאה המלאה\n
\n
\n\n \n
\n

\n 5. {{ $json.data[4].title }}\n

\n

{{ $json.data[4].summary }}

\n
\n לקריאה המלאה\n
\n
\n\n\n \n
\n ✨ This daily Israeli economic newsletter was automatically built for you by n8n AI Agent – because technology can work for you\n
\n\n
\n\n" }, "typeVersion": 1.2, "notes": "This html node performs automated tasks as part of the workflow." }, { "id": "cfac2998-11ba-4665-9457-1a0669bf42b0", "name": "Aggregate", "type": "n8n-nodes-base.aggregate", "position": [ 2040, 4360 ], "parameters": { "options": {}, "aggregate": "aggregateAllItemData" }, "typeVersion": 1, "notes": "This aggregate node performs automated tasks as part of the workflow." }, { "id": "dd36ab14-61dc-4b85-af3b-796be18a3169", "name": "Clean Text", "type": "n8n-nodes-base.set", "position": [ 1860, 4360 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "7b337b47-a1c6-470e-881f-0c038b4917e5", "name": "title", "type": "string", "value": "={{ $('Split Out').item.json.article }}" }, { "id": "ca820521-4fff-4971-84b5-e6e2dbd8bb7a", "name": "summary", "type": "string", "value": "={{ $json['data-calcalist'] }} {{ $json['data-mako'] }}" }, { "id": "0fd9b5e3-44dd-49a3-82c1-3a4aa4698376", "name": "url", "type": "string", "value": "={{ $('Split Out').item.json.link }}" } ] } }, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow." }, { "id": "ce8a5da1-9ad0-4eca-8fcc-ea744738ac4e", "name": "Extract Text", "type": "n8n-nodes-base.html", "position": [ 1680, 4360 ], "parameters": { "options": {}, "operation": "extractHtmlContent", "extractionValues": { "values": [ { "key": "YOUR_CREDENTIAL_HERE", "cssSelector": ".calcalistArticleHeader .subTitle" }, { "key": "YOUR_CREDENTIAL_HERE", "cssSelector": ".article-header header h2" } ] } }, "typeVersion": 1.2, "notes": "This html node performs automated tasks as part of the workflow." }, { "id": "c8f061f1-57ad-4594-8ff1-baa7f0ef1427", "name": "Fetch HTML", "type": "n8n-nodes-base.httpRequest", "position": [ 1480, 4360 ], "parameters": { "url": "{{ $env.BASE_URL }}", "options": {} }, "typeVersion": 4.2, "notes": "This httpRequest node performs automated tasks as part of the workflow." }, { "id": "95b33857-9f20-4ba4-aae0-67a3899c222a", "name": "Split Out", "type": "n8n-nodes-base.splitOut", "position": [ 1300, 4360 ], "parameters": { "options": {}, "fieldToSplitOut": "message.content.articles" }, "typeVersion": 1, "notes": "This splitOut node performs automated tasks as part of the workflow." }, { "id": "7433ab1d-e162-469e-951d-af241c714e34", "name": "ChatGPT 4o", "type": "n8n-nodes-base.noOp", "position": [ 2060, 4060 ], "parameters": { "modelId": { "__rl": true, "mode": "list", "value": "gpt-4o", "cachedResultName": "GPT-4O" }, "options": {}, "messages": { "values": [ { "role": "system", "content": "\nYou've received a list of headlines and links to 50 recently published articles. \nSelect the five most important and relevant articles for a senior CEO of a large company who updates daily on economic, technological and strategic topics.\n\nUse article titles to understand the content of the articles.\n\nAt least one article must be about current affairs and security (not economic topics).\n\nYour output should be in JSON format:\n{\n\"article\": \"\",\n\"link\": \"\"\n}" }, { "role": "system", "content": "=Article list:\n\n{{ $json.chatgpt_input }}" } ] }, "jsonOutput": true }, "credentials": { "openAiApi": { "id": "2m1HH5crgPAhTJlv", "name": "OpenAi account" } }, "typeVersion": 1.8, "notes": "This openAi node performs automated tasks as part of the workflow." }, { "id": "28daaadd-426b-485a-b128-4660491ed6a9", "name": "Clean List", "type": "n8n-nodes-base.code", "position": [ 1860, 4060 ], "parameters": { "jsCode": "// Input: items[] - each one is an article\n\n// Step 1: Remove duplicates by link\nconst uniqueMap = new Map();\nfor (const item of items) {\n const link = item.json.link;\n if (!uniqueMap.has(link)) {\n uniqueMap.set(link, item.json);\n }\n}\n\n// Step 2: Sort by publication date from newest to oldest\nconst uniqueArticles = Array.from(uniqueMap.values());\nuniqueArticles.sort((a, b) => b.pubDate - a.pubDate);\n\n// Step 3: Take the top 50 most recent articles\nconst top20 = uniqueArticles.slice(0, 50);\n\n// Step 4: Build clean, readable, efficient text\nconst formatted = top20.map((article, index) => {\n const title = article.title?.replace(/\\(\\)$/, '').trim() || 'No Title';\n const link = article.link || '';\n return `${index + 1}. ${title}\\n${link}`;\n});\n\nreturn [\n {\n json: {\n chatgpt_input: formatted.join('\\n\\n') // Paragraphs separated by newlines\n }\n }\n];" }, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow." }, { "id": "9e041ef2-b440-447e-b3f3-fc3e846cf669", "name": "Sort List", "type": "n8n-nodes-base.sort", "position": [ 1680, 4060 ], "parameters": { "options": {}, "sortFieldsUi": { "sortField": [ { "order": "descending", "fieldName": "pubDate" } ] } }, "typeVersion": 1, "notes": "This sort node performs automated tasks as part of the workflow." }, { "id": "781cc3bd-b78b-4a17-8886-e0fbb82c378a", "name": "Remove NaN", "type": "n8n-nodes-base.filter", "position": [ 1480, 4060 ], "parameters": { "options": { "ignoreCase": true }, "conditions": { "options": { "version": 2, "leftValue": "", "caseSensitive": false, "typeValidation": "strict" }, "combinator": "or", "conditions": [ { "id": "046f5bde-6d2c-4dfd-b29b-17be6c34cc1b", "operator": { "type": "string", "operation": "notContains" }, "leftValue": "={{ $json.pubDate }}\n\n", "rightValue": "=NaN" } ] } }, "typeVersion": 2.2, "notes": "This filter node performs automated tasks as part of the workflow." }, { "id": "d0084e60-4c9d-4f3e-944c-a81e7dabae9c", "name": "Merged RSS", "type": "n8n-nodes-base.merge", "position": [ 1300, 4060 ], "parameters": {}, "typeVersion": 3, "notes": "This merge node performs automated tasks as part of the workflow." }, { "id": "8178972f-e0c7-462a-8d66-853118756545", "name": "Edit Fields - Mako", "type": "n8n-nodes-base.set", "position": [ 1060, 4040 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "11b653ae-6a43-4e6d-86b8-066384eaa7d6", "name": "title", "type": "string", "value": "={{ $json.title.replace(/\\[PACK\\].*/, \"\").replace(/\\[.*?\\]/g, \"\").trim() }}" }, { "id": "e300ad1b-6b93-45f7-a964-294abbebfd95", "name": "link", "type": "string", "value": "={{ $json.link.replace(/\\/torrent\\/download\\/(\\d+)\\..*/, \"/torrents/$1\") }}" }, { "id": "bd548580-e879-4671-ad4e-603d2496362e", "name": "pubDate", "type": "string", "value": "={{ new Date($json.pubDate).getTime() }}" } ] } }, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow." }, { "id": "2c8f4766-5338-4319-98f9-1ab9b460b4e5", "name": "Edit Fields - Calcalist", "type": "n8n-nodes-base.set", "position": [ 1060, 4320 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "d0002dd0-3a5a-4f1a-ba6e-d359549f5a1e", "name": "title", "type": "string", "value": "={{$json.title.replace(/^\\[PACK\\] /, \"\").replace(/1080p .*/, \"\")}} ({{$json.content.match(/Size<\\/strong>:\\s([\\d.]+\\s[KMGT]iB)/)[1]}})" }, { "id": "cd7b2be1-a52e-430b-98a1-2fb30b5cb8c7", "name": "link", "type": "string", "value": "={{ $json.link.replace(/\\/torrent\\/download\\/(\\d+)\\..*/, \"/torrents/$1\") }}" }, { "id": "3b9d50a8-0d46-4a8f-94e9-454bc5153280", "name": "pubDate", "type": "string", "value": "={{ new Date($json.pubDate).getTime() }}" } ] } }, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow." }, { "id": "cd6173fc-2bb7-40b2-950b-8f09b0be442f", "name": "RSS - Calcalist", "type": "n8n-nodes-base.rssFeedRead", "onError": "continueRegularOutput", "position": [ 840, 4320 ], "parameters": { "url": "{{ $env.WEBHOOK_URL }}", "options": { "ignoreSSL": false } }, "executeOnce": false, "typeVersion": 1.1, "notes": "This rssFeedRead node performs automated tasks as part of the workflow." }, { "id": "06c96a26-485b-4ca8-ab9e-d45da69f9d3d", "name": "RSS - Mako", "type": "n8n-nodes-base.rssFeedRead", "onError": "continueRegularOutput", "position": [ 840, 4040 ], "parameters": { "url": "{{ $env.API_BASE_URL }}", "options": { "ignoreSSL": false } }, "executeOnce": false, "typeVersion": 1.1, "notes": "This rssFeedRead node performs automated tasks as part of the workflow." }, { "id": "a3fef1a0-8e27-4d55-865b-daea95fe2b71", "name": "Schedule Trigger", "type": "n8n-nodes-base.scheduleTrigger", "position": [ 500, 4320 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 20, "triggerAtMinute": null } ] } }, "typeVersion": 1.2, "notes": "This scheduleTrigger node performs automated tasks as part of the workflow." } ], "pinData": {}, "connections": { "c8f061f1-57ad-4594-8ff1-baa7f0ef1427": { "main": [ [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-b0238053", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-dd44a224", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-970af0ae", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-2006f620", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-f7a7e954", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-550231ba", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-6f34be09", "type": "main", "index": 0 } ], [ { "node": "error-handler-c8f061f1-57ad-4594-8ff1-baa7f0ef1427-cc75fb3f", "type": "main", "index": 0 } ] ] }, "d846f068-37c2-48d2-96cb-991a42ecadf4": { "main": [ [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-7b1b99b5", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-d4087393", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-f33b870f", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-12e9dbc7", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-aa948c85", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-f703d905", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-884876cc", "type": "main", "index": 0 } ], [ { "node": "error-handler-d846f068-37c2-48d2-96cb-991a42ecadf4-69e33b71", "type": "main", "index": 0 } ] ] }, "7433ab1d-e162-469e-951d-af241c714e34": { "main": [ [ { "node": "error-handler-7433ab1d-e162-469e-951d-af241c714e34-faea432d", "type": "main", "index": 0 } ] ] } }, "name": "Stickynote Workflow", "settings": { "executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000 }, "description": "Automated workflow: Stickynote Workflow. This workflow integrates 16 different services: stickyNote, httpRequest, filter, code, scheduleTrigger. It contains 27 nodes and follows best practices for error handling and security.", "tags": [ "automation", "n8n", "production-ready", "excellent", "optimized" ], "notes": "Excellent quality workflow: Stickynote Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation." }