Scrape LinkedIn CEOs To Sheets
Search and collect LinkedIn profiles of automotive CEOs in the US using Google Custom Search API, then export structured profile data into a Google Sheet.
What This Workflow Does
This workflow scrapes LinkedIn profiles of CEOs in the US automotive industry using the Google Custom Search API and exports the results into a Google Sheet. It paginates through search results to gather up to 1,000 profiles per run β ideal for recruiters, marketers, or researchers who need structured contact data fast.
At a high level, it performs five steps:
- Creates a new Google Spreadsheet titled "LinkedIn CEO Scraper Results" at the start of each run.
- Loops through up to 10 pages of Google Custom Search results (10 results per page).
- Sends a search query targeting LinkedIn profiles of automotive CEOs in the US.
- Extracts and structures profile data such as name, title, LinkedIn URL, snippet, and profile image.
- Saves each profile as a new row in the Google Sheet, using the LinkedIn URL as a unique key to avoid duplicates.
Prerequisites
Before running the workflow, make sure you have the following:
- A Google Cloud Platform account with an API key.
- The Google Custom Search API enabled for your GCP project.
- A Programmable Search Engine (CX) configured to search the entire web.
- A Google Sheets account connected to Needle.
- Workflow variables set for
GOOGLE_API_KEYandGOOGLE_CX.
How the Flow Works
| Step | Node | Description |
|---|---|---|
| 1 | Manual Trigger | You start the workflow manually to kick off the scraping process. |
| 2 | Create Google Spreadsheet | Creates a new spreadsheet named "LinkedIn CEO Scraper Results" and passes its ID to subsequent steps. |
| 3 | Pagination Loop | Iterates through search result pages, starting at index 1 and continuing up to index 91 (10 pages of 10 results each). |
| 4 | Google Custom Search API Request | Sends a GET request to the Custom Search API with a query for CEO profiles in the US automotive sector, filtered to linkedin.com/in URLs. Uses the current page start index for pagination. |
| 5 | Extract Search Results | Parses the API response and structures each result into fields: name, title, link, snippet, and thumbnail image. Also calculates the next page index and whether more results exist. |
| 6 | Save Profiles to Google Sheets | Inserts each extracted profile as a new row in the spreadsheet. Runs in item mode to process multiple profiles in parallel. |
| 7 | Loop State Update | Passes the next start index and continuation flag back to the loop node to control pagination. |
Output
At the end of the run, you get a Google Spreadsheet populated with LinkedIn profiles of automotive CEOs in the US. Each row contains:
| Column | Description |
|---|---|
| Name | Person's full name |
| Title | Job title and company |
| LinkedIn URL | Direct link to the profile |
| Snippet | Short bio excerpt from Google |
| Image | Profile thumbnail URL (if available) |
The data is ready for further analysis, outreach, or import into your CRM.
Important Notes
- The workflow respects Google Custom Search free tier limits: up to 100 API requests per day and 10 results per request.
- Maximum results per run is capped at around 1,000 profiles due to API restrictions.
- Ensure your Google API key has the Custom Search API enabled to avoid authorization errors.
- The Programmable Search Engine must be configured to search across the entire web, not just specified sites.
- The LinkedIn profile URL is used as the unique key to prevent duplicate entries in the spreadsheet.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
