Skip to main content
Community template Uses AILead NurturingMultimodal AI

Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter - n8n workflow template

The automation loads rows from a Google Sheet of leads that you want to contact. It makes a Google search via Apify for LinkedIn links based on the First name / Last name / Company. Another Apify actor fetches the right LinkedIn profile based on the first profile which is…

Template by Adam Janes · Original listing (opens in a new tab)

Starts on
App event
Nodes
19 nodes
Level
Advanced
Setup
About 26 min

Workflow preview

How this workflow runs

  1. 1

    When clicking ‘Execute workflow’

    Starts the workflow manually when you click 'Execute workflow' — used for testing and manual runs.

  2. 2

    OpenRouter Chat Model

    Provides a language model via OpenRouter as the chat model.

  3. 3

    Structured Output Parser

    Forces the AI output into a structured JSON schema for reliable downstream use.

  4. 4

    Get Leads

    Reads from or writes rows to a Google Sheets spreadsheet.

  5. 5

    Loop Over Items

    Loops over items in batches, processing each one in turn (used for iteration).

  6. 6

    Google Search for Person LinkedIn

    Makes an external API call (HTTP request) to send or retrieve data from a third-party service.

  7. 7

    Only People Links

    Keeps only the items that match a condition and discards the rest.

  8. 8

    Aggregate

    Combines multiple items into a single aggregated item.

  9. 9

    Get LinkedIn Person

    Makes an external API call (HTTP request) to send or retrieve data from a third-party service.

  10. 10

    Current Company Exists?

    Branches the workflow based on a true/false condition.

Creator's notes and setup

Written by Adam Janes for the original listing.

How it works

  • The automation loads rows from a Google Sheet of leads that you want to contact.
  • It makes a Google search via Apify for LinkedIn links based on the First name / Last name / Company.
  • Another Apify actor fetches the right LinkedIn profile based on the first profile which is retuned
  • The same process is done for the company that the lead works for, giving extra context. If the lead has a current company listed on their LinkedIn, we use that URL to do the lookup, rather than doing a separate Google search.
  • A call is made to OpenRouter to get an LLM to generate an email based on a prompt designed to do personalized outreach.
  • An email is sent via a Gmail node.

Set up steps

  • Connect your Google Sheets + Gmail accounts to use these APIs.
  • Make an account with Apify and enter your credentials.
  • Set your details in the "Set My Data" node to customize the workflow to revolve around your company + value proposition.

I would recommend changing the prompt in the "Generate Personalized Email" node to match the tone of voice that you want your agent to have.

You can change the guidelines to e.g. change whether the agent introduces itself, and give more examples in the style you want to make the output better.

n8n nodes used (12 types)

What every node does (19)
  • When clicking ‘Execute workflow’ (Manual Trigger)Starts the workflow manually when you click 'Execute workflow' — used for testing and manual runs.
  • Aggregate (Aggregate)Combines multiple items into a single aggregated item.
  • Only People Links (Filter)Keeps only the items that match a condition and discards the rest.
  • Aggregate1 (Aggregate)Combines multiple items into a single aggregated item.
  • Get LinkedIn Person (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Only Company Links (Filter)Keeps only the items that match a condition and discards the rest.
  • Current Company Exists? (If)Branches the workflow based on a true/false condition.
  • Google Search for Company LinkedIn (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Google Search for Person LinkedIn (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Get LinkedIn Company (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Get Leads (Google Sheets)Reads from or writes rows to a Google Sheets spreadsheet.
  • Set Company URL (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Set Company URL1 (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Generate Personalized Email (Chain Llm)A basic LLM chain that sends a prompt to the model and returns the formatted result.
  • OpenRouter Chat Model (LLM Chat Open Router)Provides a language model via OpenRouter as the chat model.
  • Gmail (Gmail)Sends or reads email through Gmail.
  • Structured Output Parser (Output Parser Structured)Forces the AI output into a structured JSON schema for reliable downstream use.
  • Loop Over Items (Split In Batches)Loops over items in batches, processing each one in turn (used for iteration).
  • Set Data (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.

FAQ

Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter: questions

How do I import the "Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter" use?

It uses Google Sheets, HTTP Request, If, Set, Split In Batches and Gmail, plus 6 more. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Lead Nurturing, Multimodal AI. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.

About this page

Free n8n workflow templates to copy and import

The AltFTool n8n library collects free n8n workflow templates for AI agents, Gmail, Google Sheets, Telegram and other apps. Each workflow page shows a preview, the list of nodes and the credentials it needs, and lets you copy or download the JSON to import into your own n8n.

Search the templates by app or task, or browse them by category and by node. The Workflow Inspector checks any workflow JSON for triggers, credentials and hardcoded keys before you share it, and the expressions cheat sheet gives copy-paste n8n expression examples. AltFTool is not affiliated with n8n.

People also search for

  • n8n workflow templates
  • n8n templates
  • n8n automation examples
  • n8n json workflows
  • n8n nodes
  • free n8n workflow templates
  • n8n ai agent template
  • n8n expressions cheat sheet