Google Sheets + Gemini: smarter LinkedIn invites
You sit down to do LinkedIn outreach and immediately hit the same wall: a messy spreadsheet, half-written notes, and that nagging fear you already messaged this person last week.
Sales reps feel it when pipeline is light. Recruiters feel it when roles are urgent. And founders doing their own outreach feel it most of all. This Gemini LinkedIn invites automation pulls prospects from Google Sheets, drafts a tailored note, sends the invite, then logs exactly what went out.
No more staring at profiles and improvising the same “would love to connect” line. You will see how the workflow prevents duplicates, keeps your sheet clean, and still sounds human.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + Gemini: smarter LinkedIn invites
flowchart LR
subgraph sg0["Manual Trigger (for testing) Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Manual Trigger (for testing)", pos: "b", h: 48 }
n1@{ icon: "mdi:play-circle", form: "rounded", label: "Run Every Minute", pos: "b", h: 48 }
n2@{ icon: "mdi:cog", form: "rounded", label: "Random Delay (1-5 min)", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Get Pending Prospect", pos: "b", h: 48 }
n4@{ icon: "mdi:database", form: "rounded", label: "Mark as In Progress", pos: "b", h: 48 }
n5["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch LinkedIn Profile"]
n6@{ icon: "mdi:robot", form: "rounded", label: "Generate Personalized Message", pos: "b", h: 48 }
n7@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Extract Message", pos: "b", h: 48 }
n9["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Send Connection Request"]
n10@{ icon: "mdi:database", form: "rounded", label: "Mark as Complete", pos: "b", h: 48 }
n7 -.-> n6
n8 -.-> n6
n1 --> n2
n4 --> n5
n3 --> n4
n5 --> n6
n2 --> n3
n9 --> n10
n0 --> n3
n6 --> n9
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 n0,n1 trigger
class n6,n8 ai
class n7 aiModel
class n3,n4,n10 database
class n5,n9 api
classDef customIcon fill:none,stroke:none
class n5,n9 customIcon
The Problem: LinkedIn Outreach Gets Messy Fast
Personalized connection requests work. The problem is the “personalized” part becomes a tax you pay every single day. You open a spreadsheet, open LinkedIn, open another tab for context, then start writing little notes that all sound suspiciously similar. Miss a detail and you look careless. Copy the wrong name and you look worse. After a week, your tracking is unreliable, so you either resend invites to the same person or stop trusting your own process and slow down.
The friction compounds. Here’s where it breaks down in real life.
- Writing “custom” notes for 20 prospects can quietly eat about 2 hours.
- Status tracking drifts, which means duplicates, awkward follow-ups, and wasted invites.
- You bounce between tools so much that the work feels heavier than it should.
- When multiple people touch the sheet, consistency disappears and nobody is sure what was actually sent.
The Solution: Sheets-Driven, AI-Personalized Connection Requests
This workflow turns your Google Sheet into a simple “send queue” for LinkedIn invites. Every minute (or on-demand), it looks for the next prospect marked PENDING, immediately flags that row as IN PROGRESS, and then fetches the prospect’s LinkedIn profile details through the ConnectSafely.ai API. With that context, Gemini drafts a short, authentic connection note that references something specific (role, tagline, or relevant background) without sounding like a template. Finally, the workflow sends the connection request via API and updates your sheet to DONE, storing the exact message that was sent so you can audit or reuse it later. A small jittered wait is included to mimic human pacing and reduce compliance risk.
The workflow starts from a schedule trigger (or manual test trigger). It grabs one pending row, enriches it with profile data, generates the invite text, then dispatches the request and logs the outcome. Your sheet becomes your source of truth again.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you send 20 connection requests per weekday. Manually, you might spend about 5 minutes per prospect between checking the profile, writing a note, sending, then updating your sheet, which is roughly 100 minutes a day. With this workflow, the “work” is adding rows and setting Status to PENDING (maybe 10 minutes total), then letting it run in the background with a 1–5 minute jitter between sends. You still get personalization, but you’re not trapped in the tabs.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store prospects, status, and sent messages
- ConnectSafely.ai to fetch profiles and send invites
- Google Gemini API key (get it from Google AI Studio)
Skill level: Intermediate. You’ll connect a few credentials, map sheet columns, and tweak one AI prompt to match your voice.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A timed trigger starts the run. The schedule can fire every minute, and there’s also a manual trigger for testing. A short jittered pause is added so requests don’t look robotic.
Google Sheets acts like a queue. The workflow searches your sheet for the first row with Status set to PENDING, then immediately updates it to IN PROGRESS. That one move prevents the classic “two runs grabbed the same lead” problem.
Profile context gets pulled in. Using HTTP requests, n8n calls the ConnectSafely.ai API to retrieve LinkedIn profile data tied to the URL in your sheet. Then Gemini uses that context (plus your “MY CONTEXT” section) to draft a short connection note that fits LinkedIn’s character limits.
Invites go out and your log stays clean. The workflow sends the connection invite through ConnectSafely.ai, then updates the same row to DONE and writes the message into the Message column so you always know what was sent.
You can easily modify the schedule timing to run slower or faster based on your outreach volume. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up the manual trigger so you can run the workflow on-demand while also keeping the scheduled trigger available for automation.
- Add and open Manual Start Trigger.
- Keep default settings, then connect Manual Start Trigger to Fetch Pending Lead.
- Confirm the scheduled path runs from Scheduled Minute Trigger → Jittered Pause → Fetch Pending Lead so both entry points are supported.
Step 2: Configure the Scheduled Trigger and Wait Logic
Configure the minute-based schedule and randomized pause to stagger outreach activity.
- Open Scheduled Minute Trigger and set the interval rule to minutes with minutesInterval set to
1. - Open Jittered Pause and set Unit to
minutes. - Set Amount to
{{ Math.floor(Math.random() * 4) + 1 }}to randomize the delay between 1–4 minutes.
Step 3: Connect Google Sheets
Link your lead sheet and status fields to read and update outreach progress.
- Open Fetch Pending Lead and select the target Document and Sheet in documentId and sheetName.
- Credential Required: Connect your googleSheetsOAuth2Api credentials in Fetch Pending Lead.
- Open Flag In-Progress, set Operation to
update, and select the same documentId and sheetName. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Flag In-Progress.
- Open Set Completed Status, set Operation to
update, and select the same documentId and sheetName. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Set Completed Status.
Step 4: Configure LinkedIn Profile Retrieval
Pull the profile data for each pending lead to feed the AI invitation message.
- Open Retrieve LinkedIn Profile and set URL to
https://api.connectsafely.ai/linkedin/profile. - Set Method to
POSTand enable Send Body. - In Body Parameters, add profileId with value
{{ $('Fetch Pending Lead').item.json['LinkedIn Url'] }}. - Credential Required: Connect your httpBearerAuth credentials in Retrieve LinkedIn Profile.
Step 5: Set Up the AI Invite Generator
Configure the AI agent to generate a personalized LinkedIn invite message based on the retrieved profile.
- Open Compose Personalized Invite and set Text to
{{ $json.profile }}. - Keep Prompt Type as
defineand ensure Has Output Parser is enabled. - Open Gemini Chat Model and connect it as the language model for Compose Personalized Invite.
- Credential Required: Connect your Google Gemini credentials in Gemini Chat Model.
- Open Parse Invite Text and keep the Input Schema as provided to output a
messagefield.
Step 6: Configure Invite Dispatch and Status Update
Send the AI-crafted invite and then mark the lead as completed.
- Open Dispatch Connection Invite and set URL to
https://api.connectsafely.ai/linkedin/connect. - Set Method to
POSTand enable Send Body. - Add profileId with value
{{ $('Fetch Pending Lead').item.json['LinkedIn Url'] }}. - Add customMessage with value
{{ $json.message }}. - Ensure the node connects to Set Completed Status so each invite updates the lead record.
Step 7: Test and Activate Your Workflow
Run a manual test, verify outputs, and then activate the schedule for ongoing outreach.
- Click Execute Workflow from Manual Start Trigger to process a single pending lead.
- Confirm Retrieve LinkedIn Profile returns profile data and Compose Personalized Invite outputs a
messagefield. - Verify Dispatch Connection Invite sends the request and Set Completed Status updates the sheet.
- Turn on the workflow by activating it, which enables the Scheduled Minute Trigger → Jittered Pause → Fetch Pending Lead cycle.
{{ $('Fetch Pending Lead').item.json['LinkedIn Url'] }}, the profile lookup and invite dispatch will fail. Ensure the LinkedIn URL column name matches exactly.Common Gotchas
- ConnectSafely.ai credentials can expire or need specific permissions. If things break, check your API key in the ConnectSafely.ai dashboard under Settings → API Keys first.
- If you’re using Wait nodes or external calls, 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 or you’ll be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your accounts and sheet are ready.
No coding required. You’ll connect credentials and map a few fields in Google Sheets.
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 Gemini API usage and any ConnectSafely.ai plan/API costs.
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 it’s mostly prompt work. Update the “MY CONTEXT” section in the Compose Personalized Invite node so Gemini writes like a recruiter, then adjust what you pass in (for example, include the candidate’s Tagline and any role you’re hiring for). Common customizations include changing the tone to more direct, enforcing a tighter character limit for LinkedIn, and adding a specific call to action like “open to a quick chat this week?”
Usually it’s an expired or incorrect API key. Regenerate the key in your ConnectSafely.ai dashboard, then update the Bearer/Header Auth credential used by the “Retrieve LinkedIn Profile” and “Dispatch Connection Invite” HTTP request nodes. If the key is correct, the next thing to check is the LinkedIn URL format in your sheet (include the full https://www.linkedin.com/in/ path). Rate limiting can also show up when you push volume too quickly.
On n8n Cloud Starter, you can run up to about 2,500 executions per month, and higher plans handle more. If you self-host, there’s no execution cap, but your server and API limits still matter. Practically, most teams keep LinkedIn invites to 10–20 per day at first, then ramp up slowly. This workflow processes one lead per run, with an intentional wait between invites.
For this use case, n8n is a better fit when you care about control: marking rows IN PROGRESS to prevent duplicates, adding jittered waits, and handling richer logic around status updates. You also get a self-hosting option, which matters once you’re running this every minute. Zapier or Make can be simpler for quick two-step zaps, but they get awkward when you need “lock this row, enrich it, generate text, send it, then write back” in one reliable loop. If you’re unsure which way to go, Talk to an automation expert and we’ll sanity-check it with you.
Once this is running, your outreach stops being a daily grind and turns into a steady system. The workflow handles the repetitive parts, so you can focus on real conversations.
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.