{ "meta": { "instanceId": "3c58c896c9089c8fb4d7f2b069bf3119193f239a1f538829758e2f4d6b5f5b24" }, "nodes": [ { "id": "f59411f9-5dad-4f8c-af0c-c3ab25171107", "name": "Get recetn tweets", "type": "n8n-nodes-base.httpRequest", "position": [ 233.55908776779552, 1409.619212163096 ], "parameters": { "url": "https://twitter154.p.rapidapi.com/user/tweets", "options": { "batching": { "batch": { "batchSize": 1, "batchInterval": 2000 } } }, "sendQuery": true, "sendHeaders": true, "queryParameters": { "parameters": [ { "name": "limit", "value": "10" }, { "name": "user_id", "value": "={{ $json.twitter.id }}" }, { "name": "include_replies", "value": "={{ false }}" }, { "name": "include_pinned", "value": "={{ false }}" } ] }, "headerParameters": { "parameters": [ { "name": "X-RapidAPI-Host", "value": "twitter154.p.rapidapi.com" }, { "name": "X-RapidAPI-Key", "value": "={{ $('Setup').first().json.twitterAPIKey }}" } ] } }, "typeVersion": 4.1 }, { "id": "c25d29ef-71bb-4ea1-8794-47911dac997f", "name": "Setup", "type": "n8n-nodes-base.set", "position": [ -440, 980 ], "parameters": { "fields": { "values": [ { "name": "linkedInAPIKey" }, { "name": "twitterAPIKey" }, { "name": "emails" } ] }, "options": {} }, "typeVersion": 3.2 }, { "id": "5bf52838-157b-49fe-a4d8-3817198502dd", "name": "Every morning @ 7", "type": "n8n-nodes-base.scheduleTrigger", "position": [ -680, 980 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 7 } ] } }, "typeVersion": 1.1 }, { "id": "aff4dd6e-a480-4f43-9b48-05172d4b7b2d", "name": "Get meetings for today", "type": "n8n-nodes-base.googleCalendar", "position": [ -80, 980 ], "parameters": { "options": { "timeMax": "={{ $now.endOf('day') }}", "timeMin": "={{ $now.beginningOf('day') }}", "singleEvents": true }, "calendar": { "__rl": true, "mode": "list", "value": "milorad.filipovic19@gmail.com", "cachedResultName": "milorad.filipovic19@gmail.com" }, "operation": "getAll" }, "typeVersion": 1 }, { "id": "63973273-3821-4c9f-8976-6dd47ac9a62e", "name": "Get attendees email domains", "type": "n8n-nodes-base.set", "position": [ 120, 980 ], "parameters": { "fields": { "values": [ { "name": "domain", "type": "arrayValue", "arrayValue": "={{ $json.attendees.filter(a => !a.organizer).map(a => a.email.split('@').pop()) }}" }, { "name": "attendeeEmails", "type": "arrayValue", "arrayValue": "={{ $json.attendees.filter(a => !a.organizer).map(a => a.email) }}" } ] }, "options": {} }, "typeVersion": 3.2 }, { "id": "093b978f-8d5e-4051-be21-e8a7a3430c9c", "name": "Split Out", "type": "n8n-nodes-base.splitOut", "position": [ 300, 980 ], "parameters": { "include": "selectedOtherFields", "options": {}, "fieldToSplitOut": "domain", "fieldsToInclude": "attendeeEmails, start" }, "typeVersion": 1 }, { "id": "467308c9-c6a0-4d1c-a6e1-4598075e62a6", "name": "Get recent LinkedIn posts", "type": "n8n-nodes-base.httpRequest", "position": [ 233.55908776779552, 1209.619212163096 ], "parameters": { "url": "https://fresh-linkedin-profile-data.p.rapidapi.com/get-company-posts", "options": { "batching": { "batch": {} } }, "sendQuery": true, "sendHeaders": true, "queryParameters": { "parameters": [ { "name": "linkedin_url", "value": "=https://www.linkedin.com/{{ $json.linkedin.handle }}" }, { "name": "sort_by", "value": "recent" } ] }, "headerParameters": { "parameters": [ { "name": "X-RapidAPI-Key", "value": "={{ $('Setup').item.json.linkedInAPIKey }}" }, { "name": "X-RapidAPI-Host", "value": "fresh-linkedin-profile-data.p.rapidapi.com" } ] } }, "typeVersion": 4.1 }, { "id": "71a9223b-4d71-4d0d-a4df-f8836d3c3d1f", "name": "Enrich attendee company", "type": "n8n-nodes-base.clearbit", "position": [ 640, 980 ], "parameters": { "domain": "={{ $json.domain }}", "additionalFields": {} }, "typeVersion": 1 }, { "id": "0fad8349-2a4f-4cee-a03e-98e8d95b015c", "name": "Gmail", "type": "n8n-nodes-base.gmail", "position": [ 1313.5590877677955, 1309.619212163096 ], "parameters": { "sendTo": "={{ $('Setup').first().json.emails }}", "message": "={{ $json.html }}", "options": {}, "subject": "=Latest social activity for: {{ $('Extract data for email').item.json.name }} " }, "credentials": { "gmailOAuth2": { "id": "10", "name": "mrdosija@gmail.com" } }, "typeVersion": 2.1 }, { "id": "bf667011-717e-4a5a-ac7d-c377edb063f8", "name": "Format LinkedIn Posts", "type": "n8n-nodes-base.code", "position": [ 453.5590877677955, 1209.619212163096 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "// console.log('LINKEDIN', $('Enrich attendee company').item.json.name.toLowerCase())\nconst company = $('Enrich attendee company').item.json.name.toLowerCase();\n\nlet html = `\n
\n \n ${article.text}\n \n \n ❤️ ${article.num_likes} | 💬 ${article.num_comments}\n \n | \n
\n \n \n ${article.text}\n \n \n 🔄 ${article.retweet_count} | ❤️ ${article.favorite_count} | 💬 ${article.reply_count}\n \n | \n