This workflow corresponds to n8n.io template #15265 — we link there as the canonical source.
This workflow follows the Apifyn8N Nodes Apify → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "isdhCChy6Ms90ATQ",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Enrich company leads and extract decision-maker contacts using Linkfinder AI",
"tags": [],
"nodes": [
{
"id": "fff0a652-fce3-4116-b507-7ac959e48917",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-864
],
"parameters": {
"width": 480,
"height": 592,
"content": "## Company Enrichment Lead Generation\n\n### How it works\n\nThe workflow fetches data from Google Sheets to identify new status entries.\nIt extracts domains from existing data or utilizes AI to process domain information.\nA web scraping module scrapes websites to gather HTML content.\nAI agencies process the scraped content to classify them as an employer or agency.\nIdentified employers undergo further enrichment through API calls and saved back to Google Sheets.\nContacts information is processed, emails and LinkedIn profiles are amended, and results are stored.\n\n### Setup steps\n\n- [ ] Set up Google Sheets API credentials for access to existing spreadsheets.\n- [ ] Configure OpenAI API credentials for AI processing nodes.\n- [ ] Ensure Apify and LinkFinder AI API keys are configured for data scraping nodes.\n- [ ] Customize domain extraction logic to suit specific data patterns.\n\n"
},
"typeVersion": 1
},
{
"id": "eeabe911-5d0f-41a0-840d-fcb0d37371af",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-672
],
"parameters": {
"color": 7,
"width": 416,
"height": 304,
"content": "## Workflow trigger and initialization\n\nInitial trigger to start the workflow, fetching initial data from Google Sheets."
},
"typeVersion": 1
},
{
"id": "c6f55328-5d3c-40b1-beb1-14b19b844c84",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1216,
-704
],
"parameters": {
"color": 7,
"height": 320,
"content": "## Filter new status\n\nFilter rows to find entries with a new status for processing."
},
"typeVersion": 1
},
{
"id": "c68d61a7-3c36-4148-a215-105dc478ba82",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
-672
],
"parameters": {
"color": 7,
"width": 416,
"height": 320,
"content": "## Batch and read companies\n\nSplit data into batches and read existing companies from the sheet."
},
"typeVersion": 1
},
{
"id": "78a75e98-49f8-4ebf-b515-84b86974b347",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1936,
-656
],
"parameters": {
"color": 7,
"width": 1360,
"height": 400,
"content": "## Domain handling process\n\nDecision-making for domain existence and extraction from email; AI domain prediction if needed."
},
"typeVersion": 1
},
{
"id": "59cf3930-ba08-4a41-8818-00df3b566b94",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3344,
-976
],
"parameters": {
"color": 7,
"width": 1024,
"height": 464,
"content": "## Website scraping\n\nScrape website based on processed domain and evaluate website content with AI."
},
"typeVersion": 1
},
{
"id": "8d10e786-106b-4c1f-a868-df5aeb8619e4",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
4400,
-896
],
"parameters": {
"color": 7,
"width": 1056,
"height": 528,
"content": "## AI classification and action\n\nClassify content using AI and determine actions (e.g., enrich with data or skip)."
},
"typeVersion": 1
},
{
"id": "fbe694f9-94e5-4de3-a277-9d30d8b13b15",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
3328,
-480
],
"parameters": {
"color": 7,
"height": 320,
"content": "## Mark entities\n\nMark entries as required or not for enrichment within Google Sheets."
},
"typeVersion": 1
},
{
"id": "92793d1f-cc19-42bc-8b00-6f5029a96535",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1136,
1056
],
"parameters": {
"color": 7,
"width": 672,
"height": 240,
"content": "## Initialization and status filters"
},
"typeVersion": 1
},
{
"id": "98f9fb4d-8a61-4ed5-99cc-c57de38741cc",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1904,
896
],
"parameters": {
"color": 7,
"width": 1632,
"height": 384,
"content": "## Employer process branching\n\nDecide on further processing based on employer classification (e.g., API actions, contact enrichment)."
},
"typeVersion": 1
},
{
"id": "7c90f243-f423-4d45-b69b-ae31ba3f25ef",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
2656,
512
],
"parameters": {
"color": 7,
"width": 368,
"height": 352,
"content": "## AI and contact data merge\n\nExecute AI to select top contacts, parse the result, and handle missing information."
},
"typeVersion": 1
},
{
"id": "ce051e61-6e93-4723-b6b0-8c7b33599508",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1632,
304
],
"parameters": {
"color": 7,
"height": 720,
"content": "## HR employee scraping\n\nUse API calls to gather HR employee data from an external source."
},
"typeVersion": 1
},
{
"id": "4eeb25db-a12e-40ee-93ee-6537c68e37f6",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
2208,
1312
],
"parameters": {
"color": 7,
"width": 416,
"height": 304,
"content": "## Employer enrichment\n\nRun external data actor and process the dataset for potential employer data enrichment."
},
"typeVersion": 1
},
{
"id": "bccaf798-5419-4f42-adcd-cc1cd617b4a0",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
3904,
800
],
"parameters": {
"color": 7,
"width": 880,
"height": 528,
"content": "## Contact processing and saving\n\nParse selected contact information and save enriched results to Google Sheets."
},
"typeVersion": 1
},
{
"id": "9debd6e0-2cda-490d-9064-e980870371d8",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
3648,
1360
],
"parameters": {
"color": 7,
"width": 912,
"height": 624,
"content": "## LinkedIn processing\n\nEvaluate LinkedIn presence and scrape profile data if available."
},
"typeVersion": 1
},
{
"id": "55dd9e1c-6b1e-4bd8-b385-917e06117b44",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
1936,
1328
],
"parameters": {
"color": 7,
"height": 304,
"content": "## Agency marking\n\nMark entries as agency-related within Google Sheets."
},
"typeVersion": 1
},
{
"id": "e19594b6-d02d-4401-8b75-940d000e4778",
"name": "Filter New Status Rows",
"type": "n8n-nodes-base.filter",
"position": [
1264,
-544
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "NEW"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.3
},
{
"id": "0e857b2b-b0e8-478d-84d0-bb7df7a63c00",
"name": "Mark as No Domain",
"type": "n8n-nodes-base.googleSheets",
"position": [
3376,
-320
],
"parameters": {
"columns": {
"value": {
"status": "NOT_ENRICHED",
"company_id": "={{ $json.company_id }}"
},
"schema": [
{
"id": "company_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_location",
"type": "string",
"display": true,
"required": false,
"displayName": "company_location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_emails",
"type": "string",
"display": true,
"required": false,
"displayName": "company_emails",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_count",
"type": "string",
"display": true,
"required": false,
"displayName": "job_count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intent_score",
"type": "string",
"display": true,
"required": false,
"displayName": "intent_score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website",
"type": "string",
"display": true,
"required": false,
"displayName": "company_website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_linkedin",
"type": "string",
"display": true,
"required": false,
"displayName": "company_linkedin",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_type",
"type": "string",
"display": true,
"required": false,
"displayName": "company_type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total_contacts_found",
"type": "string",
"display": true,
"required": false,
"displayName": "total_contacts_found",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_job_detected_at",
"type": "string",
"display": true,
"required": false,
"displayName": "last_job_detected_at",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reason",
"type": "string",
"display": true,
"required": false,
"displayName": "reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website_content",
"type": "string",
"display": true,
"required": false,
"displayName": "company_website_content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "enriched_at",
"type": "string",
"display": true,
"required": false,
"displayName": "enriched_at",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.7
},
{
"id": "7ffeded1-9afd-4629-a1e7-71c3bffd25bb",
"name": "Update with Company Domain",
"type": "n8n-nodes-base.googleSheets",
"position": [
3392,
-688
],
"parameters": {
"columns": {
"value": {
"company_id": "={{ $json.company_id }}",
"company_website": "={{ \n $json.company_website || $node[\"Loop Over Items1\"].json.company_website \n}}",
"company_linkedin": "={{ $json.company_linkedin }}"
},
"schema": [
{
"id": "company_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_location",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_emails",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_emails",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_count",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "job_count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intent_score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intent_score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website",
"type": "string",
"display": true,
"required": false,
"displayName": "company_website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_linkedin",
"type": "string",
"display": true,
"required": false,
"displayName": "company_linkedin",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_type",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total_contacts_found",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "total_contacts_found",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_job_detected_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "last_job_detected_at",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reason",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website_content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website_content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "enriched_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "enriched_at",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.7
},
{
"id": "6648fbe9-e695-4492-a61c-86df5958f0b2",
"name": "Fetch Website Data",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
3568,
-688
],
"parameters": {
"url": "={{ $json.company_website.startsWith('http') ? $json.company_website : 'https://' + $json.company_website }}",
"options": {
"timeout": 15000,
"response": {
"response": {
"responseFormat": "text"
}
}
},
"jsonHeaders": "{\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/122.0.0.0 Safari/537.36\",\n \"Accept\": \"text/html,application/xhtml+xml\",\n \"Accept-Language\": \"en-US,en;q=0.9\"\n}",
"sendHeaders": true,
"specifyHeaders": "json"
},
"notesInFlow": true,
"typeVersion": 4.4,
"alwaysOutputData": true
},
{
"id": "cfd2f385-e93e-48d7-9390-e7b466f663b5",
"name": "Extract HTML from Response",
"type": "n8n-nodes-base.html",
"position": [
4016,
-672
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "body_text",
"cssSelector": "body"
},
{
"key": "headings",
"cssSelector": "headings",
"returnArray": true
},
{
"key": "paragraphs",
"cssSelector": "p",
"returnArray": true
},
{
"key": "links",
"attribute": "href",
"cssSelector": "a",
"returnArray": true,
"returnValue": "attribute"
},
{
"key": "meta_description",
"attribute": "content",
"cssSelector": "meta[name=\"description\"]",
"returnValue": "attribute"
},
{
"key": "title",
"cssSelector": "title",
"skipSelectors": "script, style, noscript, svg, img, header, footer, nav"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "e98399e7-7209-4b55-80c9-d3c9b36491e2",
"name": "Clean Extracted Text",
"type": "n8n-nodes-base.code",
"position": [
4224,
-672
],
"parameters": {
"jsCode": "const data = $json;\n\nconst cleanText = (arr) => {\n if (!arr) return '';\n return Array.isArray(arr)\n ? arr.join(' ').replace(/\\s+/g, ' ').trim()\n : arr;\n};\n\nreturn [{\n json: {\n ...data,\n clean_content: [\n cleanText(data.title),\n cleanText(data.meta_description),\n cleanText(data.headings),\n cleanText(data.paragraphs)\n ].join(' ').slice(0, 5000) // prevent token explosion\n }\n}];"
},
"typeVersion": 2
},
{
"id": "17dbe5ce-871f-4c7c-8761-61ba3df5a3e2",
"name": "AI Classifier for Type",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
4448,
-672
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {
"textFormat": {
"textOptions": {
"type": "json_object"
}
}
},
"responses": {
"values": [
{
"content": "=Here is your **same prompt with ONLY the industry classification added (no other changes):**\n\n---\n\nYou are a company classifier.\n\nDetermine if this company is a REAL EMPLOYER or a RECRUITMENT/STAFFING AGENCY.\n\nCompany name: {{ $node[\"\ud83c\udf10 AI Domain Found?\"].json.company_name }}\n\nWebsite URL: {{ $node[\"Save Domain to Companies\"].json.company_website }}\n\nWebsite content (first 3000 chars): {{\n($json.clean_content && $json.clean_content.length > 0\n? $json.clean_content\n: $json.data?.markdown || ''\n).slice(0, 3000)\n}}\n\nCLASSIFICATION RULES:\n\n* Staffing/recruitment/manpower supply/HR outsourcing/placing candidates \u2192 AGENCY\n* Job board, job aggregator, employment portal \u2192 AGENCY\n* \"We provide manpower\", \"recruitment solutions\", \"staffing services\" \u2192 AGENCY\n* Real operating business (hotel, hospital, logistics, construction, oil company, restaurant, factory) \u2192 EMPLOYER\n* Unclear or website unavailable \u2192 EMPLOYER (benefit of doubt)\n\nINDUSTRY CLASSIFICATION:\nClassify the company into exactly ONE of these industries:\n\n* Oil & Gas\n* Construction\n* Services (Banking & Insurance)\n* Logistics & Supply Chain\n* Manufacturing\n* Hospitality\n* Telecommunications & IT\n* Facility Management\n* Aviation / Airport\n* Retail\n* Shipbuilding\n* Automobile\n* Drivers & Operators\n* Furniture & Interiors\n* Garments & Furnishing\n* Agriculture\n* Community Services\n* Education\n* Healthcare\n* Other\n\nRETURN ONLY VALID JSON:\n\n```json\n{\n \"classification\": \"EMPLOYER\",\n \"industry\": \"Hospitality\",\n \"reason\": \"one sentence explanation\"\n}\n```\n"
}
]
},
"builtInTools": {}
},
"typeVersion": 2.1
},
{
"id": "5f6e2bbf-1538-49fd-acd5-2f4dd0ad5fd5",
"name": "Parse AI Classification",
"type": "n8n-nodes-base.code",
"position": [
4784,
-672
],
"parameters": {
"jsCode": "const raw = $input.first().json;\n\n// \u2705 SAFE reference to previous node item\nconst job = $item(0).$node[\"\ud83c\udf10 AI Domain Found?\"].json;\n\n// \u2705 Current node data\nconst website_body = $json.clean_content || '';\n\nlet classification = 'EMPLOYER';\nlet industry = 'Other';\nlet reason = '';\n\ntry {\n const content = raw.output?.[0]?.content?.[0]?.text;\n\n if (content && typeof content === 'object') {\n classification = content.classification || 'EMPLOYER';\n industry = content.industry || 'Other';\n reason = content.reason || '';\n }\n\n} catch (e) {\n reason = 'parse_error';\n}\n\nreturn [{\n json: {\n ...job,\n company_site_body: website_body,\n company_type: classification,\n industry: industry, // \u2705 NEW FIELD\n classification_reason: reason\n }\n}];"
},
"typeVersion": 2
},
{
"id": "e3a8164b-9ff8-473a-909d-2a86f0542d81",
"name": "Check Employer Type",
"type": "n8n-nodes-base.if",
"position": [
5008,
-672
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.company_type }}",
"rightValue": "EMPLOYER"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.3
},
{
"id": "d4ef3b0b-40cf-448e-8bc3-212bd2d19fc8",
"name": "Flag for Enrichment",
"type": "n8n-nodes-base.googleSheets",
"position": [
5296,
-784
],
"parameters": {
"columns": {
"value": {
"reason": "={{ $json.classification_reason }}",
"status": "ENRICHMENT_REQUIRED",
"industry": "={{ $json.industry }}",
"company_id": "={{ $json.company_id }}",
"company_type": "={{ $json.company_type }}"
},
"schema": [
{
"id": "company_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_location",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_emails",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_emails",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_count",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "job_count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intent_score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intent_score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_linkedin",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_linkedin",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_type",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total_contacts_found",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "total_contacts_found",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_job_detected_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "last_job_detected_at",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reason",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website_content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website_content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "enriched_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "enriched_at",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.7
},
{
"id": "6a9224d6-5b42-4dcf-bb6b-aaaa25f0f80c",
"name": "Flag as Agency",
"type": "n8n-nodes-base.googleSheets",
"position": [
5312,
-528
],
"parameters": {
"columns": {
"value": {
"reason": "={{ $json.classification_reason }}",
"company_id": "={{ $json.company_id }}",
"company_type": "={{ $json.company_type }}"
},
"schema": [
{
"id": "company_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_location",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_emails",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_emails",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_count",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "job_count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intent_score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "intent_score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_linkedin",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_linkedin",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_type",
"type": "string",
"display": true,
"required": false,
"displayName": "company_type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total_contacts_found",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "total_contacts_found",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_job_detected_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "last_job_detected_at",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reason",
"type": "string",
"display": true,
"required": false,
"displayName": "reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website_content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website_content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "enriched_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "enriched_at",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.7
},
{
"id": "bf242443-7314-4000-ba20-39a10d2142be",
"name": "Batch Process Items 1",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1536,
-544
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "d82c3882-f100-4257-95b1-c01cec225597",
"name": "Check AI Domain Found",
"type": "n8n-nodes-base.if",
"position": [
3152,
-544
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "ai-domain-check",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.company_website}}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "8653ca39-7755-46c8-82aa-829054e1e5df",
"name": "Extract Domain from Email",
"type": "n8n-nodes-base.code",
"position": [
2240,
-432
],
"parameters": {
"jsCode": "const job = $json;\n\n// Parse original_json safely\nlet parsed = {};\ntry {\n parsed = typeof job.original_json === 'string'\n ? JSON.parse(job.original_json)\n : job.original_json || {};\n} catch (e) {\n parsed = {};\n}\n\n// Extract emails from original_json\nlet emails = Array.isArray(parsed.emails) ? parsed.emails : [];\n\n// Generic email providers to skip\nconst genericDomains = new Set([\n 'gmail.com','yahoo.com','hotmail.com','outlook.com','live.com',\n 'aol.com','icloud.com','mail.com','protonmail.com','zoho.com',\n 'yandex.com','gmx.com','inbox.com','fastmail.com',\n 'yahoo.co.uk','hotmail.co.uk','outlook.co.uk',\n 'yahoo.in','rediffmail.com','msn.com','me.com',\n 'googlemail.com','yahoo.co.in','outlook.in'\n]);\n\nlet domain = '';\n\nfor (const email of emails) {\n if (!email || typeof email !== 'string' || !email.includes('@')) continue;\n\n const emailDomain = email.split('@')[1]?.toLowerCase().trim();\n\n if (\n emailDomain &&\n !genericDomains.has(emailDomain) &&\n emailDomain.includes('.')\n ) {\n domain = emailDomain;\n break;\n }\n}\n\nreturn {\n json: {\n ...job,\n email_found: emails.length > 0,\n company_website: domain,\n domain_source: domain ? 'email_extraction' : ''\n }\n};"
},
"typeVersion": 2
},
{
"id": "e059cda9-4021-4226-bbf1-389a504b47f6",
"name": "Check Email Domain Presence",
"type": "n8n-nodes-base.if",
"position": [
2480,
-432
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "email-domain-check",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.company_website }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "5a3c33ab-9efc-441c-9c84-9de00be5321e",
"name": "Verify Domain Exists",
"type": "n8n-nodes-base.if",
"position": [
1984,
-528
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "has-domain",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $('Loop Over Items1').item.json.company_website }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "e091d329-1d9b-4c6e-b8b6-c8f23c53337c",
"name": "Fetch Actor Dataset 4",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
2736,
-416
],
"parameters": {
"memory": 8192,
"actorId": {
"__rl": true,
"mode": "id",
"value": "x7ZcMWQrMLWiMN46e"
},
"operation": "Run actor and get dataset",
"customBody": "={\n \"country\": \"{{ $json.country }}\",\n \"name\": \"{{ $json.company_name }}\"\n}",
"actorSource": "store"
},
"typeVersion": 1
},
{
"id": "5f931f13-c10b-4d4e-88cd-5162aa0931ec",
"name": "Parse AI Domain Response",
"type": "n8n-nodes-base.code",
"position": [
2944,
-416
],
"parameters": {
"jsCode": "const raw = $input.first().json;\nconst job = $('\ud83c\udf10 Has Domain?').item.json;\n\nlet domain = '';\nlet linkedin_url = '';\nlet domainSource = '';\n\n// \u2705 Extract domain\nif (raw.official_website) {\n domain = raw.official_website\n .replace(/^https?:\\/\\//, '')\n .replace(/^www\\./, '')\n .split('/')[0]\n .trim();\n}\n\n// \u2705 Extract LinkedIn\nif (Array.isArray(raw.social_links)) {\n const linkedin = raw.social_links.find(link =>\n link.includes('linkedin.com/company')\n );\n\n if (linkedin) {\n linkedin_url = linkedin;\n }\n}\n\n// \ud83d\udeab Filter invalid domains\nconst invalidDomains = ['linkedin', 'indeed', 'glassdoor', 'google'];\n\nif (\n !domain ||\n invalidDomains.some(d => domain.includes(d))\n) {\n domain = '';\n domainSource = 'invalid';\n} else {\n domainSource = 'apify';\n}\n\nreturn [{\n json: {\n ...job,\n company_website: domain,\n company_linkedin: linkedin_url,\n domain_source: domainSource\n }\n}];"
},
"typeVersion": 2
},
{
"id": "9658dc48-48dc-4424-ac0d-483d9bc320bc",
"name": "Read Current Company Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
1760,
-528
],
"parameters": {
"options": {
"outputFormatting": {
"values": {
"date": "FORMATTED_STRING",
"general": "UNFORMATTED_VALUE"
}
}
},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.company_id }}",
"lookupColumn": "company_id"
}
]
},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1726393267}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5,
"alwaysOutputData": true
},
{
"id": "8ed8195f-2a35-426a-905a-35a5acbd4e9f",
"name": "Initiate Firecrawl Scraping",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
4064,
-864
],
"parameters": {
"url": "={{ \n $item(0).$node[\"Save Domain to Companies\"].json.company_website?.startsWith('http') \n ? $item(0).$node[\"Save Domain to Companies\"].json.company_website \n : 'https://' + $item(0).$node[\"Save Domain to Companies\"].json.company_website \n}}",
"operation": "scrape",
"requestOptions": {}
},
"typeVersion": 1
},
{
"id": "b029bf5a-af13-4c79-9af5-6f606eafe3da",
"name": "If Website Fetch Success",
"type": "n8n-nodes-base.if",
"position": [
3712,
-688
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c74d3ec7-ea4a-486f-b92a-6e9b0f48a6ed",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ \n !$json ||\n $json.error ||\n $json.status >= 400 ||\n $json.error?.status >= 400 ||\n !$json.data && !$json.body && !$json.clean_content ||\n ($json.error?.message && $json.error.message.includes('Just a moment')) ||\n (typeof $json.data === 'string' && $json.data.includes('Just a moment')) ||\n (typeof $json.body === 'string' && $json.body.includes('Just a moment'))\n}}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.3
},
{
"id": "56f794b2-ad89-4550-96ff-eed2c36d86ad",
"name": "Manual Execution Trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
816,
-544
],
"parameters": {},
"typeVersion": 1
},
{
"id": "100b0fee-978d-4e0f-9ed9-5597355464f3",
"name": "Read Google Sheet Rows",
"type": "n8n-nodes-base.googleSheets",
"position": [
1040,
-544
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "NEW",
"lookupColumn": "status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "196654ff-433e-4645-98d9-22314061ca5e",
"name": "Filter New Status Rows 1",
"type": "n8n-nodes-base.filter",
"position": [
1408,
1136
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "ENRICHMENT_REQUIRED"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.3
},
{
"id": "06e69db3-8dc1-45e0-af7f-bccd44cc95e5",
"name": "Read Google Sheet Rows 1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1184,
1136
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "ENRICHMENT_REQUIRED",
"lookupColumn": "status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_1451193517}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.7
},
{
"id": "6b14b29b-4110-4620-a448-84917b53c55a",
"name": "Batch Process Items 2",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1664,
1136
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "ab1ef6e6-5651-4087-b3dc-48d54cf05fb6",
"name": "Determine Company Type",
"type": "n8n-nodes-base.if",
"position": [
1952,
1120
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "is-employer",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.company_type }}",
"rightValue": "EMPLOYER"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "c712069e-6db2-4b47-badc-c53c07490154",
"name": "Flag as Agency Type",
"type": "n8n-nodes-base.googleSheets",
"position": [
1984,
1456
],
"parameters": {
"columns": {
"value": {
"status": "NOT_ENRICHED",
"company_id": "={{ $node[\"\ud83d\udcbe Save Domain to Sheet2\"].json.company_id }}",
"company_type": "AGENCY"
},
"schema": [
{
"id": "company_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_location",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "industry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_linkedin",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_linkedin",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_type",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total_contacts",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "total_contacts",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reason",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_website_content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company_website_content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "enriched_at",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "enriched_at",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_SHEET_ID_75755771}}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{$env.GOOGLE_SHEETS_DOCUMENT_ID}}"
}
},
"typeVersion": 4.5
},
{
"id": "6d271d2b-47e8-435d-90a8-84e6e3826c59",
"name": "Fetch HR Employees Links",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
1680,
464
],
"parameters": {
"url": "https://api.linkfinderai.com",
"method": "POST",
"options": {
"timeout": 60000
},
"jsonBody": "={\n \"type\": \"company_domain_to_employees\",\n \"input_data\": \"{{ $json.company_website }}\",\n \"department\": \"human_resources\",\n \"seniority\": \"all\",\n \"employee_count\": 5\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{$env.LINKFINDER_API_KEY}}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "2756af40-988c-4f74-81e7-3a855ac88a29",
"name": "AI Select Top Contacts",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2880,
688
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an outbound targeting engine for a manpower recruitment agency.\n\nYour goal is to ALWAYS return 1\u20132 contacts WITH VALID EMAILS ONLY.\n\n-------------------------------------\nCONTEXT:\nWe supply manpower (hospitality, logistics, healthcare, oil & gas, construction).\nWe help companies fill urgent hiring needs with international candidates.\n\nEMPLOYEE DATA:\n{{ JSON.stringify($input.all().map(item => item.json)) }}\n\nJOB CONTEX
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is Part 2 of the HR Client Acquisition system and builds on the lead discovery pipeline from the previous workflow:
Source: https://n8n.io/workflows/15265/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Community nodes are used, and template can only be used on self-hosted n8n instances. Sales Development Representatives (SDRs) Business Development Teams Growth Hackers Startup Founders Marketing Agen
This n8n template helps recruitment agencies discover active job openings, filter them based on hiring relevance, and qualify them using AI — specifically designed for semi-skilled manpower hiring use
Search → Scrape → Qualify → CRM → Email Draft Automation
This workflow is designed for entrepreneurs, sales teams, marketers, and agencies who want to automate lead discovery and build qualified business contact lists — without manual searching or copying d
This workflow automates the entire process of lead generation and personalized outreach drafting for local businesses. It utilizes Apify to scrape business data from Google Maps based on your search c