AutomationFlowsAI & RAG › Score and Send Linkedin Dms with Gpt-4.1-mini, Google Sheets and Phantombuster

Score and Send Linkedin Dms with Gpt-4.1-mini, Google Sheets and Phantombuster

ByAvkash Kakdiya @itechnotion on n8n.io

This workflow creates an AI-powered LinkedIn DM outreach sequence that automatically scores, messages, and follows up with prospects using Google Sheets as a lightweight CRM. When the workflow runs on a schedule, it reads prospect data from Google Sheets and filters only leads…

Cron / scheduled trigger★★★★☆ complexityAI-powered21 nodesGoogle SheetsOpenAIHTTP Request
AI & RAG Trigger: Cron / scheduled Nodes: 21 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #15467 — we link there as the canonical source.

This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI LinkedIn Outreach & Follow-up Automation",
  "nodes": [
    {
      "id": "0957bba8-9ae1-4f16-8ef7-9a7315764aa0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6320,
        2064
      ],
      "parameters": {
        "width": 540,
        "height": 1200,
        "content": "### AI-powered LinkedIn DM outreach sequence with Google Sheets and OpenAI\n\nAutomate LinkedIn prospecting by reading leads from Google Sheets, scoring them with AI, generating hyper-personalized DMs, sending via Phantombuster, tracking replies, and auto-closing cold leads.\n\n**What it does**\n\u2022 Pulls prospects from Google Sheets on a schedule\n\u2022 Scores each lead using GPT-4.1-mini\n\u2022 Generates a personalized first DM based on role and company\n\u2022 Sends DM via Phantombuster LinkedIn agent\n\u2022 If no reply after 3 days, sends a follow-up DM automatically\n\u2022 Marks lead as Closed if still no response after follow-up\n\u2022 Logs all activity back to Google Sheets in real time\n\n**Who it's for**\n\u2022 B2B founders doing outbound on LinkedIn\n\u2022 Sales teams scaling LinkedIn prospecting\n\u2022 Agencies managing LinkedIn outreach for clients\n\n**Setup**\n\u2022 Connect Google Sheets OAuth2\n\u2022 Connect OpenAI API\n\u2022 Add Phantombuster API key and LinkedIn DM Agent ID\n\n**Tip**\nUse Phantombuster's LinkedIn Message Sender phantom as the agent. Set daily send limits inside Phantombuster to stay within LinkedIn safe zone (recommended: max 20 DMs per day)."
      },
      "typeVersion": 1
    },
    {
      "id": "11192cf7-2ea0-4486-bbef-2b1e421acb5a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6880,
        2064
      ],
      "parameters": {
        "color": 7,
        "width": 716,
        "height": 1204,
        "content": "## Step 1 \u2013 Fetch and filter prospects\n\nRuns every hour. Reads all rows from Google Sheets and filters only prospects that are either brand new (no Status) or due for action today (NextActionDate is today or in the past). Skips anyone already Closed or Replied.\n\n**Google Sheet columns required:**\n- **#** \u2014 Unique row ID\n- **First Name** \u2014 Prospect first name\n- **Title** \u2014 Job title\n- **Company Name** \u2014 Company\n- **LinkedIn URL** \u2014 Full LinkedIn profile URL\n- **Country** \u2014 Prospect country\n- **Status** \u2014 Contacted / Follow-up Sent / Replied / Closed\n- **Step** \u2014 0 = new, 1 = first DM sent, 2 = follow-up sent, 3 = closed\n- **LastContacted** \u2014 ISO timestamp of last outreach\n- **NextActionDate** \u2014 ISO timestamp for next scheduled action\n- **AI_LeadScore** \u2014 Hot / Warm / Cold\n- **AI_Priority** \u2014 High / Medium / Low\n- **AI_MessageAngle** \u2014 pain_point / value_add / curiosity / social_proof\n- **AI_FirstDM** \u2014 Generated first DM text\n- **AI_FollowupDM** \u2014 Generated follow-up DM text\n- **Response** \u2014 Reply received or closure reason"
      },
      "typeVersion": 1
    },
    {
      "id": "3a8cef18-096f-4db0-97ee-57a136cd19f7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7616,
        2064
      ],
      "parameters": {
        "color": 7,
        "width": 588,
        "height": 1212,
        "content": "## Step 2 \u2013 AI lead scoring\n\nSends each prospect to GPT-4.1-mini for scoring. Returns a lead score (Hot / Warm / Cold), priority level, and a recommended message angle to personalise the DM (pain_point, value_add, curiosity, or social_proof)."
      },
      "typeVersion": 1
    },
    {
      "id": "aaf4d970-6f94-4df8-9036-8a781a86b20a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8224,
        2064
      ],
      "parameters": {
        "color": 7,
        "width": 412,
        "height": 1212,
        "content": "## Step 3 \u2013 Route by step\n\nChecks the Step value for each prospect:\n- Step 0 or empty \u2192 First DM flow\n- Step 1 \u2192 Follow-up DM flow\n- Step 2 or above \u2192 Auto-close the lead\n\nNextActionDate written to Sheets controls the timing between steps. The hourly trigger picks up leads automatically when they become due."
      },
      "typeVersion": 1
    },
    {
      "id": "9c65ab5d-7f87-4d52-b0ff-8d97d8b6e686",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8656,
        2064
      ],
      "parameters": {
        "color": 7,
        "width": 1052,
        "height": 1220,
        "content": "## Step 4 \u2013 DM generation, send and CRM update\n\nHandles both the first DM and follow-up DM in a single step:\n\n**First DM (Step 0 leads)**\nGPT-4.1-mini writes a short, human cold DM using the prospect's role, company, and AI message angle. Phantombuster sends it via LinkedIn. Sheet updated: Status \u2192 Contacted, Step \u2192 1, NextActionDate \u2192 +3 days.\n\n**Follow-up DM (Step 1 leads)**\nGPT writes a soft follow-up referencing the first message. Phantombuster sends it. Sheet updated: Status \u2192 Follow-up Sent, Step \u2192 2, NextActionDate \u2192 +2 days.\n\n**Auto-close (Step 2+ leads)**\nNo further messages sent. Sheet updated: Status \u2192 Closed, Step \u2192 3, Response \u2192 auto-closed note."
      },
      "typeVersion": 1
    },
    {
      "id": "0271d631-5c34-4efa-a4d7-a3548cf13282",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        6992,
        3040
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "ef51a6ee-191a-49bf-9d14-daf3be4ebed0",
      "name": "Get Prospects from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        7216,
        3040
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
          "cachedResultName": "LinkedIn Prospects"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6492b17c-bd3a-4e2c-ae0c-2461ca47f9d7",
      "name": "Filter Active Prospects",
      "type": "n8n-nodes-base.code",
      "position": [
        7440,
        3040
      ],
      "parameters": {
        "jsCode": "const now = new Date();\n\nreturn items.filter(item => {\n  const status = (item.json.Status || '').trim();\n  const nextAction = item.json.NextActionDate || '';\n\n  if (status === 'Closed' || status === 'Replied') return false;\n  if (!status) return true;\n  if (nextAction && new Date(nextAction) <= now) return true;\n\n  return false;\n}).map(item => ({\n  json: {\n    ...item.json,\n    Person: item.json['First Name'] || '',\n    Company: item.json['Company Name'] || '',\n    Role: item.json['Title'] || '',\n    LinkedInURL: item.json['LinkedIn URL'] || '',\n    Country: item.json['Country'] || '',\n    CurrentStep: parseInt(item.json['Step']) || 0\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "22b9ca65-8892-47df-bce0-8627a9f75abf",
      "name": "Batch Prospects",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        7664,
        3040
      ],
      "parameters": {
        "options": {},
        "batchSize": 3
      },
      "typeVersion": 3
    },
    {
      "id": "8e369074-496b-48cd-a735-52fc734230c5",
      "name": "Score Lead with AI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        7888,
        2608
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "You are a B2B LinkedIn sales expert. Evaluate prospects for outbound DM outreach. Be concise and return ONLY valid JSON with no markdown, no explanation, no code blocks."
            },
            {
              "content": "=Evaluate this LinkedIn prospect for outbound DM outreach:\n\nName: {{$json.Person}}\nRole: {{$json.Role}}\nCompany: {{$json.Company}}\nCountry: {{$json.Country}}\n\nReturn ONLY this JSON:\n{\n  \"lead_score\": \"Hot | Warm | Cold\",\n  \"priority\": \"High | Medium | Low\",\n  \"message_angle\": \"pain_point | value_add | curiosity | social_proof\",\n  \"score_reason\": \"one sentence max\"\n}"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "186aee14-f4d9-4bbe-bab8-ea7bfa207eb7",
      "name": "Parse Lead Score",
      "type": "n8n-nodes-base.code",
      "position": [
        8240,
        2608
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const raw =\n    item.json.output?.[0]?.content?.find(c => c.type === 'output_text')?.text ||\n    item.json.output?.[0]?.content?.[0]?.text ||\n    '{}';\n\n  let parsed = {};\n  try { parsed = JSON.parse(raw); } catch(e) { parsed = {}; }\n\n  return {\n    json: {\n      ...item.json,\n      AI_LeadScore: parsed.lead_score || 'Warm',\n      AI_Priority: parsed.priority || 'Medium',\n      AI_MessageAngle: parsed.message_angle || 'value_add',\n      AI_ScoreReason: parsed.score_reason || ''\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "192f0bd3-a967-4969-9426-d12563543b29",
      "name": "Route by Step",
      "type": "n8n-nodes-base.switch",
      "position": [
        8464,
        2592
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "route-new",
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.CurrentStep}}",
                    "rightValue": 0
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "route-followup",
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.CurrentStep}}",
                    "rightValue": 1
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "route-close",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{$json.CurrentStep}}",
                    "rightValue": 2
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "2d194958-c7fe-49cd-bd09-16d7f16b9bec",
      "name": "Generate First DM",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        8688,
        2416
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "You write short, human LinkedIn cold DMs for B2B outreach. No fluff. No AI tone. Sound like a real person. Output ONLY the message body, nothing else."
            },
            {
              "content": "=Write a cold LinkedIn DM for this prospect.\n\nName: {{$json.Person}}\nRole: {{$json.Role}}\nCompany: {{$json.Company}}\nMessage angle: {{$json.AI_MessageAngle}}\n\nRules:\n- Max 3 short lines\n- No 'I hope this finds you well'\n- No generic openers\n- End with one soft conversational question\n- Sound natural, not salesy\n\nOutput ONLY the DM text."
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b698919b-8a37-4102-a8b1-0f9ea395f801",
      "name": "Parse First DM",
      "type": "n8n-nodes-base.code",
      "position": [
        9040,
        2416
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const text =\n    item.json.output?.[0]?.content?.find(c => c.type === 'output_text')?.text ||\n    item.json.output?.[0]?.content?.[0]?.text ||\n    `Hi ${item.json.Person}, noticed your work at ${item.json.Company} \u2014 had a quick question for you.`;\n\n  return {\n    json: {\n      ...item.json,\n      AI_FirstDM: text.trim()\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "2058d09d-bcc8-4361-8796-caf476998fd5",
      "name": "Send First DM via Phantombuster",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9264,
        2416
      ],
      "parameters": {
        "url": "https://api.phantombuster.com/api/v2/agents/launch",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"id\": \"YOUR_PHANTOMBUSTER_AGENT_ID\",\n  \"argument\": {\n    \"linkedInUrl\": \"{{$json.LinkedInURL}}\",\n    \"message\": \"{{$json.AI_FirstDM}}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Phantombuster-Key",
              "value": "YOUR_PHANTOMBUSTER_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "034b119a-7372-4804-899c-5b05bb2367a3",
      "name": "Update Sheet \u2014 First DM Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        9488,
        2688
      ],
      "parameters": {
        "columns": {
          "value": {
            "#": "={{ $('Get Prospects from Sheet').item.json['#'] }}",
            "Step": "1",
            "Status": "Contacted",
            "AI_FirstDM": "={{$json.AI_FirstDM}}",
            "AI_Priority": "={{$json.AI_Priority}}",
            "AI_LeadScore": "={{$json.AI_LeadScore}}",
            "LastContacted": "={{new Date().toISOString()}}",
            "NextActionDate": "={{new Date(Date.now() + 3*24*60*60*1000).toISOString()}}",
            "AI_MessageAngle": "={{$json.AI_MessageAngle}}"
          },
          "schema": [
            {
              "id": "#",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "#",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "LinkedIn URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Country",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Step",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Step",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastContacted",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastContacted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "NextActionDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "NextActionDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_LeadScore",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI_LeadScore",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_Priority",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI_Priority",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_MessageAngle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI_MessageAngle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_FirstDM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI_FirstDM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_FollowupDM",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "AI_FollowupDM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "#"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
          "cachedResultName": "LinkedIn Prospects"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "f1f7b40a-b8f1-4d8c-b080-7b90137c8ec3",
      "name": "Generate Follow-up DM",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        8688,
        2608
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "You write short LinkedIn follow-up DMs. Sound natural and human. Output ONLY the message, nothing else."
            },
            {
              "content": "=Write a short LinkedIn DM follow-up.\n\nName: {{$json.Person}}\nCompany: {{$json.Company}}\nFirst message sent: {{$json.AI_FirstDM}}\n\nRules:\n- Max 2 lines\n- Reference the first message naturally\n- Not pushy at all\n- Friendly and human\n\nOutput ONLY the DM."
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6390e981-6dd8-4fe8-88bd-64073f5583cc",
      "name": "Parse Follow-up DM",
      "type": "n8n-nodes-base.code",
      "position": [
        9040,
        2608
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const text =\n    item.json.output?.[0]?.content?.find(c => c.type === 'output_text')?.text ||\n    item.json.output?.[0]?.content?.[0]?.text ||\n    `Hey ${item.json.Person}, just wanted to follow up on my last message \u2014 would love to hear your thoughts.`;\n\n  return {\n    json: {\n      ...item.json,\n      AI_FollowupDM: text.trim()\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "bb80f4a6-a39e-4c19-9a79-c585f87f7316",
      "name": "Send Follow-up DM via Phantombuster",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9264,
        2608
      ],
      "parameters": {
        "url": "https://api.phantombuster.com/api/v2/agents/launch",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"id\": \"YOUR_PHANTOMBUSTER_AGENT_ID\",\n  \"argument\": {\n    \"linkedInUrl\": \"{{$json.LinkedInURL}}\",\n    \"message\": \"{{$json.AI_FollowupDM}}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Phantombuster-Key",
              "value": "YOUR_PHANTOMBUSTER_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "895e8982-1143-43bd-9a6d-987b153ebaac",
      "name": "Update Sheet \u2014 Follow-up Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        9488,
        2880
      ],
      "parameters": {
        "columns": {
          "value": {
            "#": "={{ $('Get Prospects from Sheet').item.json['#'] }}",
            "Step": "2",
            "Status": "Follow-up Sent",
            "AI_FollowupDM": "={{$json.AI_FollowupDM}}",
            "LastContacted": "={{new Date().toISOString()}}",
            "NextActionDate": "={{new Date(Date.now() + 2*24*60*60*1000).toISOString()}}"
          },
          "schema": [
            {
              "id": "#",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "#",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Step",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Step",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastContacted",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastContacted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "NextActionDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "NextActionDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_FollowupDM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI_FollowupDM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI_FirstDM",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "AI_FirstDM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "#"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
          "cachedResultName": "LinkedIn Prospects"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "f6b9724a-3d39-480a-920f-26e79324e9cc",
      "name": "Close Lead in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        8752,
        2800
      ],
      "parameters": {
        "columns": {
          "value": {
            "#": "={{ $('Get Prospects from Sheet').item.json['#'] }}",
            "Step": "3",
            "Status": "Closed",
            "Response": "No reply received after full DM sequence. Lead auto-closed."
          },
          "schema": [
            {
              "id": "#",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "#",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Step",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Step",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "#"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
          "cachedResultName": "LinkedIn Prospects"
        }
      },
      "typeVersion": 4.7
    }
  ],
  "connections": {
    "Route by Step": {
      "main": [
        [
          {
            "node": "Generate First DM",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Follow-up DM",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Close Lead in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse First DM": {
      "main": [
        [
          {
            "node": "Send First DM via Phantombuster",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Prospects": {
      "main": [
        [],
        [
          {
            "node": "Score Lead with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Lead Score": {
      "main": [
        [
          {
            "node": "Route by Step",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Prospects from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate First DM": {
      "main": [
        [
          {
            "node": "Parse First DM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Follow-up DM": {
      "main": [
        [
          {
            "node": "Send Follow-up DM via Phantombuster",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Lead with AI": {
      "main": [
        [
          {
            "node": "Parse Lead Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Close Lead in Sheet": {
      "main": [
        [
          {
            "node": "Batch Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Follow-up DM": {
      "main": [
        [
          {
            "node": "Parse Follow-up DM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Active Prospects": {
      "main": [
        [
          {
            "node": "Batch Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Prospects from Sheet": {
      "main": [
        [
          {
            "node": "Filter Active Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet \u2014 First DM Sent": {
      "main": [
        [
          {
            "node": "Batch Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send First DM via Phantombuster": {
      "main": [
        [
          {
            "node": "Update Sheet \u2014 First DM Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet \u2014 Follow-up Sent": {
      "main": [
        [
          {
            "node": "Batch Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Follow-up DM via Phantombuster": {
      "main": [
        [
          {
            "node": "Update Sheet \u2014 Follow-up Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow creates an AI-powered LinkedIn DM outreach sequence that automatically scores, messages, and follows up with prospects using Google Sheets as a lightweight CRM. When the workflow runs on a schedule, it reads prospect data from Google Sheets and filters only leads…

Source: https://n8n.io/workflows/15467/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

AI Institutional Stock Valuation Engine with Risk Scoring & Scenario Targets

Google Sheets, XML, HTTP Request +3
AI & RAG

Overview This is a production-grade, fully automated stock analysis system built entirely in n8n. It combines institutional-level financial analysis, dual AI model consensus, and a self-improving back

Google Sheets, XML, HTTP Request +3
AI & RAG

This automation is a complete end-to-end system designed to find, qualify, and contact B2B leads — fully automated and powered by AI. Searches for target companies on LinkedIn via Ghost Genius API, us

Google Sheets, HTTP Request, OpenAI +1
AI & RAG

This comprehensive n8n automation template orchestrates a complete end-to-end workflow for generating engaging short-form Point-of-View (POV) style videos using multiple AI services and automatically

HTTP Request, OpenAI, Google Drive +4
AI & RAG

A professional AI equity analysis automation built on n8n that transforms structured financial data and real-time news into disciplined, risk-adjusted price targets and actionable BUY/HOLD/SELL signal

Google Sheets, OpenAI, XML +3