See llms.txt for all machine-readable content.

Back to Templates

Find work emails for pending leads with Google Sheets and LeadMagic

Quick overview

Fill missing work emails in Google Sheets with LeadMagic. The workflow records each lookup outcome on the original lead row and matches by permanent Lead ID, so results stay attached to the right lead after sorting.

How it works

  1. Runs when you start the workflow manually.
  2. Loads configuration values (Google Sheets URL, tab name, and per-run max rows) and reads all rows from the specified Google Sheets tab.
  3. Filters and validates rows to queue only leads with a unique Lead ID, no existing email, and an Email Status of blank, pending, or retry, up to the configured limit.
  4. Processes queued leads one at a time, first updating Google Sheets to mark the row as in_progress and record the checked timestamp.
  5. Looks up a work email in LeadMagic using the person’s name plus company domain or company name, continuing even if the API returns an error.
  6. Classifies the LeadMagic response (valid, not_found, review_domain, review_response, or request_error) and updates the matching Lead ID row in Google Sheets with the outcome, email/provider when valid, and a new timestamp.
  7. Waits one second to pace requests and repeats until all queued leads are processed.

Setup

  1. Create a Google Sheet tab (default name: Leads) with a header row that includes at least Lead ID, First Name, Last Name, Company Domain, Company Name, Email, Email Status, Email Provider, and Checked At, and ensure rows are contiguous with a unique plain-text Lead ID per row.
  2. Connect Google Sheets credentials for the read and update steps, and set the sheet URL and tab name in the workflow’s Configuration values.
  3. Install the LeadMagic n8n node (if needed) and add your LeadMagic API credentials, then select that credential in the LeadMagic email finder step.
  4. Set max_rows (1–50) to control how many eligible leads are processed per run, and only mark rows for processing by leaving Email blank and setting Email Status to blank, pending, or retry.

Requirements

  • An n8n instance that supports verified community nodes, a LeadMagic API key, and a Google Sheets credential with edit access to the spreadsheet.

Customization

  • Set the tab name and max_rows in Configuration. Start with a few rows and run one execution at a time. To retry an interrupted or failed lookup, check the execution and credit history, then set Email Status to retry on the row with a blank Email.

Additional info

A completed lookup with no match is recorded as not_found. Rows with domain mismatches, unexpected responses, or request errors stay available for review. LeadMagic charges for verified matches.

Install the verified LeadMagic node
LeadMagic Email Finder API and credit details