This workflow corresponds to n8n.io template #11189 — we link there as the canonical source.
This workflow follows the Google Sheets → HTTP Request 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": "G167k3SYK6n9RyOE",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Linkedin Companies Enrichment with AI Scoring with Google Sheet",
"tags": [],
"nodes": [
{
"id": "fcd5c925-d05f-4ecc-a231-95087d14a6de",
"name": "Get Company Info",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-848,
1008
],
"parameters": {
"url": "https://api.ghostgenius.fr/v2/company",
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": 2000
}
}
},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "={{ $json.url }}"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "79e486fe-9262-485e-9d90-b07ad0a2578b",
"name": "Filter Valid Companies",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
-624,
1008
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5ea943a6-8f6c-4cb0-b194-8c92d4b2aacc",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.website }}",
"rightValue": "[null]"
},
{
"id": "8235b9bb-3cd4-4ed4-a5dc-921127ff47c7",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.followers_count }}",
"rightValue": 200
}
]
}
},
"typeVersion": 2.2
},
{
"id": "400e9a22-af35-490e-ab5e-782e80190e4c",
"name": "Is New Company?",
"type": "n8n-nodes-base.if",
"position": [
-224,
1008
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "050c33be-c648-44d7-901c-51f6ff024e97",
"operator": {
"type": "object",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $('Check If Company Exists').all().first().json }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ffb1ca3e-6a53-439e-b5c1-df02fc9e0a7b",
"name": "Set Variables",
"type": "n8n-nodes-base.set",
"position": [
-1824,
1008
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e81e4891-4786-4dd9-a338-d1095e27f382",
"name": "Your target",
"type": "string",
"value": "Growth Marketing Agency"
},
{
"id": "ed2b6b08-66aa-4d4b-b68c-698b5e841930",
"name": "B: 1-10 employees, C: 11-50 employees, D: 51-200 employees, E: 201-500 employees, F: 501-1000 employees, G: 1001-5000 employees, H: 5001-10,000 employees, I: 10,001+ employees",
"type": "string",
"value": "C"
},
{
"id": "f1d02f1a-8115-4e0c-a5ec-59bf5b54263b",
"name": "Location (find it on : https://www.ghostgenius.fr/tools/search-sales-navigator-locations-id)",
"type": "string",
"value": "103644278"
},
{
"id": "21bdb871-9327-4553-bb4a-a138be9f735c",
"name": "Your product or service",
"type": "string",
"value": "our CRM implementation services"
},
{
"id": "31f5adfc-8a8f-498c-9e57-24584c42f7de",
"name": "Positive indicators (3-5 specific factors that indicate a company might need your product)",
"type": "string",
"value": "- Mentions challenges with customer relationships or sales processes \n- Company is in growth phase with expanding client base \n- Mentions need for better data organization or customer insights \n- References marketing automation, sales pipelines, or customer retention "
},
{
"id": "630807cb-9d06-41ee-8534-a652ed76cb4c",
"name": "Negative indicators (3-5 specific factors that indicate a company might NOT need your product)",
"type": "string",
"value": "- Very small companies (1-5 employees) or extremely large enterprises \n- Already mentions using advanced CRM solutions \n- No indication of sales process or customer relationship management in description \n- Pure manufacturing or product-based business with minimal customer interaction \n- Non-profit or government entity with unique relationship management needs"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ba73dbff-0ae0-4a1f-adf0-3d60480b0e0c",
"name": "Search Companies",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1616,
1008
],
"parameters": {
"url": "https://api.ghostgenius.fr/v2/search/companies",
"options": {
"pagination": {
"pagination": {
"parameters": {
"parameters": [
{
"name": "page",
"value": "={{ $pageCount + 1 }}"
}
]
},
"maxRequests": 3,
"requestInterval": 2000,
"limitPagesFetched": true,
"completeExpression": "={{ $response.body.data.isEmpty() }}",
"paginationCompleteWhen": "other"
}
}
},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "keywords",
"value": "={{ $json['Your target'] }}"
},
{
"name": "locations",
"value": "={{ $json['Location (find it on : https://www'].ghostgenius['fr/tools/search-sales-navigator-locations-id)'] }}"
},
{
"name": "company_size",
"value": "={{ $json['B: 1-10 employees, C: 11-50 employees, D: 51-200 employees, E: 201-500 employees, F: 501-1000 employees, G: 1001-5000 employees, H: 5001-10,000 employees, I: 10,001+ employees'] }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "0af27f58-e303-4759-82ad-9d47b37e6492",
"name": "Extract Company Data",
"type": "n8n-nodes-base.splitOut",
"onError": "continueRegularOutput",
"position": [
-1424,
1008
],
"parameters": {
"options": {},
"fieldToSplitOut": "data"
},
"typeVersion": 1
},
{
"id": "e0be6d26-035a-41e8-86e4-2dc926acba76",
"name": "Check If Company Exists",
"type": "n8n-nodes-base.googleSheets",
"position": [
-400,
1008
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.id }}",
"lookupColumn": "ID"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit#gid=0",
"cachedResultName": "Companies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"typeVersion": 4.5,
"alwaysOutputData": true
},
{
"id": "3faf8cbe-bd5b-4d8a-83cb-b27abe63f823",
"name": "AI Company Scoring",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
96,
1024
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {
"temperature": 0.2
},
"messages": {
"values": [
{
"role": "system",
"content": "=You are an AI assistant that evaluates companies to determine if they might be interested in {{ $('Set Variables').item.json['Your product or service'] }}.\n\nEvaluate the company information provided on a scale of 0 to 10, where:\n- 0 = Not at all likely to be interested\n- 10 = Extremely likely to be interested\n\nBase your evaluation on these criteria:\n1. Industry fit: How well does the company's industry align with {{ $('Set Variables').item.json['Your product or service'] }}?\n2. Company profile: Is the company size, growth stage, and location appropriate for {{ $('Set Variables').item.json['Your product or service'] }}?\n3. Pain points: Based on their description, do they likely have challenges that {{ $('Set Variables').item.json['Your product or service'] }} solves?\n\nFactors that indicate a good fit:\n{{ $('Set Variables').item.json['Positive indicators (3-5 specific factors that indicate a company might need your product)'] }}\n\nFactors that indicate a poor fit:\n{{ $('Set Variables').item.json['Negative indicators (3-5 specific factors that indicate a company might NOT need your product)'] }}\n\nRespond ONLY with this JSON format:\n```json\n{\n \"score\": [number between 0 and 10],\n}"
},
{
"content": "=Here is the company to analyze:\nName: {{ $('Filter Valid Companies').item.json.name }}\n{{ $('Filter Valid Companies').item.json.tagline }}\n{{ $('Filter Valid Companies').item.json.description }}\nNumber of employees: {{ $('Filter Valid Companies').item.json.staff_count }}\nIndustry: {{ $('Filter Valid Companies').item.json.industries }}\nSpecialties: {{ $('Filter Valid Companies').item.json.specialities }}\nLocation: {{ $('Filter Valid Companies').item.json.locations?.toJsonString() }}\nFounded in: {{ $('Filter Valid Companies').item.json.founded_on }}\nFunding: {{ $('Filter Valid Companies').item.json.funding?.toJsonString() }}\n"
}
]
},
"jsonOutput": true
},
"typeVersion": 1.8
},
{
"id": "b107456d-10b1-4725-abcf-485cf33e46f0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2096,
672
],
"parameters": {
"color": 7,
"width": 860,
"height": 564,
"content": "## LinkedIn Company Search\n\nThis section pulls company data from LinkedIn via the Ghost Genius API.\n\nUse the Set Variables node to define filters like keywords, industry, size, location, job openings, and to adjust the AI Lead Scoring prompt.\n\nEach search returns a max of 1,000 companies. If your query exceeds this, narrow the filters.\nExample: If \u201cGrowth Marketing Agencies (11\u201350 employees)\u201d shows 10,000 results, segment by location and run multiple searches to collect 500\u20131000 companies per batch.\n\nTip: When testing, change the Max Pages value in the Search Companies node. The total result count appears at the top of the JSON response."
},
"typeVersion": 1
},
{
"id": "fe70da9f-4788-46ab-94a2-bbb58fd932dc",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1168,
672
],
"parameters": {
"color": 7,
"width": 1120,
"height": 564,
"content": "## Company Data Processing/Validation\n\nEach company is processed individually.\n\nFirst, Get Company Details pulls full company info using the LinkedIn URL from the previous step.\n\nThen, filters qualify the company\u2014e.g., minimum 200 followers for credibility and checking if a website is listed.\n\nTo stay within API limits, the workflow runs in batches with a 3-second delay between requests, preventing rate-limit issues.\n\nThese thresholds are customizable depending on your target audience.\n\nFinally, the last two modules check whether the company already exists in your database using its LinkedIn ID, preventing duplicates when searches overlap."
},
"typeVersion": 1
},
{
"id": "b6268685-d2c7-47e0-a025-95c62482de72",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
32,
672
],
"parameters": {
"color": 7,
"width": 780,
"height": 564,
"content": "## AI Scoring and Storage\nThis section scores the company and stores it in a Google Sheet.\n\nIt's important to properly fill in the \"Set variables\" node at the beginning of the workflow to get a result relevant to your use case. You can also manually modify the system prompt.\n\nRegardless of the score obtained, it's very important to always store the company. Note that we add a 2-second \"wait\" module to respect Google Sheet's rate limits.\n\nWe add the company to the \"Companies\" sheet in this [Google Sheet](https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=sharing) which you can make a copy of and use.\n\nThis AI scoring functionality is extremely impressive once perfectly configured, so I recommend taking some time to test with several companies to ensure the scoring system works well for your needs!\n\n"
},
"typeVersion": 1
},
{
"id": "8636edb1-c7e3-47a9-9127-35eb8e71cfd0",
"name": "Wait 2s",
"type": "n8n-nodes-base.wait",
"position": [
464,
1024
],
"parameters": {
"amount": 3
},
"typeVersion": 1.1
},
{
"id": "da99a9db-6334-42eb-bb44-6c11a6de1f6a",
"name": "Add Company to CRM",
"type": "n8n-nodes-base.googleSheets",
"position": [
672,
1024
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Get Company Info').item.json.id }}",
"Name": "={{ $('Get Company Info').item.json.name }}",
"Score": "={{ $json.message.content.score }}",
"State": "Qualified",
"Summary": "={{ $('Get Company Info').item.json.description }}",
"Website": "={{ $('Get Company Info').item.json.website }}",
"LinkedIn": "={{ $('Get Company Info').item.json.url }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn",
"type": "string",
"display": true,
"required": false,
"displayName": "LinkedIn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ID",
"type": "string",
"display": true,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Score",
"type": "string",
"display": true,
"required": false,
"displayName": "Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "State",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "State",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10lxvwdeCf7vrAuWsNRGIsSTICEI3z-SUCDVHr8XzAYQ/edit#gid=0",
"cachedResultName": "Companies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"typeVersion": 4.5
},
{
"id": "9efeb40a-5346-48d8-80b0-04fd4a55abfb",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2768,
288
],
"parameters": {
"width": 600,
"height": 940,
"content": "## Introduction\nWelcome to my template! Before explaining how to set it up, here's some important information:\n\nThis automation therefore allows you, starting from a LinkedIn search, to enrich company data and score them to determine if they might be interested in your services/product.\n\nFor any questions, you can send me a DM on my [UPWORK](https://www.upwork.com/freelancers/~01cb2136b6898df6c0?s=1110580764771602432) :) \n\n\n## Setup\n- Create an account on [Ghost Genius API](ghostgenius.fr) and get your API key.\n\n- Configure the Search Companies and Get Company Info modules by creating a \"Header Auth\" credential:\n**Name: \"Authorization\"**\n**Value: \"Bearer YOUR_TOKEN_HERE\"**\n\n- Create a copy of this [Google Sheet](https://docs.google.com/spreadsheets/d/1hlBAeFV17wBYDntwoJP6MMv5CuZbUtl63Z4jbTtv3gw/edit?usp=sharing) by clicking on File => Make a copy (in Google Sheet).\n\n- Configure your Google Sheet credential by following the n8n documentation.\n\n- Create an OpenAI key [here](https://platform.openai.com/docs/overview) and add the credential to the \"AI Company Scoring\" node following the n8n documentation.\n\n- Add your information to the \"Set Variables\" node.\n\n\n## Tools \n**(You can use the API and CRM of your choice; this is only a suggestion)**\n\n- API Linkedin : [Ghost Genius API](https://ghostgenius.fr) \n\n- API Documentation : [Documentation](https://ghostgenius.fr/docs)\n\n- ENRICHMENT CRM : [Google Sheet](https://docs.google.com/spreadsheets/d/1hlBAeFV17wBYDntwoJP6MMv5CuZbUtl63Z4jbTtv3gw/edit?usp=sharing)\n\n- AI : [OpenAI](https://openai.com)\n\n- LinkedIn Location ID Finder : [Ghost Genius Locations ID Finder](https://ghostgenius.fr/tools/search-sales-navigator-locations-id)"
},
"typeVersion": 1
},
{
"id": "6cd2b89b-d0d0-4430-961d-57cdec6175a7",
"name": "Start",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2016,
1008
],
"parameters": {},
"typeVersion": 1
},
{
"id": "74e5200a-abf0-457a-96c2-796c2aed0cb8",
"name": "Process Each Company Batch Control",
"type": "n8n-nodes-base.splitInBatches",
"onError": "continueRegularOutput",
"position": [
-1088,
1008
],
"parameters": {
"options": {}
},
"typeVersion": 3,
"alwaysOutputData": false
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "af3a0bc0-9d6a-45d6-b89b-79035eaa3db2",
"connections": {
"Start": {
"main": [
[
{
"node": "Set Variables",
"type": "main",
"index": 0
}
]
]
},
"Wait 2s": {
"main": [
[
{
"node": "Add Company to CRM",
"type": "main",
"index": 0
}
]
]
},
"Set Variables": {
"main": [
[
{
"node": "Search Companies",
"type": "main",
"index": 0
}
]
]
},
"Is New Company?": {
"main": [
[
{
"node": "AI Company Scoring",
"type": "main",
"index": 0
}
],
[
{
"node": "Process Each Company Batch Control",
"type": "main",
"index": 0
}
]
]
},
"Get Company Info": {
"main": [
[
{
"node": "Filter Valid Companies",
"type": "main",
"index": 0
}
]
]
},
"Search Companies": {
"main": [
[
{
"node": "Extract Company Data",
"type": "main",
"index": 0
}
]
]
},
"AI Company Scoring": {
"main": [
[
{
"node": "Wait 2s",
"type": "main",
"index": 0
}
]
]
},
"Add Company to CRM": {
"main": [
[
{
"node": "Process Each Company Batch Control",
"type": "main",
"index": 0
}
]
]
},
"Extract Company Data": {
"main": [
[
{
"node": "Process Each Company Batch Control",
"type": "main",
"index": 0
}
]
]
},
"Filter Valid Companies": {
"main": [
[
{
"node": "Check If Company Exists",
"type": "main",
"index": 0
}
],
[
{
"node": "Process Each Company Batch Control",
"type": "main",
"index": 0
}
]
]
},
"Check If Company Exists": {
"main": [
[
{
"node": "Is New Company?",
"type": "main",
"index": 0
}
]
]
},
"Process Each Company Batch Control": {
"main": [
[],
[
{
"node": "Get Company Info",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This template is designed for sales teams, business development reps, and marketers who need a reliable, automated way to build targeted prospect lists. It’s especially useful for agencies, consultants, and B2B companies that want to identify, qualify, and prioritize high-value…
Source: https://n8n.io/workflows/11189/ — 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.
Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.
The Problem That it Solves
This intelligent email automation workflow helps you maximize engagement through domain-based outreach. It utilizes AI-powered personalization and strategic follow-ups to increase response rates. The
Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP
Scrape ads – Pulls Facebook Ad Library data for "ai automation" keywords using Apify Filter & sort – Filters ads by page likes (>1,000) and separates into videos, images, and text ads Analyze creat