Automated LinkedIn Engagement Oppurtunities Finder A developer built an automated LinkedIn engagement opportunity finder using n8n, Apify, Google Sheets, Gemini AI, and Slack. The workflow fetches LinkedIn data, processes profiles with AI agents to filter opportunities, saves valid results to Google Sheets, and notifies the team via Slack. The system is customizable by adjusting the AI model temperature for opportunity matching. | { | | | "nodes": | | | { | | | "parameters": { | | | "content": " Automated LinkedIn Engagement Oppurtunities Finder\n\n How it works\n\n1. Fetch LinkedIn data from Apify and Google Sheets.\n2. Process profiles using AI agents to filter opportunities.\n3. Save valid results back to Google Sheets. \n4. Perform additional actor lookups.\n5. Notify the team via Slack notifications.\n\n Setup steps\n\n- - Configure Apify API credentials and required actor parameters.\n- - Set up Google Sheets service account with access to the target documents.\n- - Add Gemini API credentials for the AI Agent nodes.\n- - Configure the Slack webhook URL for notifications.\n\n Customization\n\nAdjust the AI model temperature in the agent nodes to refine the filtering criteria for opportunity matching.", | | | "height": 896, | | | "width": 480 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 5264, | | | 1520 | | | , | | | "id": "e6070c2f-3633-4dd0-8a63-9d5e384e2ea4", | | | "name": "Sticky Note" | | | }, | | | { | | | "parameters": { | | | "content": " Initialize and fetch data\n\nInitializes the workflow with ICP parameters and gathers source data.", | | | "height": 464, | | | "width": 1088, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 5824, | | | 1520 | | | , | | | "id": "953854f0-8b89-4488-ab53-cd31873d6aa2", | | | "name": "Sticky Note1" | | | }, | | | { | | | "parameters": { | | | "content": " Save posts and evaluate AI\n\nSaves processed posts and uses AI to evaluate opportunities.", | | | "height": 480, | | | "width": 576, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 6944, | | | 1616 | | | , | | | "id": "db850744-d317-4877-9a84-8f159b2a8f5c", | | | "name": "Sticky Note2" | | | }, | | | { | | | "parameters": { | | | "content": " Filter and save opportunities\n\nFilters and records the qualified AI-rated opportunities.", | | | "height": 320, | | | "width": 416, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 7552, | | | 1600 | | | , | | | "id": "b7d8a010-8a63-4ce6-9d02-3554dfef0fac", | | | "name": "Sticky Note3" | | | }, | | | { | | | "parameters": { | | | "content": " Aggregate AI rated data\n\nAggregates results and prepares for profile lookups.", | | | "height": 304, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 8000, | | | 1600 | | | , | | | "id": "e9e49ba8-f2d0-4551-8d45-5a61305890b2", | | | "name": "Sticky Note4" | | | }, | | | { | | | "parameters": { | | | "content": " Check existing profiles limit\n\nFetches existing profiles and limits the data processing.", | | | "height": 304, | | | "width": 416, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 8272, | | | 1600 | | | , | | | "id": "8a0365b2-f8dc-43b5-9a0e-c1d4a72c8b43", | | | "name": "Sticky Note5" | | | }, | | | { | | | "parameters": { | | | "content": " Process actor and notify team\n\nProcesses actor data with AI and saves the outcome.", | | | "height": 480, | | | "width": 1172, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 8720, | | | 1600 | | | , | | | "id": "3289de85-c5eb-4c89-bed8-424ee6654855", | | | "name": "Sticky Note6" | | | }, | | | { | | | "parameters": { | | | "content": " Send opportunity via Slack\n\nSecondary trigger to send opportunity notifications.", | | | "height": 304, | | | "width": 400, | | | "color": 7 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": | | | 5840, | | | 2096 | | | , | | | "id": "534ef4ed-f878-4ba8-9160-8158fd4ad4bc", | | | "name": "Sticky Note7" | | | }, | | | { | | | "parameters": { | | | "operation": "Run actor and get dataset", | | | "actorId": { | | | " rl": true, | | | "value": "buIWk2uOUzTmcLsuB", | | | "mode": "list", | | | "cachedResultName": "Linkedin Post Search Scraper No Cookies harvestapi/linkedin-post-search ", | | | "cachedResultUrl": "https://console.apify.com/actors/buIWk2uOUzTmcLsuB/input" | | | }, | | | "customBody": "{\n \"maxPosts\": 20,\n \"maxReactions\": 5,\n \"postNestedComments\": false,\n \"postNestedReactions\": false,\n \"postedLimit\": \"24h\",\n \"scrapeComments\": false,\n \"scrapeReactions\": false,\n \"searchQueries\": \n \"b2b sales\"\n ,\n \"sortBy\": \"relevance\",\n \"profileScraperMode\": \"short\",\n \"startPage\": 1,\n \"reactionsProfileScraperMode\": \"short\",\n \"commentsProfileScraperMode\": \"short\"\n}" | | | }, | | | "type": "@apify/n8n-nodes-apify.apify", | | | "typeVersion": 1, | | | "position": | | | 6320, | | | 1632 | | | , | | | "id": "0d428af6-b493-4c11-a0c8-9a4832b86486", | | | "name": "Run Apify Actor", | | | "credentials": { | | | "apifyApi": { | | | "id": "BfB0f50IUYeX54Cq", | | | "name": "Apify account 2" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "authentication": "serviceAccount", | | | "documentId": { | | | " rl": true, | | | "value": "110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY", | | | "mode": "list", | | | "cachedResultName": "Linkedin Outreach oppurtunities", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit gid=0" | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheets", | | | "typeVersion": 4.7, | | | "position": | | | 6320, | | | 1824 | | | , | | | "id": "40f382f3-3cc2-4e4d-bcf7-80bb9309a30e", | | | "name": "Read LinkedIn Sheet", | | | "credentials": { | | | "googleApi": { | | | "id": "mYRmmCMyWcLawmcE", | | | "name": "Google Service Account account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "mode": "combine", | | | "fieldsToMatchString": "id", | | | "joinMode": "keepNonMatches", | | | "outputDataFrom": "input1", | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.merge", | | | "typeVersion": 3.2, | | | "position": | | | 6544, | | | 1728 | | | , | | | "id": "ef9510f5-d40a-48be-8771-971c28245dc9", | | | "name": "Merge Source Data" | | | }, | | | { | | | "parameters": { | | | "promptType": "define", | | | "text": "=Post content: {{ $json.post content }}\nGive confidence only the percentage for 100. eg. 95/100", | | | "hasOutputParser": true, | | | "options": { | | | "systemMessage": "=You are an expert B2B Social Selling Strategist and Lead Generation Analyst. Your objective is to analyze scraped LinkedIn posts and determine if they present a high-value opportunity for our agency to engage via a comment to attract our Ideal Customer Profile ICP .\n\n Our Business Context: \n{{ $ 'Set ICP Parameters' .item.json.ICP }}\n\n Evaluation Criteria for a \"True\" Opportunity: \nFlag the post as true ONLY if it meets at least one of these conditions:\n1. Pain Points: The author mentions struggles with lead generation, sales pipelines, outreach volume, CRM data entry, or marketing inefficiencies.\n2. Seeking Solutions: The author asks for recommendations on tools, workflows, or strategies to scale or improve sales/marketing operations.\n3. Relevant Discourse: The post discusses scaling, modernizing B2B sales, or automation where we can drop a high-value, non-promotional expert perspective.\n\n Exclusion Criteria Flag as \"False\" : \n- Generic motivational posts, \"broetry,\" or personal updates.\n- Direct competitors promoting their own AI/automation services.\n- Standard job postings or hiring announcements.\n- Posts just sharing a link without substantive commentary.\n\n Output Format Requirements: \nYou must return your analysis STRICTLY as a valid JSON object. Do not wrap the JSON in markdown code blocks. Do not include any conversational text." | | | } | | | }, | | | "type": "@n8n/n8n-nodes-langchain.agent", | | | "typeVersion": 3.1, | | | "position": | | | 7216, | | | 1728 | | | , | | | "id": "7c718910-cd02-4855-ac28-bd3e04804e88", | | | "name": "Opportunity Evaluator Agent" | | | }, | | | { | | | "parameters": { | | | "modelName": "models/gemini-3.1-flash-lite", | | | "options": {} | | | }, | | | "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", | | | "typeVersion": 1.1, | | | "position": | | | 7168, | | | 1936 | | | , | | | "id": "7df002fe-c415-4d2f-a3d8-1eed0d4f32c0", | | | "name": "Gemini Chat Model", | | | "credentials": { | | | "googlePalmApi": { | | | "id": "x2sCC1GX3iizemFd", | | | "name": "vaar@bnkar" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "conditions": { | | | "options": { | | | "caseSensitive": true, | | | "leftValue": "", | | | "typeValidation": "loose", | | | "version": 3 | | | }, | | | "conditions": | | | { | | | "id": "87b2fac1-b993-446c-8f29-1d9424038029", | | | "leftValue": "={{ parseInt $json.output.confidence score }}", | | | "rightValue": 80, | | | "operator": { | | | "type": "number", | | | "operation": "gt" | | | } | | | }, | | | { | | | "id": "c2c45010-c05e-4aae-8886-bf09783b9496", | | | "leftValue": "={{ $json.output.is opportunity }}", | | | "rightValue": "", | | | "operator": { | | | "type": "boolean", | | | "operation": "true", | | | "singleValue": true | | | } | | | } | | | , | | | "combinator": "and" | | | }, | | | "looseTypeValidation": true, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.if", | | | "typeVersion": 2.3, | | | "position": | | | 7600, | | | 1728 | | | , | | | "id": "da615ac1-7914-4d2e-9890-311aa16a8545", | | | "name": "If Opportunity Qualified" | | | }, | | | { | | | "parameters": { | | | "assignments": { | | | "assignments": | | | { | | | "id": "2a7ef3fe-260d-4b7e-96c1-d823a75a9afd", | | | "name": "ICP", | | | "value": "We are blankarray an AI automation company, I do work for b2b companies and automate thier sales & marketing pipelines.", | | | "type": "string" | | | } | | | | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.set", | | | "typeVersion": 3.4, | | | "position": | | | 6096, | | | 1728 | | | , | | | "id": "eaae92a7-8f72-46f8-8d61-7c2b8aaa3777", | | | "name": "Set ICP Parameters" | | | }, | | | { | | | "parameters": { | | | "jsonSchemaExample": "{\n \"is opportunity\": \"boolean\",\n \"confidence score\": \"1-100 \",\n \"reasoning\": \"A concise 1-2 sentence explanation of why this post is or isn't a fit.\",\n \"comment angle\": \"If true, provide a 1-sentence strategic angle on how we should comment e.g., 'Share how AI agents can automate this specific manual step.' . If false, output null.\"\n}" | | | }, | | | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", | | | "typeVersion": 1.3, | | | "position": | | | 7360, | | | 1952 | | | , | | | "id": "ea5a4f69-76d1-4e1c-952d-7807d1dab951", | | | "name": "Parse Opportunity Output" | | | }, | | | { | | | "parameters": { | | | "modelName": "models/gemini-3.1-flash-lite", | | | "options": {} | | | }, | | | "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", | | | "typeVersion": 1.1, | | | "position": | | | 8960, | | | 1936 | | | , | | | "id": "09887e04-ceea-4ee3-9c43-c5a614493697", | | | "name": "Gemini Chat Model Profile", | | | "credentials": { | | | "googlePalmApi": { | | | "id": "x2sCC1GX3iizemFd", | | | "name": "vaar@bnkar" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "promptType": "define", | | | "text": "= Basic Profile Data\n\n First Name: {{ $json.firstName }} \n Last Name: {{ $json.lastName }} \n LinkedIn Profile: {{ $json.linkedinUrl }} \n Location: {{ $json.location.parsed.text }} \n Headline: {{ $json.headline }} \n About / Summary: {{ $json.about }} \n\n Current Position First item in the array \n\n Current Title: {{ $json.currentPosition 0 .position }} \n Current Company: {{ $json.currentPosition 0 .companyName }} \n Current Start Date: {{ $json.currentPosition 0 .startDate.text }} \n\n Past Experience Second item in the experience array \n\n Past Title: {{ $json.experience 1 .position }} \n Past Company: {{ $json.experience 1 .companyName }} \n Past Start Date: {{ $json.experience 1 .startDate.text }} \n\n Education First item in the array \n\n School Name: {{ $json.education 0 .schoolName }} \n Degree: {{ $json.education 0 .degree }} \n Field of Study: {{ $json.education 0 .fieldOfStudy }} \n\n Skills:\n{{ $json.skills.map skill = skill.name .join ', ' }}\n\nCERTIFICATES:\n{{ $json.certifications.map cert = cert.title .join ', ' }}\n", | | | "hasOutputParser": true, | | | "options": { | | | "systemMessage": "=You are an expert B2B Lead Qualification Engine and ICP Matching AI. \n\nYour strict objective is to evaluate a candidate's professional profile against a defined Ideal Customer Profile ICP and determine if they are a qualified target.\n\n IDEAL CUSTOMER PROFILE ICP TO MATCH AGAINST:\n{{ $ 'Set ICP Parameters' .first .json.ICP }}\n\n YOUR INSTRUCTIONS:\n1. Analyze the provided Profile Data Contact, Summary, Roles, Education, Skills, and Certifications .\n2. Compare the profile attributes directly against the ICP requirements.\n3. Weigh seniority, current/past roles, and stated skills heavily. Look for semantic matches e.g., \"Cybersecurity Leader\" matches \"CISO\" .\n5. Generate a qualification score from 0 to 100 based on alignment.\n\n REQUIRED OUTPUT FORMAT:\nYou must return your analysis as a valid, raw JSON object. Do not include markdown formatting like \\ \\ \\ json. Output EXACTLY the given structure\n" | | | } | | | }, | | | "type": "@n8n/n8n-nodes-langchain.agent", | | | "typeVersion": 3.1, | | | "position": | | | 8992, | | | 1712 | | | , | | | "id": "1e584260-8cfc-4e4b-ba20-844ef7df2515", | | | "name": "Profile Analyzer Agent", | | | "retryOnFail": true | | | }, | | | { | | | "parameters": { | | | "operation": "Run actor and get dataset", | | | "actorId": { | | | " rl": true, | | | "value": "LpVuK3Zozwuipa5bp", | | | "mode": "id" | | | }, | | | "customBody": "={\n \"profileScraperMode\": \"Profile details no email $4 per 1k \",\n \"queries\": \n \"{{ $json.post author profile }}\"\n \n}" | | | }, | | | "type": "@apify/n8n-nodes-apify.apify", | | | "typeVersion": 1, | | | "position": | | | 8768, | | | 1728 | | | , | | | "id": "0a7de076-280e-42f0-8fa7-c3523811c695", | | | "name": "Run Profile Scraper Actor", | | | "credentials": { | | | "apifyApi": { | | | "id": "BfB0f50IUYeX54Cq", | | | "name": "Apify account 2" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "jsonSchemaExample": "{\n \"is match\": true,\n \"qualification score\": \"0-100\",\n \"executive summary\": \"A 2-sentence summary of why this candidate is or isn't a fit.\"\n}" | | | }, | | | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", | | | "typeVersion": 1.3, | | | "position": | | | 9168, | | | 1952 | | | , | | | "id": "e36dd8cd-9032-4210-95d4-59df52744681", | | | "name": "Parse Profile Output" | | | }, | | | { | | | "parameters": { | | | "authentication": "serviceAccount", | | | "operation": "appendOrUpdate", | | | "documentId": { | | | " rl": true, | | | "value": "187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk", | | | "mode": "list", | | | "cachedResultName": "Profile scraper", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk/edit gid=0" | | | }, | | | "columns": { | | | "mappingMode": "defineBelow", | | | "value": { | | | "LinkedIn Profile": "={{ $ 'Run Profile Scraper Actor' .item.json.linkedinUrl }}", | | | "First Name": "={{ $ 'Run Profile Scraper Actor' .item.json.firstName }}", | | | "Last Name": "={{ $ 'Run Profile Scraper Actor' .item.json.lastName }}", | | | "Headline": "={{ $ 'Run Profile Scraper Actor' .item.json.headline }}", | | | "Location": "={{ $ 'Run Profile Scraper Actor' .item.json.location.parsed.text }}", | | | "About": "={{ $ 'Run Profile Scraper Actor' .item.json.about }}", | | | "Current Title": "={{ $ 'Run Profile Scraper Actor' .item.json.currentPosition 0 .position }}", | | | "Current Company": "={{ $ 'Run Profile Scraper Actor' .item.json.currentPosition 0 .companyName }}", | | | "Current Start Date": "={{ $ 'Run Profile Scraper Actor' .item.json.currentPosition 0 .startDate.text }}", | | | "School Name": "={{ $ 'Run Profile Scraper Actor' .item.json.profileTopEducation 0 .schoolName }}", | | | "Degree": "={{ $ 'Run Profile Scraper Actor' .item.json.profileTopEducation 0 .degree }}", | | | "Field of Study": "={{ $ 'Run Profile Scraper Actor' .item.json.profileTopEducation 0 .fieldOfStudy }}", | | | "Skills": "={{ $ 'Run Profile Scraper Actor' .item.json.skills }}", | | | "Certifications": "={{ $ 'Run Profile Scraper Actor' .item.json.certifications }}", | | | "match": "={{ $json.output.is match }}", | | | "confidence score": "={{ $json.output.qualification score }}", | | | "executive summary": "={{ $json.output.executive summary }}" | | | }, | | | "matchingColumns": | | | "LinkedIn Profile" | | | , | | | "schema": | | | { | | | "id": "First Name", | | | "displayName": "First Name", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Last Name", | | | "displayName": "Last Name", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "LinkedIn Profile", | | | "displayName": "LinkedIn Profile", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "match", | | | "displayName": "match", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "confidence score", | | | "displayName": "confidence score", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "executive summary", | | | "displayName": "executive summary", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Location", | | | "displayName": "Location", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Headline", | | | "displayName": "Headline", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "About", | | | "displayName": "About", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Current Title", | | | "displayName": "Current Title", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Current Company", | | | "displayName": "Current Company", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Current Start Date", | | | "displayName": "Current Start Date", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Past Title", | | | "displayName": "Past Title", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "Past Company", | | | "displayName": "Past Company", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "Past Start Date", | | | "displayName": "Past Start Date", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "School Name", | | | "displayName": "School Name", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Degree", | | | "displayName": "Degree", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Field of Study", | | | "displayName": "Field of Study", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Skills", | | | "displayName": "Skills", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "Certifications", | | | "displayName": "Certifications", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | } | | | , | | | "attemptToConvertTypes": false, | | | "convertFieldsToString": false | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheets", | | | "typeVersion": 4.7, | | | "position": | | | 9344, | | | 1712 | | | , | | | "id": "6635bf93-b062-40f2-8306-cb69c9f789de", | | | "name": "Update Profile in Sheets", | | | "credentials": { | | | "googleApi": { | | | "id": "mYRmmCMyWcLawmcE", | | | "name": "Google Service Account account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "authentication": "serviceAccount", | | | "operation": "appendOrUpdate", | | | "documentId": { | | | " rl": true, | | | "value": "110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY", | | | "mode": "list", | | | "cachedResultName": "Linkedin Outreach oppurtunities", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit gid=0" | | | }, | | | "columns": { | | | "mappingMode": "defineBelow", | | | "value": { | | | "id": "={{ $json.id }}", | | | "post link": "={{ $json.linkedinUrl }}", | | | "post content": "={{ $json.content }}", | | | "post author profile": "={{ $json.author.linkedinUrl.split '?' 0 }}", | | | "profile tag": "={{ $json.author.info }}", | | | "posted at": "={{ $json.postedAt.date }}" | | | }, | | | "matchingColumns": | | | "id" | | | , | | | "schema": | | | { | | | "id": "id", | | | "displayName": "id", | | | "required": false, | | | "defaultMatch": true, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "post link", | | | "displayName": "post link", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "post content", | | | "displayName": "post content", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "post author profile", | | | "displayName": "post author profile", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "profile tag", | | | "displayName": "profile tag", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "posted at", | | | "displayName": "posted at", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | } | | | , | | | "attemptToConvertTypes": false, | | | "convertFieldsToString": false | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheets", | | | "typeVersion": 4.7, | | | "position": | | | 6992, | | | 1728 | | | , | | | "id": "2468362b-5ce4-4248-9686-33d4cc21b716", | | | "name": "Save Unique Posts to Sheets", | | | "credentials": { | | | "googleApi": { | | | "id": "mYRmmCMyWcLawmcE", | | | "name": "Google Service Account account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "authentication": "serviceAccount", | | | "operation": "update", | | | "documentId": { | | | " rl": true, | | | "value": "110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY", | | | "mode": "list", | | | "cachedResultName": "Linkedin Outreach oppurtunities", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit gid=0" | | | }, | | | "columns": { | | | "mappingMode": "defineBelow", | | | "value": { | | | "id": "={{ $ 'Merge Source Data' .item.json.id }}", | | | "comment oppurtunity": "true", | | | "confidence score": "={{ parseInt $json.output.confidence score }}", | | | "reasoning": "={{ $json.output.reasoning }}", | | | "comment angle": "={{ $json.output.comment angle }}" | | | }, | | | "matchingColumns": | | | "id" | | | , | | | "schema": | | | { | | | "id": "id", | | | "displayName": "id", | | | "required": false, | | | "defaultMatch": true, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "post link", | | | "displayName": "post link", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "post content", | | | "displayName": "post content", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "post author profile", | | | "displayName": "post author profile", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "profile tag", | | | "displayName": "profile tag", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "posted at", | | | "displayName": "posted at", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": true | | | }, | | | { | | | "id": "comment oppurtunity", | | | "displayName": "comment oppurtunity", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true | | | }, | | | { | | | "id": "confidence score", | | | "displayName": "confidence score", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "reasoning", | | | "displayName": "reasoning", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "comment angle", | | | "displayName": "comment angle", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "string", | | | "canBeUsedToMatch": true, | | | "removed": false | | | }, | | | { | | | "id": "row number", | | | "displayName": "row number", | | | "required": false, | | | "defaultMatch": false, | | | "display": true, | | | "type": "number", | | | "canBeUsedToMatch": true, | | | "readOnly": true, | | | "removed": true | | | } | | | , | | | "attemptToConvertTypes": false, | | | "convertFieldsToString": false | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheets", | | | "typeVersion": 4.7, | | | "position": | | | 7824, | | | 1712 | | | , | | | "id": "7a24f1c1-83b2-4218-8cdd-1e52d8a08f07", | | | "name": "Update Evaluated Opportunity", | | | "credentials": { | | | "googleApi": { | | | "id": "mYRmmCMyWcLawmcE", | | | "name": "Google Service Account account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "authentication": "serviceAccount", | | | "documentId": { | | | " rl": true, | | | "value": "187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk", | | | "mode": "list", | | | "cachedResultName": "Profile scraper", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/187HJg-iPgjnbcPL4rMU094z9U6-6jzy CsQZ pw4Bbk/edit gid=0" | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheets", | | | "typeVersion": 4.7, | | | "position": | | | 8320, | | | 1728 | | | , | | | "id": "532c7d28-68a2-4518-8484-bce359ddcb0e", | | | "name": "Read Shortlisted Profiles Sheet", | | | "alwaysOutputData": true, | | | "credentials": { | | | "googleApi": { | | | "id": "mYRmmCMyWcLawmcE", | | | "name": "Google Service Account account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "jsCode": "// Get all items from the Limit node\nconst limitItems = $ 'Save Unique Posts to Sheets' .all ;\n\n// Get all items coming into this Code node\nconst inputItems = $input.all ;\n\n// Normalize helper - lowercase, trim, strip trailing slash for safer comparison\nfunction normalize url {\n if url return '';\n return url.toString .trim .toLowerCase .replace /\\/+$/, '' ;\n}\n\n// Build a Set of all LinkedIn Profile URLs from the input\nconst inputProfileSet = new Set \n inputItems\n .map item = normalize item.json 'LinkedIn Profile' \n .filter url = url == '' \n ;\n\n// Filter Limit items: keep only those whose post author profile\n// does NOT match any LinkedIn Profile in the input\nconst uniqueItems = limitItems.filter item = {\n const profileUrl = normalize item.json.post author profile ;\n return profileUrl == '' && inputProfileSet.has profileUrl ;\n} ;\n\n// Return the unique items deduped by profile url, keeping first occurrence \nconst seen = new Set ;\nconst result = ;\n\nfor const item of uniqueItems {\n const profileUrl = normalize item.json.post author profile ;\n if seen.has profileUrl {\n seen.add profileUrl ;\n result.push {\n json: {\n post author profile: item.json.post author profile\n }\n } ;\n }\n}\n\nreturn result;" | | | }, | | | "type": "n8n-nodes-base.code", | | | "typeVersion": 2, | | | "position": | | | 8544, | | | 1728 | | | , | | | "id": "ebc6e7eb-1c6b-477c-a137-7ed0416f982c", | | | "name": "Filter Existing Profiles" | | | }, | | | { | | | "parameters": { | | | "select": "channel", | | | "channelId": { | | | " rl": true, | | | "value": "C0B8VH1M5PX", | | | "mode": "list", | | | "cachedResultName": "general" | | | }, | | | "text": "=Shortlisted a Linkedin profile for Connection Request: {{ $ 'Filter Existing Profiles' .item.json.post author profile }}", | | | "otherOptions": {} | | | }, | | | "type": "n8n-nodes-base.slack", | | | "typeVersion": 2.5, | | | "position": | | | 9776, | | | 1696 | | | , | | | "id": "9ce8a55a-a696-4d30-b708-b4f830688423", | | | "name": "Send Slack Notification", | | | "webhookId": "0801d095-77a2-4049-bf87-674c5012bd22", | | | "credentials": { | | | "slackApi": { | | | "id": "uBs2LjzTiloElvwT", | | | "name": "Slack account 2" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "maxItems": 2 | | | }, | | | "type": "n8n-nodes-base.limit", | | | "typeVersion": 1, | | | "position": | | | 6768, | | | 1728 | | | , | | | "id": "ac022e81-930c-4da8-8560-0a52c161a7ba", | | | "name": "Limit to 2 Items" | | | }, | | | { | | | "parameters": { | | | "aggregate": "aggregateAllItemData", | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.aggregate", | | | "typeVersion": 1, | | | "position": | | | 8048, | | | 1728 | | | , | | | "id": "a1333b2f-ab9b-4f86-a9a2-43be0fa63199", | | | "name": "Aggregate Processed Items" | | | }, | | | { | | | "parameters": { | | | "pollTimes": { | | | "item": | | | { | | | "mode": "everyMinute" | | | } | | | | | | }, | | | "documentId": { | | | " rl": true, | | | "value": "110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY", | | | "mode": "list", | | | "cachedResultName": "Linkedin Outreach oppurtunities", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit?usp=drivesdk" | | | }, | | | "sheetName": { | | | " rl": true, | | | "value": "gid=0", | | | "mode": "list", | | | "cachedResultName": "Sheet1", | | | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110fWQXqWcQnve7AOidnQiA0crnvmSP65VgLSDoLcQmY/edit gid=0" | | | }, | | | "event": "rowUpdate", | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.googleSheetsTrigger", | | | "typeVersion": 1, | | | "position": | | | 5888, | | | 2224 | | | , | | | "id": "1e9d236e-c575-46e8-80e7-bdda060a76f0", | | | "name": "When Row Added in Sheets", | | | "credentials": { | | | "googleSheetsTriggerOAuth2Api": { | | | "id": "vSNsqlkjglCa1Dtc", | | | "name": "Google Sheets Trigger account" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "select": "channel", | | | "channelId": { | | | " rl": true, | | | "value": "C0B8VH1M5PX", | | | "mode": "list", | | | "cachedResultName": "general" | | | }, | | | "text": "=We have found you a comment oppurtunity from linkedin in your niche.\nPost Link:{{ $json.post link }}\nReasoning:{{ $json.reasoning }}\nComment Angle: {{ $json.comment angle }}", | | | "otherOptions": {} | | | }, | | | "type": "n8n-nodes-base.slack", | | | "typeVersion": 2.5, | | | "position": | | | 6096, | | | 2224 | | | , | | | "id": "83f58029-96b5-4a59-8a7c-687629502cef", | | | "name": "Send Comment Alert to Slack", | | | "webhookId": "075757a5-56eb-4e25-bb3f-af894430d36d", | | | "credentials": { | | | "slackApi": { | | | "id": "uBs2LjzTiloElvwT", | | | "name": "Slack account 2" | | | } | | | } | | | }, | | | { | | | "parameters": { | | | "rule": { | | | "interval": | | | {} | | | | | | } | | | }, | | | "type": "n8n-nodes-base.scheduleTrigger", | | | "typeVersion": 1.3, | | | "position": | | | 5872, | | | 1728 | | | , | | | "id": "35ad8b7b-b277-4928-aac0-9b178d5e6e75", | | | "name": "Schedule Trigger" | | | }, | | | { | | | "parameters": { | | | "conditions": { | | | "options": { | | | "caseSensitive": true, | | | "leftValue": "", | | | "typeValidation": "strict", | | | "version": 3 | | | }, | | | "conditions": | | | { | | | "id": "b5873ae1-908a-4de8-9999-324148a89427", | | | "leftValue": "={{ $json.match }}", | | | "rightValue": false, | | | "operator": { | | | "type": "boolean", | | | "operation": "true", | | | "singleValue": true | | | } | | | } | | | , | | | "combinator": "and" | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.if", | | | "typeVersion": 2.3, | | | "position": | | | 9552, | | | 1712 | | | , | | | "id": "cdbfbdfc-a542-4e32-913e-c8bcc0bc1398", | | | "name": "If" | | | } | | | , | | | "connections": { | | | "Run Apify Actor": { | | | "main": | | | | | | { | | | "node": "Merge Source Data", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Read LinkedIn Sheet": { | | | "main": | | | | | | { | | | "node": "Merge Source Data", | | | "type": "main", | | | "index": 1 | | | } | | | | | | | | | }, | | | "Merge Source Data": { | | | "main": | | | | | | { | | | "node": "Limit to 2 Items", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Opportunity Evaluator Agent": { | | | "main": | | | | | | { | | | "node": "If Opportunity Qualified", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Gemini Chat Model": { | | | "ai languageModel": | | | | | | { | | | "node": "Opportunity Evaluator Agent", | | | "type": "ai languageModel", | | | "index": 0 | | | } | | | | | | | | | }, | | | "If Opportunity Qualified": { | | | "main": | | | | | | { | | | "node": "Update Evaluated Opportunity", | | | "type": "main", | | | "index": 0 | | | } | | | , | | | | | | | | | }, | | | "Set ICP Parameters": { | | | "main": | | | | | | { | | | "node": "Run Apify Actor", | | | "type": "main", | | | "index": 0 | | | }, | | | { | | | "node": "Read LinkedIn Sheet", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Parse Opportunity Output": { | | | "ai outputParser": | | | | | | { | | | "node": "Opportunity Evaluator Agent", | | | "type": "ai outputParser", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Gemini Chat Model Profile": { | | | "ai languageModel": | | | | | | { | | | "node": "Profile Analyzer Agent", | | | "type": "ai languageModel", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Profile Analyzer Agent": { | | | "main": | | | | | | { | | | "node": "Update Profile in Sheets", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Run Profile Scraper Actor": { | | | "main": | | | | | | { | | | "node": "Profile Analyzer Agent", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Parse Profile Output": { | | | "ai outputParser": | | | | | | { | | | "node": "Profile Analyzer Agent", | | | "type": "ai outputParser", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Update Profile in Sheets": { | | | "main": | | | | | | { | | | "node": "If", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Save Unique Posts to Sheets": { | | | "main": | | | | | | { | | | "node": "Opportunity Evaluator Agent", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Update Evaluated Opportunity": { | | | "main": | | | | | | { | | | "node": "Aggregate Processed Items", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Read Shortlisted Profiles Sheet": { | | | "main": | | | | | | { | | | "node": "Filter Existing Profiles", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Filter Existing Profiles": { | | | "main": | | | | | | { | | | "node": "Run Profile Scraper Actor", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Limit to 2 Items": { | | | "main": | | | | | | { | | | "node": "Save Unique Posts to Sheets", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Aggregate Processed Items": { | | | "main": | | | | | | { | | | "node": "Read Shortlisted Profiles Sheet", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "When Row Added in Sheets": { | | | "main": | | | | | | { | | | "node": "Send Comment Alert to Slack", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "Schedule Trigger": { | | | "main": | | | | | | { | | | "node": "Set ICP Parameters", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | }, | | | "If": { | | | "main": | | | | | | { | | | "node": "Send Slack Notification", | | | "type": "main", | | | "index": 0 | | | } | | | | | | | | | } | | | }, | | | "pinData": {}, | | | "meta": { | | | "templateCredsSetupCompleted": true, | | | "instanceId": "93f396852104089b8670e7494b0f3668b420464668ae4a8c1d6b4b5799f8e3ef" | | | } | | | } |