LinkedIn to Gmail, personalized drafts ready to send
You find a good LinkedIn prospect, then the grind starts. Copy the URL. Hunt for an email. Google the company. Open five tabs. By the time you write the first line, you’ve lost the momentum (and honestly, sometimes the lead too).
This LinkedIn Gmail automation hits sales reps first, but recruiters and demand gen marketers feel it too. You want personalization that doesn’t take all afternoon. This workflow gets you a ready-to-review Gmail draft from a single LinkedIn URL.
Below you’ll see how the workflow turns profile data into research-backed messaging, what it saves you in real time, and what you need to plug it into your outreach process.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: LinkedIn to Gmail, personalized drafts ready to send
flowchart LR
subgraph sg0["On form submission1 Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Lead Information", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n2@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Ice Breaker Email Generator", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "Lead Research Agent", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Perplexity Research", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Your Offer", pos: "b", h: 48 }
n7@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model2", pos: "b", h: 48 }
n8@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch1", pos: "b", h: 48 }
n10@{ icon: "mdi:cog", form: "rounded", label: "Email Finder", pos: "b", h: 48 }
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Failed To Find Enrichment"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>On form submission1"]
n13@{ icon: "mdi:cog", form: "rounded", label: "Add To lead Database", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Return Case Studies", pos: "b", h: 48 }
n15@{ icon: "mdi:message-outline", form: "rounded", label: "Create a draft", pos: "b", h: 48 }
n9 --> n11
n9 --> n0
n6 --> n4
n10 --> n9
n8 -.-> n4
n0 --> n13
n2 -.-> n3
n7 -.-> n4
n4 --> n3
n12 --> n10
n5 -.-> n4
n14 -.-> n3
n13 --> n6
n1 -.-> n3
n3 --> n15
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n12 trigger
class n1,n3,n4 ai
class n2,n7 aiModel
class n8 ai
class n9 decision
classDef customIcon fill:none,stroke:none
class n11,n12 customIcon
The Problem: Personalization Takes Too Long to Scale
Personalized cold email works, but manual personalization is a tax on your day. You’re not just writing an opener; you’re doing detective work: finding the right email, confirming company details, scanning news, and trying to pull a believable “reason I’m reaching out” from a handful of clues. Then you still have to paste it all into Gmail and hope nothing gets mixed up. One small mistake (wrong company name, stale job title, generic flattery) can tank the whole message and waste the lead.
It adds up fast. Here’s where it usually breaks down.
- Finding a verified email often means bouncing between tools, and it can easily eat 10 minutes per lead.
- Company research turns into a rabbit hole, and the “quick scan” becomes 20 minutes of tab juggling.
- Openers end up inconsistent because you’re writing from memory and rushing, which means more rewrites later.
- Drafting inside Gmail is slow and error-prone when you’re copying names, roles, and details by hand.
The Solution: LinkedIn URL In, Gmail Draft Out
This workflow starts with a simple form where you submit a LinkedIn profile URL. n8n sends that URL to Wiza to discover the prospect’s email and basic company info, then routes the workflow based on whether enrichment succeeded. If it fails, you get a clear “enrichment failure” response instead of silently creating bad drafts. If it succeeds, the lead details get mapped into a clean structure and appended to a lightweight lead database, so you’re not losing track of who you contacted. From there, Perplexity gathers recent, relevant context (news, growth signals, likely pain points), and an AI agent uses your offer profile plus that research to write a personalized icebreaker email. The final output is a Gmail draft sitting in your inbox, ready for a quick human review.
The workflow kicks off with the LinkedIn form trigger, then runs enrichment through Wiza and a status switch. Next, it performs prospect and company research with Perplexity and an AI agent, then composes the email and pushes the draft straight into Gmail. You review, tweak a line or two, and send.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you personalize 10 outbound emails a day. Manually, you might spend about 10 minutes finding an email, 15 minutes researching, and 5 minutes drafting and formatting in Gmail. That’s roughly 5 hours a day. With this workflow, submitting the LinkedIn URL takes about a minute, the enrichment + research + draft generation typically runs in a few minutes, and you spend maybe 2 minutes reviewing before sending. You’re back to real selling work, not browser gymnastics.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Wiza for email discovery and enrichment
- Perplexity to research the prospect’s company context
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You’ll connect credentials, update the offer context node, and test a few runs.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A LinkedIn URL triggers the run. You submit the profile link through the built-in form trigger, which is handy for reps because it’s quick and consistent.
Email discovery and routing happens automatically. Wiza attempts to find the email and enrichment details, then a switch routes the workflow to either a failure form response or the enrichment path.
Research becomes usable talking points. Lead fields are mapped and saved, your “Service Offer Profile” is loaded, and Perplexity gathers context that an AI agent can cite without sounding like it’s making things up.
A draft lands in Gmail. The personalized email composer generates the outreach message, and n8n creates a Gmail draft so you can review it in the same place you actually send email.
You can easily modify the offer context and the email template to match your niche, tone, and compliance needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
This workflow starts when a lead submits a LinkedIn URL through a form.
- Add and open LinkedIn Form Trigger.
- Set Form Title to
Linkedin. - Under Form Fields, add a field with Field Label set to
Linkedin. - Save the node and copy the generated form URL if you plan to embed or share it.
Linkedin so downstream expressions like {{$json.Linkedin}} resolve correctly.Step 2: Connect Wiza Enrichment and Route Status
After a form submission, the workflow enriches the lead and routes failures to a completion form.
- Open Email Discovery and set Input Type to
linkedinUrl. - Set LinkedIn URL to
{{$json.Linkedin}}. - Credential Required: Connect your wizaApi credentials in Email Discovery.
- Open Status Route Switch and confirm the rules check
{{$json.status}}equalsfailed(outputFailed) and equalsfinished(outputFinished). - Open Enrichment Failure Form and verify Operation is
completion, Completion Title isFailed To Find Enrichment Data, and Completion Message isThe Wiza Back-End Could Not Find any Enrichment Data from the provided information.
status from Wiza, all leads may fall into the wrong path—validate enrichment responses during testing.Step 3: Map Lead Fields and Append to Data Table
Successful enrichment data is normalized and stored for reporting and follow-up.
- Open Lead Detail Mapper and set assignments to map enrichment fields, including: full_name →
{{$json.name}}, title →{{$json.title}}, location →{{$json.location}}, company_industry →{{$json.company_industry}}, company_domain →{{$json.company_domain}}, company_revenue →{{$json.company_revenue_range}}, company_size →{{$json.company_size}}, company_type →{{$json.company_type}}, company_description →{{$json.company_description}}, company_location →{{$json.company_location}}, email →{{$json.email}}, id →{{$json.id}}. - Open Append Lead Database and select the Data Table with ID
Leads. - Map the columns exactly: name →
{{$json.full_name}}, email →{{$json.email}}, title →{{$json.title}}, location →{{$json.location}}, company_size →{{$json.company_size}}, company_domain →{{$json.company_domain}}, company_industry →{{$json.company_industry}}, linkedin_profile_url →{{$('LinkedIn Form Trigger').item.json.Linkedin}}, company_revenue_range →{{$json.company_revenue}}, and keep email_sent asfalse.
Step 4: Set Up AI Research and Context
This section configures the research agent, memory, tools, and business context that drive personalization.
- Open Service Offer Profile and set Grand Slam Offer to
### **OFFER NAME:** ...(use the full multi-line offer text from the node) and Business Profile to# otomata.xyz — Business Profile ...(use the full multi-line business profile text from the node). - Open OpenAI Mini Chat Model, set the model to
gpt-5-mini-2025-08-07, and connect credentials. Credential Required: Connect your openAiApi credentials. - Open Session Memory Buffer and set Session Key to
1020293294with Session ID Type set tocustomKey. - Open Perplexity Insight Fetcher and keep Simplify enabled. Credential Required: Connect your perplexityApi credentials.
- Open Prospect Research Agent and keep the prompt as defined. Confirm it references lead fields like
{{$('Lead Detail Mapper').item.json.full_name}}and company fields such as{{$('Lead Detail Mapper').item.json.company_domain}}. - Open Retrieve Case Studies and set Operation to
getand Return All totruewith the Data Table set toCase Studies.
Step 5: Set Up Email Composition and Drafting
The research output is transformed into a personalized email and saved as a Gmail draft.
- Open OpenAI Dialogue Model, set the model to
gpt-5, and connect credentials. Credential Required: Connect your openAiApi credentials. - Open Structured Result Parser and keep the JSON Schema Example set to the provided schema, including keys like
lead_full_name,subject_line,email_address, andicebreaker_email. - Open Personalized Email Composer and keep the prompt as defined. Ensure the system message injects values like
{{$('Service Offer Profile').item.json['Business Profile']}}and the research report via{{$('Prospect Research Agent').item.json.output}}. - Open Gmail Draft Creator and set Resource to
draft, Email Type tohtml, Subject to{{$json.output.subject_line}}, Message to{{$json.output.icebreaker_email}}, and Send To to{{$json.output.email_address}}. - Credential Required: Connect your gmailOAuth2 credentials in Gmail Draft Creator.
<br> line breaks—ensure Email Type remains set to html in Gmail Draft Creator or formatting will break.Step 6: Test and Activate Your Workflow
Validate each path before turning the workflow on.
- Click Execute Workflow and submit a test lead through LinkedIn Form Trigger with a valid LinkedIn URL.
- Confirm Email Discovery returns
statusasfinishedand Status Route Switch sends the lead to Lead Detail Mapper. - Verify a new record appears in the Append Lead Database table and that Prospect Research Agent returns a research summary.
- Check that Personalized Email Composer outputs JSON with
subject_lineandicebreaker_email, and that Gmail Draft Creator creates a draft in Gmail. - Once successful, toggle the workflow to Active for production use.
Common Gotchas
- Wiza credentials can expire or need specific permissions. If things break, check the Wiza API key entry in your n8n credentials store first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early in the “Ice Breaker Email Generator” prompt or you will be editing outputs forever.
Frequently Asked Questions
About 30 minutes once you have your API keys.
No. You’ll mainly connect accounts and paste a few API keys into n8n. The only “technical” part is testing with a couple of LinkedIn URLs to make sure enrichment and draft creation work end to end.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in API usage for Wiza, Perplexity, and OpenAI, which depends on how many leads you process.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. Update the “Service Offer Profile” node with your business context, then edit the prompt in “Ice Breaker Email Generator” to match your voice and the kinds of proof you want to reference. Many teams also adjust the “Retrieve Case Studies” data table so the composer can pull in relevant examples automatically. If you prefer a different model, swap the OpenAI chat model node used by the agents.
Usually it’s OAuth permissions or an expired token in your n8n Gmail credentials. Reconnect the Gmail account, then confirm the draft-creation scope is allowed. Also check that the workflow is running under the same Google account you expect, because teams sometimes authenticate a personal inbox by accident.
A few hundred a day is realistic if your API limits allow it and you’re not running huge research prompts.
It depends on how “smart” you want the workflow to be. Zapier and Make are fine for simple routing, but this flow leans on agents, structured parsing, and branching logic, which n8n handles cleanly without you fighting plan limits. You also get a self-hosting option, which can matter once you’re generating lots of drafts. The tradeoff is a bit more setup and testing. If you want help choosing, Talk to an automation expert.
This is the kind of automation that pays for itself in attention. You keep the human judgment, but you stop spending your best hours on copy-paste research.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.