What This Automation Does
This workflow searches LinkedIn companies using set filters, gets company details, scores companies with AI, and adds good companies to a Google Sheets CRM.
It solves the pain of spending too much time manually finding good leads on LinkedIn.
The result is a cleaner, scored list of companies, ready for sales follow-up.
How the Workflow Works: Inputs, Processing, and Output
Inputs
- Company search criteria like industry, location, and company size.
- Positive and negative indicators for AI scoring.
- API keys for Ghost Genius, Google Sheets, and OpenAI.
Processing Steps
- The Set Variables node collects target criteria and scoring indicators.
- The Search Companies node calls the Ghost Genius API to find LinkedIn companies matching criteria.
- The Extract Company Data node splits the response into individual companies.
- The Process Each Company node works through each company one by one with a short wait to avoid API limits.
- The Get Company Info node retrieves detailed info like website and followers.
- The Filter Valid Companies node removes companies without websites or under 200 followers.
- The Check If Company Exists node looks in Google Sheets to avoid duplicates.
- If new, the AI Company Scoring node uses OpenAI to give each company a score from 0 to 10, based on fit.
- A wait node pauses to respect Google Sheets limits.
- The Add Company to CRM node appends the qualified company info and score to Google Sheets.
- The workflow loops back to process the next company until done.
Outputs
- Updated Google Sheets CRM with new, scored companies.
- A better, easier-to-use list of leads.
Tools and Services Used
- Ghost Genius API: Searches LinkedIn companies and gets company data.
- OpenAI API: Scores companies for relevance using GPT-4.1.
- Google Sheets: Stores and manages the CRM data.
- n8n: Orchestrates the entire workflow.
Beginner Step-by-Step: How to Use this Workflow in n8n
Import the Workflow
- Download the workflow file using the Download button on this page.
- Inside the n8n editor, click your profile icon, then select “Import from File.”
- Choose the downloaded file to add the workflow.
Configure Credentials and Variables
- Open the imported workflow and locate the Set Variables node.
- Enter your target industry keywords, location IDs (from Ghost Genius location finder), company size, and product/service descriptions.
- Add your Ghost Genius API key in the dedicated HTTP Request node headers.
- Set up OpenAI API credentials in the AI Company Scoring node.
- Authorize Google Sheets in the corresponding nodes by connecting your Google account.
- If needed, update Google Sheets document IDs or sheet names in the Google Sheets nodes.
Test and Activate the Workflow
- Run the workflow manually once using the Start manual trigger node to test everything.
- Check the Google Sheets CRM to see new companies added.
- When satisfied, activate the workflow toggle to run it regularly or on-demand.
Consider using self-host n8n for more control if running this workflow often.
Customization Ideas
- Change company size filters in the Set Variables node to target specific business sizes.
- Adjust follower count thresholds in the Filter Valid Companies node to make lead quality stricter or looser.
- Edit positive and negative indicators in the variables to refine how AI scoring judges company fit.
- Switch Google Sheets to Airtable or another CRM by replacing Google Sheets nodes with API calls.
- Increase pages fetched in the Search Companies node to pull more results, respecting API limits.
Potential Errors and How to Fix Them
- Error: “HTTP Request failed with status 401 Unauthorized”.
Cause: Ghost Genius API key is wrong or expired.
Fix: Update the API key in HTTP headers and confirm it’s active. - Error: “Google Sheets append operation failed due to quota limits”.
Cause: Too many requests hitting Google Sheets API limit.
Fix: Increase delay in wait nodes, reduce batch size. - Error: AI scores look wrong or unrelated.
Cause: AI prompt indicators missing or not clear.
Fix: Improve positive and negative indicators in Set Variables node.
Pre-Production Checklist
- Confirm Ghost Genius API key is active and correctly set.
- Make sure Google Sheets CRM is copied and OAuth2 is connected.
- Check OpenAI API key validity in n8n.
- Run test with a small data page to verify company retrieval.
- Check CRM manually for duplicates before fully running.
- Review AI scoring for logical and expected results.
Summary
✓ Saves hours weekly by automating LinkedIn lead finding.
✓ Delivers cleaned, scored company data directly into a Google Sheets CRM.
✓ Avoids duplicates and improves lead quality consistently.
→ Enables faster, smarter sales prospecting using AI and automation.
