Overview
This guide will walk you through automating your prospecting process by searching and enriching company data directly in Google Sheets using the Lusha’s Prospecting API. With this setup, you’ll be able to populate a list of companies based on specific filters, retrieve detailed company data, and track enrichment progress efficiently.How it Works?
Step 1: Create a Google Sheets Template
- Start by making a new sheet on Google Sheets
- Name the sheet as “Sheet1” or update the variable
sheetNamein the script with your sheet name
Step 2: Add the Script to Google Sheets
- Open your copied Google Sheets file
- Navigate to Extensions > Apps Script
- Delete any existing code in the script editor
- Replace it with the provided script:
Step 3: Customize and Run
Make sure to provide your API Key to enable communication with Lusha’s API. You can access your API key here (only admins and managers have access to this page). Once you have your API key, locate the lines below in your script:[18, 19, 20, 12, 13, 3, 16, 8])
Company Size: Minimum size set to 51 employees
You can modify these filters to match your prospecting needs:
- In the script, locate the
payloadobject in thepopulateCompanies()function - Adjust the following fields:
- locations: Change the country to target other regions
- mainIndustriesIds: Update the industry IDs based on your focus. Refer to the Lusha API documentation for available industry IDs
- sizes: Modify the
minfield to set the minimum company size
Step 4: Review and Analyze Results
- Go back to your Google Sheet
- Open the “Lusha Actions” menu added by the script
- Select “Search Companies” to populate the sheet with companies matching your filters
- Use “Enrich Companies” to retrieve detailed data for the listed companies
Data Fields Returned
The script populates your sheet with comprehensive company information including: Basic Company Information:- Account Name, Website, Company ID
- Description, Employee Size
- Founded year, Revenue information
- Main Industry, Sub Industry
- SICS Code & Description
- NAICS Code & Description
- Industry Tags
- Country, Country ISO2, City, State
- Full Address, Continent
- Geographic coordinates
- LinkedIn URL, Specialties
- Revenue Range, Funding information
- Employee count and company size
- Request ID for batch operations
- Page tracking for search results
- Enrichment status indicators
Workflow Process
1. Search Phase
- Configure filters for your target market (location, industry, size)
- Execute “Search Companies” to populate initial company list
- Results are displayed with basic company information
2. Enrichment Phase
- Use “Enrich Companies” to get detailed data for all found companies
- Each company is enriched individually with comprehensive business data
- Progress tracking through automated logging
3. Analysis Phase
- Review enriched data across 22+ data fields
- Analyze company patterns and opportunities
- Export or further process the enriched dataset
Troubleshooting
If issues arise during the process:- Error Messages: Check the Status Code and Message columns for details on failures (e.g., invalid Company name, missing API key)
- Invalid JSON Response: Verify that your API key is correct and that the sheet data matches the expected input structure
- Rate Limits: If the API returns rate-limit errors, consider spacing out requests or upgrading your API plan
Additional Resources
If you have any questions on the above feel free to reach out the support team:- Via live chat from the Lusha website
- Your Lusha Dashboard
- Via email: support@lusha.com