Task: Reach out to companies that recently secured funding

n8n workflow:
{"meta":{"instanceId":"f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5"},"nodes":[{"id":"e5b37882-16bd-4a75-ab95-2902ae320163","name":"When clicking \"Execute Workflow\"","type":"n8n-nodes-base.manualTrigger","position":[-540,100],"parameters":{},"typeVersion":1},{"id":"f1d17f5d-cba9-403b-9b9d-02cecafd4c86","name":"HubSpot - Search company","type":"n8n-nodes-base.hubspot","position":[860,100],"parameters":{"limit":1,"domain":"={{ $json[\"domain\"] }}","options":{"properties":["hs_lead_status","hs_all_owner_ids","website"]},"resource":"company","operation":"searchByDomain","authentication":"oAuth2"},"credentials":{"hubspotOAuth2Api":{"id":"68","name":"HubSpot - Sales & CS"}},"notesInFlow":false,"typeVersion":1,"continueOnFail":true,"alwaysOutputData":true},{"id":"78a68c37-b40c-448e-98c8-2dbc87918d3d","name":"HubSpot Create Account","type":"n8n-nodes-base.hubspot","position":[1560,320],"parameters":{"name":"={{ $node[\"Set domain\"].json[\"name\"] }}","resource":"company","authentication":"oAuth2","additionalFields":{"websiteUrl":"={{ $node[\"Set domain\"].json[\"domain\"] }}","description":"={{ $json[\"company\"][\"premium\"][\"about\"] }}","linkedinBio":"={{ $json[\"company\"][\"premium\"][\"about\"] }}","yearFounded":"={{ $node[\"Set domain\"].json[\"founded\"] }}","linkedInCompanyPage":"={{ $json[\"company\"][\"premium\"][\"url\"] }}"}},"credentials":{"hubspotOAuth2Api":{"id":"68","name":"HubSpot - Sales & CS"}},"typeVersion":1},{"id":"3a200e11-54a6-4dfc-88f7-d2c3adad0c88","name":"Is Account in Hubspot","type":"n8n-nodes-base.if","position":[1020,100],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"companyId\"] }}","operation":"isNotEmpty"}]}},"typeVersion":1},{"id":"5e96ea10-72bb-4a1a-b5a1-a81a75717e2c","name":"Lemlist - Add lead to campaign","type":"n8n-nodes-base.lemlist","position":[2180,480],"parameters":{"email":"={{ $json.email[0].email }}","resource":"lead","campaignId":"cam_jqPvWgoXjHQaQzErv","additionalFields":{"lastName":"={{ $json.last_name }}","firstName":"={{ $json.first_name }}","companyName":"={{ $json.company }}","linkedinUrl":"={{ $json.linkedin }}"}},"credentials":{"lemlistApi":{"id":"32","name":"lemlist.net"}},"typeVersion":1},{"id":"96af34ba-9f21-4638-a81d-3129f088e07e","name":"HubSpot - Follow up task","type":"n8n-nodes-base.hubspot","position":[1560,-300],"parameters":{"type":"task","metadata":{"body":"={{ $node[\"Set domain\"].json[\"name\"] }} has just announced a fundraising round!\n\nFunding Round: {{ $node[\"Loop\"].json[\"investment_type\"] }}\nFunding Amount:{{$node[\"Loop\"].json[\"money_raised\"] }}\nAnnounced on:  {{ $node[\"Loop\"].json[\"announced_on\"] }} "},"resource":"engagement","authentication":"oAuth2","additionalFields":{"associations":{"ownerIds":"={{ $json[\"properties\"][\"hs_all_owner_ids\"][\"value\"] }}","companyIds":"={{ $json[\"companyId\"] }}"}}},"credentials":{"hubspotOAuth2Api":{"id":"68","name":"HubSpot - Sales & CS"}},"typeVersion":1},{"id":"54509e4f-f562-4af3-a4fd-745a991f5807","name":"Attempted to contact?","type":"n8n-nodes-base.if","position":[1340,-280],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"properties\"][\"hs_lead_status\"][\"value\"] }}","value2":"ATTEMPTED_TO_CONTACT"}]}},"typeVersion":1},{"id":"8f5619f5-e707-4ffb-ae69-630e6f7c4ceb","name":"Slack - Notify sales team on Slack","type":"n8n-nodes-base.slack","position":[1560,60],"parameters":{"text":"=Someone from {{ $node[\"Albacross - New company in segment\"].json[\"name\"] }} is interested by our content.\n\nCheck what pages they visited here:\n{{$node[\"Albacross - New company in segment\"].json[\"profile_url\"]}}\n\nHubspot URL:\nhttps://app-eu1.hubspot.com/contacts/{{ $node[\"HubSpot - Search company\"].json[\"portalId\"] }}/company/{{ $node[\"HubSpot - Search company\"].json[\"companyId\"] }} ","channel":"Customer Success - Customer News","attachments":[],"otherOptions":{},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"5","name":"Slack account"}},"typeVersion":1},{"id":"45d0569f-134f-4452-9d68-2ca6f8eb9e10","name":"Open Deal?","type":"n8n-nodes-base.if","position":[1340,80],"parameters":{"conditions":{"string":[{"value1":"={{ $node[\"HubSpot - Search company\"].json[\"properties\"][\"hs_lead_status\"][\"value\"] }}","value2":"OPEN_DEAL"}]}},"typeVersion":1},{"id":"5cf1b9ca-a16f-4619-9997-275c073050f8","name":"Return only 3 profiles","type":"n8n-nodes-base.code","position":[1560,500],"parameters":{"jsCode":"array = $input.all()[0].json.company.employees\n\nfunction  addWebsiteProperty(array) {\n  const firstThreeElements = array.slice(0, 3);\n  const updatedElements = firstThreeElements.map(element => {\n    return { ...element, website: \"test\" };\n  });\n  return updatedElements;\n}\n\nreturn addWebsiteProperty(array)"},"typeVersion":1},{"id":"8c4c54f6-76cd-4fc1-a433-07915fd5e25d","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","disabled":true,"position":[1280,-420],"parameters":{"width":655.6935017564062,"height":321.5131001029625,"content":"## Create a follow-up task for your reps when a company they prospected before has done a fundraise."},"typeVersion":1},{"id":"23177c0a-c07b-455b-9f8f-daf98bf058ba","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","disabled":true,"position":[1280,-80],"parameters":{"width":655.6935017564062,"height":321.5131001029625,"content":"## Alert your reps when a company with an ongoing opportunity has done a fundraise"},"typeVersion":1},{"id":"f9249293-5c9d-4579-b9a5-203fad7613b4","name":"Datagma - Enrich Account & Search for contact","type":"n8n-nodes-base.httpRequest","position":[1320,500],"parameters":{"url":"https://gateway.datagma.net/api/ingress/v2/full","options":{},"sendQuery":true,"queryParameters":{"parameters":[{"name":"apiId","value":"YOUR API KEY"},{"name":"data","value":"=lemlist"},{"name":"companyPremium","value":"true"},{"name":"companyEmployees","value":"true"},{"name":"maxEmployeesReturn","value":"5"},{"name":"employeeTitle","value":"founder"}]}},"typeVersion":3},{"id":"db5851fc-2680-43a8-83f8-20cecced158c","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","disabled":true,"position":[1280,260],"parameters":{"width":1091.436003585227,"height":433.62721861064347,"content":"## Find new leads, update hubspot and add to lemlist\n\n"},"typeVersion":1},{"id":"164ad2b8-e140-46ee-a5f1-47087131e8c2","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-540,-60],"parameters":{"rule":{"interval":[{"triggerAtHour":11}]}},"typeVersion":1},{"id":"a672b3ba-0a24-4a43-b440-1436d85a9804","name":"Set domain","type":"n8n-nodes-base.set","position":[580,100],"parameters":{"values":{"string":[{"name":"domain","value":"={{ $json[\"website\"].replace(/(https?:\\/\\/)?(www\\.)?([^\\/]+)(\\/)?/, '$3') }}"}]},"options":{}},"typeVersion":1},{"id":"9aa851a9-9951-44c6-b002-8a117c3ac0ec","name":"Piloterr - Get Recent Fundraise","type":"n8n-nodes-base.httpRequest","position":[-240,100],"parameters":{"url":"https://piloterr.com/api/v2/crunchbase/funding_rounds","options":{},"sendQuery":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","queryParameters":{"parameters":[{"name":"days_since_announcement","value":"1"},{"name":"investment_type","value":"series_a"}]}},"credentials":{"httpHeaderAuth":{"id":"123","name":"Pilotr"}},"typeVersion":3},{"id":"091d2c46-a5a6-4020-9b05-55b6ea88e5a5","name":"Piloterr - Enrich company","type":"n8n-nodes-base.httpRequest","position":[400,100],"parameters":{"url":"https://piloterr.com/api/v2/crunchbase/company/info","options":{},"sendQuery":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","queryParameters":{"parameters":[{"name":"query","value":"=https://www.crunchbase.com/organization/{{ $json[\"funded_organization_identifier\"][\"permalink\"] }}"}]}},"credentials":{"httpHeaderAuth":{"id":"123","name":"Pilotr"}},"typeVersion":3},{"id":"7b764778-3854-4b6b-9e82-66c8b691d6d5","name":"Loop","type":"n8n-nodes-base.splitInBatches","position":[200,100],"parameters":{"options":{},"batchSize":1},"typeVersion":1},{"id":"da013091-2bed-4af8-b368-1e687f16f4a0","name":"Split results","type":"n8n-nodes-base.itemLists","position":[-20,100],"parameters":{"options":{},"fieldToSplitOut":"results"},"typeVersion":1},{"id":"f780a8b1-3062-48c7-a3e6-9c07b0bb3bd3","name":"email found","type":"n8n-nodes-base.if","position":[1940,500],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"email\"][0][\"email\"] }}","operation":"isNotEmpty"}]}},"typeVersion":1},{"id":"6d67ae9b-fff4-4a50-9eb2-418209292637","name":"Dropcontact","type":"n8n-nodes-base.dropcontact","position":[1760,500],"parameters":{"options":{},"additionalFields":{"company":"={{ $json[\"company\"] }}","website":"","last_name":"={{ $json[\"lastName\"] }}","first_name":"={{ $json[\"firstName\"] }}"}},"credentials":{"dropcontactApi":{"id":"1","name":"Dropcontact account"}},"typeVersion":1},{"id":"e3208ccf-ee73-46aa-9d75-606c6da40249","name":"Wait","type":"n8n-nodes-base.wait","position":[760,700],"webhookId":"ddb98b92-0b2a-43de-9013-99f68f059c97","parameters":{"unit":"seconds"},"typeVersion":1}],"connections":{"Loop":{"main":[[{"node":"Piloterr - Enrich company","type":"main","index":0}]]},"Wait":{"main":[[{"node":"Loop","type":"main","index":0}]]},"Open Deal?":{"main":[[{"node":"Slack - Notify sales team on Slack","type":"main","index":0}]]},"Set domain":{"main":[[{"node":"HubSpot - Search company","type":"main","index":0},{"node":"Wait","type":"main","index":0}]]},"Dropcontact":{"main":[[{"node":"email found","type":"main","index":0}]]},"email found":{"main":[[{"node":"Lemlist - Add lead to campaign","type":"main","index":0}]]},"Split results":{"main":[[{"node":"Loop","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Piloterr - Get Recent Fundraise","type":"main","index":0}]]},"Attempted to contact?":{"main":[[{"node":"HubSpot - Follow up task","type":"main","index":0}]]},"Is Account in Hubspot":{"main":[[{"node":"Attempted to contact?","type":"main","index":0},{"node":"Open Deal?","type":"main","index":0}],[{"node":"Datagma - Enrich Account & Search for contact","type":"main","index":0}]]},"Return only 3 profiles":{"main":[[{"node":"Dropcontact","type":"main","index":0}]]},"HubSpot - Search company":{"main":[[{"node":"Is Account in Hubspot","type":"main","index":0}]]},"Piloterr - Enrich company":{"main":[[{"node":"Set domain","type":"main","index":0}]]},"Piloterr - Get Recent Fundraise":{"main":[[{"node":"Split results","type":"main","index":0}]]},"When clicking \"Execute Workflow\"":{"main":[[{"node":"Piloterr - Get Recent Fundraise","type":"main","index":0}]]},"Datagma - Enrich Account & Search for contact":{"main":[[{"node":"Return only 3 profiles","type":"main","index":0},{"node":"HubSpot Create Account","type":"main","index":0}]]}}}