Opening Problem Statement
Meet Sarah, a B2B sales manager at a growing marketing consultancy. She spends countless hours manually searching LinkedIn for potential client companies that fit her target criteria—company size, location, and industry. After compiling her list, Sarah painstakingly copies company details into her Airtable CRM. It’s a tedious process riddled with duplicated entries and missed opportunities due to outdated or incomplete data. This manual workflow wastes her team up to 15 hours weekly and risks losing valuable leads to slower competitors.
This scenario is all too common for professionals who rely on LinkedIn company information to build quality sales pipelines and maintain an up-to-date CRM. Without automation, data management becomes overwhelming, error-prone, and time-consuming.
What This Automation Does
This n8n workflow automates the exact process Sarah struggles with—searching LinkedIn companies and adding validated records to an Airtable CRM. Here’s what happens when the workflow runs:
- Executes targeted LinkedIn company searches using the Ghost Genius API based on specified keywords, company size, and location.
- Processes each company in batches, retrieving detailed company information through LinkedIn URLs.
- Filters companies by follower count and website presence to ensure credibility and relevance.
- Checks the Airtable CRM to avoid duplicate entries using the unique LinkedIn company ID.
- Adds only new, qualified companies to the Airtable CRM with detailed fields like name, website, description, and category.
- Manages API rate limits gracefully by batching requests with built-in delays, preventing call failures.
With this automation, Sarah can save over 12 hours per week while improving her CRM’s accuracy and lead quality.
Prerequisites ⚙️
- n8n account (either cloud or self-hosted; see Hostinger guide for self-hosting)
- Ghost Genius API account and API key for LinkedIn company data access
- Airtable account with a “CRM” base configured with columns: name (string), website (URL), LinkedIn (URL), id (number)
- Configured HTTP Header Authentication credentials in n8n for both Ghost Genius API and Airtable Personal Access Token 🔑
Step-by-Step Guide
Step 1: Trigger Workflow Manually
Navigate to your workflow in n8n and select the “When clicking ‘Test workflow’” node of type Manual Trigger. Clicking this node allows you to run the workflow manually for testing or scheduled execution.
You should see a button to start the workflow execution. This straightforward trigger supports manual runs without external integrations.
Common Mistake: Forgetting to activate the workflow before testing can prevent it from running.
Step 2: Configure Search Parameters in “Set Variables” Node
Locate the “Set Variables” node (type: Set). Set your target attributes here:
{
"Your target": "Growth Marketing Agency",
"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": "C",
"Location (find it on : https://www.ghostgenius.fr/tools/search-sales-navigator-locations-id)": "103644278"
}This means you are targeting growth marketing agencies with 11-50 employees located in a specific region identified by the location ID.
You should see these values set as workflow variables to control subsequent API requests.
Common Mistake: Incorrect location ID or employee size codes lead to empty or irrelevant search results.
Step 3: Search Companies via Ghost Genius API
Next, the “Search Companies” node (type: HTTP Request) performs the LinkedIn company search API call.
Settings include:
- Method: GET
- URL:
https://api.ghostgenius.fr/v2/search/companies - Query Parameters: Keywords, Company Size, and Location from “Set Variables” node
- Authentication: HTTP Header Auth with your Ghost Genius API token
- Pagination: Automatically fetches pages with 2 seconds interval, stops when no more data
Visual confirmation appears in the execution panel showing company results returned as JSON.
Common Mistake: API limit exceeded or invalid API key causes failed or incomplete responses.
Step 4: Extract Company Data
The “Extract Company Data” node (type: Split Out) extracts each company from the batch response array to process individually.
Check the preview to see individual company JSON objects ready for further processing.
Step 5: Process Each Company in Batches
The “Process Each Company” node (type: Split In Batches) takes each company JSON one by one, with options to continue on errors.
Batches limit API calls to prevent overload and respect rate limits with smooth processing.
Step 6: Get Full Company Info from LinkedIn URL
The “Get Company Info” node (type: HTTP Request) calls the Ghost Genius company details API endpoint:
GET https://api.ghostgenius.fr/v2/company?url={{ $json.url }}This uses the LinkedIn URL from each company in the batch, passed as a query parameter.
Authentication uses the same HTTP Header Auth credential with Bearer token.
Responses provide detailed metadata such as follower counts, descriptions, websites, and more.
Common Mistake: Missing or incorrect LinkedIn URLs result in empty responses.
Step 7: Filter Valid Companies
An “If” node called “Filter Valid Companies” checks two conditions for each company:
- Does the company have a website listed? (not empty)
- Does the company have more than 200 LinkedIn followers?
Only companies meeting both conditions pass forward; others are skipped.
Step 8: Check If Company Exists in Airtable
The “Check If Company Exists” node (type: Airtable, operation: Search) looks for the LinkedIn company ID in your CRM to avoid duplicates.
Search formula example:
= {id} = '{{ $json.id.toNumber() }}'A response with zero results identifies the company as new.
Step 9: Determine New Company Condition
The “Is New Company?” If node tests whether the search returned empty (no existing record).
If true, it passes to the next step to add to Airtable; otherwise, it skips to process the next company.
Step 10: Add New Company to Airtable CRM
The “Add Company to CRM” node (type: Airtable) creates a new record with detailed fields:
- id (number)
- Name
- Country (preset to 🇺🇸 United States but customizable)
- Summary (description)
- Tagline
- Website URL
- Category (preset as Growth Marketing Agency with employee size)
- LinkedIn URL
After successfully adding, the workflow loops back to continue processing remaining companies.
Customizations ✏️
- Change target company type: In the Set Variables node, modify the “Your target” value to a different niche like “SaaS Companies” to target a new market.
- Filter by different follower count: Adjust the follower count threshold in the Filter Valid Companies node’s If condition to increase or decrease company credibility standards.
- Modify Airtable fields: Add or remove fields in the Add Company to CRM node mapping to capture more or less company metadata as required.
- Change location filter: Update the Location ID in Set Variables to target different geographic markets globally.
- Adjust batch size or interval: In the Get Company Info node, modify the batch size or delay to optimize API call rates or speed.
Troubleshooting 🔧
Problem: “API rate limit exceeded” error on Get Company Info node
Cause: Too many API requests sent in a short time without delay.
Solution: In the “Get Company Info” HTTP Request node, use batching with a delay (e.g., interval set to 2000ms) to space requests and avoid hitting limits.
Problem: “No records found” in Airtable despite companies existing
Cause: The search formula in “Check If Company Exists” node is incorrect or ID data type mismatch.
Solution: Verify the formula syntax and ensure the company ID stored in Airtable matches the numeric conversion used in queries.
Problem: “Empty response” from Get Company Info
Cause: LinkedIn URL missing or malformed in input data.
Solution: Validate that the LinkedIn URL field is populated before making the API call by checking JSON data in prior nodes.
Pre-Production Checklist ✅
- Verify Ghost Genius and Airtable API credentials are correctly set in n8n.
- Test search parameters with small pagination value (e.g., max 1-2 pages) to quickly validate valid results.
- Confirm Airtable base and table schema matches expected fields for insertion.
- Run sample tests triggering manual execution and confirm no errors in the workflow editor.
- Backup Airtable data before initial bulk inserts to enable rollback if needed.
Deployment Guide
Activate the workflow by toggling the “Active” switch in n8n. Schedule regular runs using Cron or external triggers if desired. Monitor the workflow execution logs in n8n to track errors or skipped companies. Since the workflow implements batch processing and rate limiting, it efficiently scales to thousands of companies without API issues.
Conclusion
By setting up this detailed n8n automation, you’ve empowered your sales or marketing team to discover and onboard qualified LinkedIn companies into your Airtable CRM automatically. This eliminates manual data entry and duplication errors, saving hours weekly and increasing lead quality. Next, consider expanding this workflow to enrich existing CRM records with employee contact details or automate outreach email campaigns. Your CRM will evolve into a dynamic, up-to-date sales asset with minimal ongoing effort.
Happy automating!