Skip to main content

LinkedIn lead personalization with Google Drive, Apify & AI

Workflow preview

Workflow preview
100%
LinkedIn lead personalization with Google Drive, Apify & AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This template enriches a lead list by analyzing each contact’s LinkedIn activity and auto generating a single personalized opening line for cold outreach. Drop a spreadsheet into a Google Drive fol...

Best for

  • Lead Generation automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.telegram, n8n-nodes-base.set, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.splitinbatches

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mariela Slavenova.

Original n8n.io source

1.1 Workflow description

Title
LinkedIn lead personalization with Google Drive, Apify & AI
Workflow name
LinkedIn lead personalization with Google Drive, Apify & AI

This template enriches a lead list by analyzing each contact’s LinkedIn activity and auto-generating a single personalized opening line for cold outreach. Drop a spreadsheet into a Google Drive folder → the workflow parses rows, fetches LinkedIn content (recent post or profile), uses an LLM to craft a one-liner, writes the result back to Google Sheets, and sends a Telegram summary.

Good to know

•	Works with two paths:
•	Recent post found → personalize from the latest LinkedIn post.
•	No recent post → personalize from profile fields (headline, about, current role).
•	Requires valid Apify credentials for LinkedIn scrapers and LLM keys (Anthropic and/or OpenAI).
•	Costs depend on the LLM(s) you choose and scraping usage.
•	Replace all placeholders like [put your token here] and [put your Telegram Bot Chat ID here] before running.
•	Respect the target platform’s terms of service when scraping LinkedIn data.

What this workflow does

1.	**Trigger (Google Drive)** – Watches a specific folder for newly uploaded lead spreadsheets.
2.	**Download & Parse** – Downloads the file and converts it to structured items (first name, last name, company, LinkedIn URL, email, website).
3.	**Batch Loop** – Processes each row individually.
4.	**Fetch Activity** – Calls Apify LinkedIn Profile Posts (latest post) and records current date for recency checks.
5.	**Recency Check (LLM)** – An OpenAI node returns true/false for “post is from the current year.”
6.	**Branching**
•	If TRUE → AI Agent (Anthropic) crafts a single, natural reference line based on the recent post.
•	If FALSE → Apify LinkedIn Profile → AI Agent (Anthropic) crafts a one-liner from profile data (headline/about/current role).
7.	**Write Back (Google Sheets)** – Updates the original sheet by matching on email and writing the personalization field.
8.	**Notify (Telegram)** – Sends a brief completion summary with sheet name and link.

Requirements

•	Google Drive & Google Sheets connections
•	Apify account + token for LinkedIn scrapers
•	LLM keys: Anthropic (Claude) and/or OpenAI (you can use one or both)
•	Telegram bot for notifications (bot token + chat ID)

How to use

1.	Connect credentials for Google, Apify, OpenAI/Anthropic, and Telegram.
2.	Set your folder in the Google Drive Trigger to the one where you’ll drop lead sheets.
3.	Map sheet columns to the expected headers (e.g., First Name, Last Name, Company Name for Emails, Person Linkedin Url, Email, Website).
4.	Replace placeholders ([put your token here], [put your Telegram Bot Chat ID here]) in the respective nodes.
5.	Upload a test spreadsheet to the watched folder and run once to validate the flow.
6.	Review results in your sheet (new personalization column) and check Telegram for the completion message.

Setup

1.	Connect credentials - Google Drive/Sheets, Apify, OpenAI and/or Anthropic, Telegram.
2.	Configure the Drive trigger - Select the folder where you’ll upload your lead sheets.
3.	Map columns - Ensure your sheet has: First Name, Last Name, Company Name for Emails, Person Linkedin Url, Email, Website.
4.	Replace placeholders - In HTTP nodes: Bearer [put your token here]. In Telegram node: [put your Telegram Bot Chat ID here]
5.	(Optional) Adjust the recency rule - Current logic checks for current-year posts; change the prompt if you prefer 30-day windows.

How to use

1.	Upload a test spreadsheet to the watched Drive folder.
2.	Execute the workflow once to validate.
3.	Open your Google Sheet to see the new personalization column populated.
4.	Check Telegram for the completion summary.

Customizing this template

•	Data sources: Add company news, website content, or X/Twitter as fallback signals.
•	LLM choices: Use only Anthropic or only OpenAI; tweak temperature for tone.
•	Destinations: Write to a CRM (HubSpot/Salesforce/Airtable) instead of Sheets.
•	Notifications: Swap Telegram for Slack/Email/Discord.

Who it’s for

•	Sales & SDR teams needing authentic, scalable personalization for cold outreach.
•	Lead gen agencies enriching spreadsheets with ready-to-use openers.
•	Marketing & growth teams improving reply rates by referencing real prospect activity.

Limitations & compliance

•	LinkedIn scraping may be rate-limited or blocked; follow platform ToS and local laws.
•	Costs vary with scraping volume and LLM usage.

Need help customizing?

Contact me for consulting and support: LinkedIn

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Anthropic Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.3

Block 2 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - End of Loops

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Lead Enrichment is ready

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 6 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Personalization

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Colect LinkedIn Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - AI Agent1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 10 - Anthropic Chat Model3

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.3

Block 11 - Scrape LinkedIn Profile Post

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 13 - Google Drive Trigger1

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 14 - Google Drive_DownLoad1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 15 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 16 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Date & Time

Type / Role
n8n-nodes-base.dateTime - dateTime
Config choices
Version 2

Block 18 - Sticky Note11

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - If the LN post is in the last 30 days

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 20 - AI Agent_Personalization_no LN post

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 21 - Google Sheet Parse

Type / Role
n8n-nodes-base.spreadsheetFile - spreadsheetFile
Config choices
Version 1

Block 22 - Sticky Note12

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Code1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 24 - Google Sheets Update with Personalization

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow LinkedIn lead personalization with Google Drive, Apify & AI
Complexity advanced
Nodes 25
Categories Lead Generation, AI Chatbot
Author Mariela Slavenova
Published 18 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8706/8706.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does LinkedIn lead personalization with Google Drive, Apify & AI do?

This template enriches a lead list by analyzing each contact’s LinkedIn activity and auto generating a single personalized opening line for cold outreach. Drop a spreadsheet into a Google Drive fol...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Chatbot use case.