1. Opening Problem Statement
Meet Jane, a busy recruiter at a mid-sized tech company. She spends countless hours each week manually searching LinkedIn profiles based on names listed in her Google Sheets database. Jane often faces errors—copying the wrong URLs, missing profiles, or spending precious time jumping between tabs. This repetitive task eats up more than 5 hours weekly, delaying her talent outreach and reducing productivity.
Imagine if Jane could automate this entire process—uploading names in a spreadsheet and automatically retrieving and storing their exact LinkedIn URLs. That’s exactly what this workflow does: it eliminates manual LinkedIn lookups by integrating Google Sheets, an AI-powered search, and automated updates. This not only boosts accuracy but saves significant time.
2. What This Automation Does
This n8n workflow automates the discovery of LinkedIn profiles from a list of names maintained in Google Sheets. When triggered, it:
- Fetches names/users from a Google Sheets document.
- Uses an AI-driven Google search prompt to find the correct LinkedIn profile URL for each name.
- Extracts and parses the AI response to isolate valid LinkedIn URLs.
- Automatically updates the original Google Sheets rows with the matched LinkedIn URLs.
- Ensures the data is kept accurate and up-to-date without any manual intervention.
- Processes profiles one-by-one with error handling to accommodate larger datasets.
With this setup, Jane can save 5+ hours per week and reduce human errors in linking candidates’ profiles, thereby improving outreach efficiency and data reliability.
3. Prerequisites ⚙️
- n8n account: Either cloud-hosted or self-hosted (self-hosting options like Hostinger are great for control).
- Google Sheets account: Access to the spreadsheet containing the people’s names.
- Google Drive OAuth2 credentials: For n8n to read and update Google Sheets.
- Airtop API credentials: To use the AI-powered web scraping/search features.
- Basic familiarity with n8n interface for workflow creation.
4. Step-by-Step Guide
Step 1: Create a manual trigger node for testing
In n8n, click + Add Node, select Manual Trigger. This node lets you test the workflow by running it manually.
Once added, you should see a node named When clicking ‘Test workflow’. This node initiates the process without any external event.
Step 2: Add Google Sheets node to retrieve names
Click + Add Node, search for Google Sheets. Choose the node and set it to Read rows from your sheet named “Sheet1“.
In the Document ID field, enter your Google Sheets document id.
Choose the right sheet by gid or name. This node will fetch all rows containing names for LinkedIn lookup.
Common mistake: Using an incorrect document ID or sheet name causes failure to fetch data.
Step 3: Configure the Airtop node to perform a Google search
Add the node Airtop (type: n8n-nodes-base.airtop).
This node sends a search request to Google via Airtop’s AI. Set parameters as follows:
- URL parameter: Use expression
=https://www.google.com/search?q={{ encodeURI($json['Person Info']) }}to search LinkedIn profiles dynamically based on the name extracted from the sheet. - Prompt: Include this exact prompt:
This is Google Search results. the first results should be the Linkedin Page of {{ $json['Person Info'] }}
Return the Linkedin URL and nothing else.
If you cannot find the Linkedin URL, return an empty string.
A valid Linkedin profile URL starts with "https://www.linkedin.com/in/" - Set resource and operation: Choose extraction and query.
This ensures the node scrapes search results and isolates the LinkedIn profile URL.
Note: The prompt guides the AI to return only relevant URLs, avoiding noise.
Step 4: Add a Code node to parse the AI response
Add Code node, set it to run once per item.
Paste the following JavaScript to extract the LinkedIn URL from the AI data and attach it back to the original data row:
const linkedInProfile = $json.data.modelResponse;
const rowData = $('Person info').item.json;
return { json: {
...rowData,
'LinkedIn URL': linkedInProfile
}};
This script merges the AI search result with the spreadsheet row data for the next step.
Common issue: Failing to select “Run once for each item” causes the script to misbehave.
Step 5: Add Google Sheets node to update the rows
Add another Google Sheets node to update rows in the same Google Sheet.
Use the same Document ID and Sheet name.
In column mappings, make sure you map on row_number for the correct row update and map LinkedIn URL to the new field.
This step ensures the LinkedIn URLs get written back to the sheet alongside original names.
Check OAuth2 credentials for permissions to edit the document.
Step 6: Connect the nodes in order
Connect:
- When clicking ‘Test workflow’ → Person info
- Person info → Search profile
- Search profile → Parse response
- Parse response → Update row
Test the flow by clicking “Execute Workflow.” Confirm each row updates with a LinkedIn URL.
Step 7: Monitor the workflow
Watch node executions in n8n’s execution log to troubleshoot any issues with API limits or data mismatches.
Step 8: Save and activate
When satisfied, save the workflow and toggle it active for regular use. Consider scheduling with a Cron node if desired.
5. Customizations ✏️
- Change Search Query: In the Airtop node, customize the
urlexpression to add more filters, like company names or locations, to refine LinkedIn searches. - Add Validation Checks: Add a filter or additional code node to validate URLs strictly start with “https://www.linkedin.com/in/” before updating sheets.
- Bulk Processing: Modify the workflow to batch process 10-20 names at once to improve efficiency for very large spreadsheets.
- Additional Data Extraction: Use the Airtop node’s AI to extract not only LinkedIn URL but profile job titles or companies by adjusting the prompt.
6. Troubleshooting 🔧
Problem: “No data returned from Google Sheets node”
Cause: Incorrect Document ID or Sheet name.
Solution: Verify the Document ID and gid in the Google Sheets node parameters; ensure OAuth credentials have proper access.
Problem: “LinkedIn URL not found or empty string returned”
Cause: AI prompt might not have matched results or Google blocked scraping.
Solution: Double-check the prompt in Airtop node; refine your search terms. Consider delays and API rate limits.
Problem: “Update row fails with permissions error”
Cause: OAuth2 token lacks update/edit permissions.
Solution: Reauthorize the Google Sheets node credentials with edit privileges.
7. Pre-Production Checklist ✅
- Confirm Google Sheets document ID and sheet names are exact.
- Ensure Airtop API credentials are valid and active.
- Test with 1-2 rows first to confirm LinkedIn URLs are correctly found and updated.
- Validate the parsing code successfully assigns URLs before batch processing.
- Backup your Google Sheet before bulk updates to avoid data loss.
8. Deployment Guide
Deploying this workflow is straightforward. After setup and testing:
- Activate the workflow in n8n dashboard.
- Run initial tests with a few rows for validation.
- Set up scheduling using a Cron node or manual trigger as per your needs.
- Monitor execution logs in n8n to track performance and troubleshoot errors.
9. FAQs
Q: Can I use another AI or search node instead of Airtop?
A: Yes, other AI nodes or HTTP request nodes can be adapted if they support web scraping or Google search APIs.
Q: Does this workflow consume Airtop API credits?
A: Yes, each AI search counts as an API call, so be mindful of your tier limits.
Q: Is my data safe with Airtop?
A: Airtop uses secure connections and follows standard data privacy protocols.
10. Conclusion
By following this guide, you’ve automated the tedious task of LinkedIn profile discovery using n8n, Google Sheets, and AI-powered search. Jane, and users like her, can now save hours weekly, reduce errors, and maintain up-to-date prospect data automatically.
Next, you might explore automating outreach via LinkedIn messages, integrating with CRM platforms, or enriching data with company profiles to further streamline recruiting workflows.
You’re now equipped to build smarter, faster automations that make your workday more productive and error-free!