{ "meta": { "instanceId": "3c58c896c9089c8fb4d7f2b069bf3119193f239a1f538829758e2f4d6b5f5b24" }, "nodes": [ { "id": "9aa9fa6c-5ccb-4f2b-b6a8-2b91f4a58355", "name": "Setup", "type": "n8n-nodes-base.set", "position": [ 420, 680 ], "parameters": { "fields": { "values": [ { "name": "apiKey", "stringValue": "32aa914c947342169c4998b6701a77e0" }, { "name": "newsAge", "type": "numberValue", "numberValue": "10" }, { "name": "maxArticles", "stringValue": "20" }, { "name": "emails" } ] }, "options": {} }, "typeVersion": 3.2 }, { "id": "6f471217-b69b-4f67-981d-c7c1e2d710b6", "name": "Extract company name", "type": "n8n-nodes-base.set", "position": [ 1100, 480 ], "parameters": { "fields": { "values": [ { "name": "companyName", "stringValue": "={{ $json.summary.toLowerCase().replace('meeting with', '').replace('call with', '').trim() }}" } ] }, "options": {} }, "typeVersion": 3.2 }, { "id": "9bb5adfa-5a36-453e-ad8d-59229ca2f1ab", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "position": [ 200, 320 ], "parameters": { "color": 4, "width": 436, "height": 192, "content": "### Latest company news before a call\n\nThis workflow will send you a list of latest news about a company for every meeting in your calendar each day, keeping you up to date with your leads and meeting partners.\n" }, "typeVersion": 1 }, { "id": "ddfa92e0-ff37-4733-9002-65fe21989d8a", "name": "Every morning @ 7", "type": "n8n-nodes-base.scheduleTrigger", "position": [ 200, 680 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 7 } ] } }, "typeVersion": 1.1 }, { "id": "b71c3683-6077-41b4-ab23-66ee22f64532", "name": "Filter meetings", "type": "n8n-nodes-base.if", "position": [ 840, 680 ], "parameters": { "options": {}, "conditions": { "options": { "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "or", "conditions": [ { "id": "bcfb06b1-d365-43a8-9802-869529baca98", "operator": { "type": "string", "operation": "startsWith" }, "leftValue": "={{ $json.summary.toLowerCase() }}", "rightValue": "call with" }, { "id": "4ea43ccf-d586-4985-87db-fc1e9f734351", "operator": { "type": "string", "operation": "startsWith" }, "leftValue": "={{ $json.summary.toLowerCase() }}", "rightValue": "meeting with" } ] } }, "typeVersion": 2 }, { "id": "34c4241e-e29a-4d9a-b8a8-130b9f19383f", "name": "Get latest news", "type": "n8n-nodes-base.httpRequest", "position": [ 1300, 480 ], "parameters": { "url": "=https://newsapi.org/v2/everything?apiKey={{ $('Setup').first().json.apiKey }}&q={{ $json.companyName }}&from={{ DateTime.now().minus({ days: $('Setup').first().json.newsAge }).toFormat('yyyy-MM-dd') }}&sortBy=publishedAt&language=en&pageSize={{ $('Setup').first().json.maxArticles }}&searchIn=title", "options": {} }, "typeVersion": 4.1 }, { "id": "51059db7-5fec-4287-bf3f-a6a4e76ac5a4", "name": "Format for email", "type": "n8n-nodes-base.code", "position": [ 1500, 480 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "let html = `