I Built an Apollo Lead Enrichment Workflow That Generates Personalized Cold Email Openers with GPT-4o-mini

Sharing a workflow I built to solve a problem I kept running into — writing personalized cold email openers at scale without spending 4 hours per campaign.

The setup: 4 nodes.

  1. Trigger
  2. Google Sheets node reads company data from an Apollo CSV export (Company Name, Industry, # Employees, City, State, Website)
  3. OpenAI node sends each row to GPT-4o-mini with a personalized prompt
  4. Google Sheets node writes the 2-sentence opener back to the same row

Why GPT-4o-mini: cost. ~$0.0005 per lead. 1,000 enriched openers = $0.50.

The prompt template (default):
“Write a 2-sentence personalized cold email opener for a B2B outreach campaign offering AI workflow automation services to this company:
Company: {{ $json[‘Company Name’] }}
Industry: {{ $json[‘Industry’] }}
Size: {{ $json[‘# Employees’] }} employees
Location: {{ $json[‘City’] }}, {{ $json[‘State’] }}
Write ONLY the opener. No greeting, no signature. Reference something specific about their industry or size. Under 40 words. Sound human, not salesy.”

Things that took me longer than expected:

  • Google Cloud OAuth setup for n8n self-hosted. The redirect URI needs to be http://localhost:5678/rest/oauth2-credential/callback exactly, and you need to add yourself as a Test User on the consent screen even though you’re the owner.
  • OpenAI’s response is wrapped in an output array — needed {{ $json.output[0].content[0].text }} to extract the actual text in the update node.

A few different prompt variations I tested (industry-specific, pain-point question opener, mutual-context opener) gave noticeably different reply rates in my own outreach. The default works fine but tuning the prompt to the industry helped a lot.

If anyone wants the workflow JSON + setup guide + the 5 prompt variations packaged together, I put it up here: Apollo Lead Enrichment Pipeline – n8n Workflow

Happy to answer questions about how any of the nodes work.