đź’¬ Send AI-personalized LinkedIn connection requests from Google Sheets with Gemini

⚡ 186 views · 💬 Lead Nurturing & AI Sales Agents

💡 Pro Tip — If you’re pulling LinkedIn data through HTTP requests or dealing with API restrictions, there’s a community node called ScraperNode that handles this natively. It has dedicated scrapers for profiles, companies, jobs, and people search — you just pass a URL and get structured data back.

View All Scrapers

Description

Send AI-personalized LinkedIn connection requests from Google Sheets using ConnectSafely.AI API

Who’s it for

This workflow is built for sales professionals, recruiters, founders, and growth marketers who want to scale their LinkedIn outreach without sacrificing personalization. Perfect for anyone tired of sending generic connection requests that get ignored, or manually crafting individual messages for hundreds of prospects.

If you’re running ABM campaigns, building a sales pipeline, recruiting talent, or expanding your professional network, this automation handles the heavy lifting while keeping your outreach authentic and human.

How it works

The workflow automates personalized LinkedIn connection requests by combining Google Sheets prospect tracking with AI-powered message generation through ConnectSafely.ai’s API.

The process flow:

  1. Reads pending prospects from your Google Sheet
  2. Immediately marks them “IN PROGRESS” to prevent duplicate sends
  3. Fetches complete LinkedIn profile data via ConnectSafely.ai API
  4. Generates a personalized, authentic message using Google Gemini AI
  5. Sends the connection request with your custom message
  6. Updates your sheet with “DONE” status and stores the message sent

Random delays between requests mimic human behavior and maintain LinkedIn compliance.


Watch the complete step-by-step implementation guide:

LinkedIn Connection Request Automation Tutorial


Setup steps

Step 1: Prepare Your Google Sheet

Structure your Google Sheet with the following columns:

Column NameDescriptionRequired
First NameContact’s first nameOptional
LinkedIn UrlLinkedIn profile URL or usernameYes
TaglineContact’s headline/titleOptional
StatusProcessing status (PENDING/IN PROGRESS/DONE)Yes
MessageStores the AI-generated message sentYes

Sample Data Format:

First Name: John
LinkedIn Url: https://www.linkedin.com/in/johndoe
Tagline: VP of Sales at TechCorp
Status: PENDING
Message: (left empty - will be filled by workflow)

Pro Tip: Use LinkedIn Sales Navigator export or a prospecting tool to populate your sheet with qualified leads.

Step 2: Configure ConnectSafely.ai API Credentials

Obtain API Key

  1. Log into ConnectSafely.ai Dashboard
  2. Navigate to Settings → API Keys
  3. Generate a new API key

Add Bearer Auth Credential in n8n

  1. Go to Credentials in n8n
  2. Click Add Credential → Header Auth or Bearer Auth
  3. Paste your ConnectSafely.ai API key
  4. Save the credential

This credential is used by both the “Fetch LinkedIn Profile” and “Send Connection Request” HTTP nodes.

Step 3: Configure Google Sheets Integration

3.1 Connect Google Sheets Account

  1. Go to Credentials → Add Credential → Google Sheets OAuth2
  2. Follow the OAuth flow to connect your Google account
  3. Grant access to Google Sheets

3.2 Configure “Get Pending Prospect” Node

  1. Open the Get Pending Prospect node
  2. Select your Google Sheets credential
  3. Enter your Document ID (from the sheet URL)
  4. Select the Sheet Name
  5. Add a filter:
    • Lookup Column: Status
    • Lookup Value: PENDING
  6. Enable Return First Match Only under Options

3.3 Configure “Mark as In Progress” Node

  1. Open the Mark as In Progress node
  2. Select the same document and sheet
  3. Configure column mapping:
    • Matching Column: row_number
    • Status: IN PROGRESS

3.4 Configure “Mark as Complete” Node

  1. Open the Mark as Complete node
  2. Select the same document and sheet
  3. Configure column mapping:
    • Matching Column: row_number
    • Status: DONE
    • Message: {{ $('Generate Personalized Message').item.json.message }}

Step 4: Configure Google Gemini AI

Get Gemini API Key

  1. Go to Google AI Studio
  2. Create or select a project
  3. Generate an API key

Add Gemini Credential in n8n

  1. Go to Credentials → Add Credential → Google Gemini (PaLM) API
  2. Paste your API key
  3. Save the credential

Connect to Google Gemini Node

  1. Open the Google Gemini node
  2. Select your Gemini credential

Step 5: Customize the AI Prompt

The Generate Personalized Message node contains the system prompt that controls how messages are written. Customize it for your personal brand:

  1. Open the Generate Personalized Message node
  2. Find the System Message in Options
  3. Replace the placeholder text:
MY CONTEXT:
[CUSTOMIZE THIS: Add your name, role, and what you're looking for in connections]

With your actual information, for example:

MY CONTEXT:
I'm Sarah, founder of a B2B SaaS startup. I'm interested in connecting with other founders, VCs, and sales leaders to exchange ideas and explore potential partnerships.
  1. Update the sign-off instruction from "- [YOUR NAME]" to your actual name

Step 6: Test the Workflow

  1. Add a test prospect to your Google Sheet with Status: PENDING
  2. Click the Manual Trigger (for testing) node
  3. Click Test Workflow
  4. Verify:
    • Profile data is fetched correctly
    • AI generates an appropriate message
    • Connection request is sent
    • Sheet updates to DONE with the message stored

Customization

Message Personalization

Edit the system prompt in the Generate Personalized Message node to adjust:

Timing Adjustments

Rate Limiting Best Practices


Use Cases


Troubleshooting

Common Issues & Solutions

Issue: AI generating messages over 300 characters

Issue: “Profile not found” errors from ConnectSafely.ai

Issue: Generic-sounding AI messages

Issue: Duplicate connection requests sent

Issue: Google Sheets not updating

Issue: Bearer Auth errors


Documentation & Resources

Official Documentation

Support Channels


Connect With Us

Stay updated with the latest automation tips, LinkedIn strategies, and platform updates:


Need Custom Workflows?

Looking to build sophisticated LinkedIn automation workflows tailored to your business needs?

Contact our team for custom automation development, strategy consulting, and enterprise solutions.

We specialize in:

đź”— Nodes Used

Google Sheets, HTTP Request, Schedule Trigger, AI Agent, Structured Output Parser, Google Gemini Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup