{ "meta": { "instanceId": "3c58c896c9089c8fb4d7f2b069bf3119193f239a1f538829758e2f4d6b5f5b24" }, "nodes": [ { "id": "ed18a0ab-ac62-469e-9490-d9fcf75b4606", "name": "Setup", "type": "n8n-nodes-base.set", "position": [ -700, 320 ], "parameters": { "fields": { "values": [ { "name": "linkedInAPIKey" }, { "name": "twitterAPIKey" }, { "name": "emails" } ] }, "options": {} }, "typeVersion": 3.2 }, { "id": "d6624796-3f59-4077-8d41-4418c869ad27", "name": "Every morning @ 7", "type": "n8n-nodes-base.scheduleTrigger", "position": [ -940, 320 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 7 } ] } }, "typeVersion": 1.1 }, { "id": "1cb46dc8-c2b5-487c-a382-a5714686be50", "name": "Get meetings for today", "type": "n8n-nodes-base.googleCalendar", "position": [ -300, 320 ], "parameters": { "options": { "timeMax": "={{ $today.plus({ days: 1 }) }}", "timeMin": "={{ $today.minus({ days: 3 }) }}", "singleEvents": true }, "calendar": { "__rl": true, "mode": "list", "value": "milorad.filipovic19@gmail.com", "cachedResultName": "milorad.filipovic19@gmail.com" }, "operation": "getAll" }, "credentials": { "googleCalendarOAuth2Api": { "id": "22", "name": "Google Calendar account" } }, "typeVersion": 1 }, { "id": "22167c9c-6dc2-41a8-a8b8-218643b943e5", "name": "Get attendees email domains", "type": "n8n-nodes-base.set", "position": [ -80, 320 ], "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": "271d0044-ceb1-4e3a-9a60-9c003cd4b198", "name": "Split Out", "type": "n8n-nodes-base.splitOut", "position": [ 140, 320 ], "parameters": { "include": "selectedOtherFields", "options": {}, "fieldToSplitOut": "domain", "fieldsToInclude": "attendeeEmails, start" }, "typeVersion": 1 }, { "id": "68041cd4-6dc3-4225-b39e-d227a3142e02", "name": "Get recent LinkedIn posts", "type": "n8n-nodes-base.httpRequest", "position": [ -20, 540 ], "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": "bcbc845c-dd69-491e-b18d-7e1cd73d94b4", "name": "Enrich attendee company", "type": "n8n-nodes-base.clearbit", "position": [ 580, 320 ], "parameters": { "domain": "={{ $json.domain }}", "additionalFields": {} }, "credentials": { "clearbitApi": { "id": "tuwO0i7CavIt5j8X", "name": "Clearbit account" } }, "typeVersion": 1 }, { "id": "a928a47a-c7be-4b08-ae78-05541963bf0e", "name": "Gmail", "type": "n8n-nodes-base.gmail", "position": [ 1360, 640 ], "parameters": { "sendTo": "={{ $('Setup').first().json.emails }}", "message": "={{ $json.html }}", "options": {}, "subject": "=Latest social activity for: {{ $('Wrap everything together').item.json.name }}" }, "credentials": { "gmailOAuth2": { "id": "10", "name": "mrdosija@gmail.com" } }, "typeVersion": 2.1 }, { "id": "cc82d1ef-5601-4844-b2c1-91cb7d16c080", "name": "Combine all activity for a company", "type": "n8n-nodes-base.merge", "position": [ 460, 620 ], "parameters": { "mode": "combine", "options": { "clashHandling": { "values": { "resolveClash": "preferInput2" } } }, "joinMode": "keepEverything", "mergeByFields": { "values": [ { "field1": "name", "field2": "name" } ] } }, "typeVersion": 2.1 }, { "id": "d0843f1d-173c-4c6a-8ef7-be122551ce03", "name": "Extract data for email", "type": "n8n-nodes-base.set", "position": [ 680, 800 ], "parameters": { "fields": { "values": [ { "name": "attendeeEmail", "stringValue": "={{ $json.meeting.attendeeEmails.find(a => a.endsWith($json.meeting.domain)) }}" }, { "name": "startHour", "type": "numberValue", "numberValue": "={{ DateTime.fromISO($json.meeting.start.dateTime).hour }}" }, { "name": "startMinute", "type": "numberValue", "numberValue": "={{ DateTime.fromISO($json.meeting.start.dateTime).minute }}" } ] }, "include": "selected", "options": {}, "includeFields": "name, html_twitter, html_linkedin" }, "typeVersion": 3.2 }, { "id": "7bbb4100-7529-4b33-8301-6e312e15d0c3", "name": "Prepare email template", "type": "n8n-nodes-base.html", "position": [ 1140, 640 ], "parameters": { "html": "\n\n\n
\n \n\n\n\n\n {{ $json.message.content }}\n
\n \n\n