{
  "id": "BeWJ6JyvZr2YGmzY",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automate LinkedIn lead discovery, enrichment, and email follow-ups using Apify and Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "40317bb6-70a2-4e18-8163-e5b04b50ec30",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3088,
        -800
      ],
      "parameters": {
        "width": 480,
        "height": 896,
        "content": "## Automate LinkedIn lead discovery, enrichment, and email follow-ups using Apify and Google Sheets\n\n### How it works\n\n1. Loads LinkedIn profiles that need enrichment and processes them in batches.\n2. Scrapes additional data for each LinkedIn profile using Apify.\n3. Saves the enriched data back to Google Sheets and updates their status.\n4. Starts a manual trigger for a series of email follow-ups based on data from Google Sheets.\n5. Sends follow-up emails at scheduled intervals and saves responses.\n6. Checks for responses to emails and proceeds according to the specified conditions.\n\n### Setup steps\n\n- [ ] Ensure Apify API key is configured for LinkedIn scraping.\n- [ ] Setup Google Sheets API credentials for accessing and modifying Sheets.\n- [ ] Configure Gmail API for sending follow-up emails.\n\n### Customization\n\nAdjust the scraping frequency and email content as per business needs.\n\nGSheets Link : https://docs.google.com/spreadsheets/d/1JlFjEo7yhuHprDwa41kxogXsLTe02K3uUjFgjtumrzQ/edit?usp=sharing\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9e89d2d7-1702-400b-a214-60999f688aeb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3920,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 288,
        "content": "## Load profiles for enrichment\n\nInitial loading of unenriched LinkedIn profiles to be processed in batches."
      },
      "typeVersion": 1
    },
    {
      "id": "0fda5fda-d94f-4308-8d80-586ece599f74",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4640,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 304,
        "content": "## LinkedIn data scraping\n\nScraping LinkedIn profile data using Apify for each profile in the batch."
      },
      "typeVersion": 1
    },
    {
      "id": "79855115-039b-4504-b9d2-ef97b1b13f8c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5328,
        -288
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 304,
        "content": "## Save enriched data\n\nSave the enriched data back into Google Sheets and mark them as enriched."
      },
      "typeVersion": 1
    },
    {
      "id": "ed7a46bb-4d28-4f4f-a676-327ebbcccc72",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4128,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 320,
        "content": "## Prepare for follow-up messaging\n\nLoad previously enriched profiles, check conditions, and prepare for message generation."
      },
      "typeVersion": 1
    },
    {
      "id": "22bb02b2-15a5-4bfa-89ee-0007656324e1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4768,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 752,
        "height": 272,
        "content": "## Generate follow-up message\n\nGenerate follow-up messages using Google Gemini and update leads as enriched."
      },
      "typeVersion": 1
    },
    {
      "id": "e02107bf-aafe-43db-a3cc-fb86aeb6fcff",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3968,
        -800
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 320,
        "content": "## Fetch initial lead data\n\nFetch lead records from Google Sheets to determine processing needs."
      },
      "typeVersion": 1
    },
    {
      "id": "d34af1bc-19cf-4699-9079-294d08d120e1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4656,
        -768
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 272,
        "content": "## Apify scraping process\n\nHandles the LinkedIn search and scraping logic through Apify."
      },
      "typeVersion": 1
    },
    {
      "id": "4cc33f33-7510-4e59-a172-f4153625ddf9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3648,
        768
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 272,
        "content": "## Start email outreach\n\nInitiates the email sending sequence for outreach processes."
      },
      "typeVersion": 1
    },
    {
      "id": "24005f95-bfaa-45ad-ad80-9ec3db98918b",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4288,
        752
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 288,
        "content": "## Email sending and response check\n\nGmail nodes send emails and check responses for different stages of follow-ups."
      },
      "typeVersion": 1
    },
    {
      "id": "0f7414ab-d011-4c8a-962b-01efb59f4d37",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5040,
        704
      ],
      "parameters": {
        "color": 7,
        "height": 560,
        "content": "## Response handling for follow-up 1\n\nProcesses the response for the first follow-up email in the series."
      },
      "typeVersion": 1
    },
    {
      "id": "5fb9f25f-0bab-49b9-bf5b-a169c85bfdd4",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5312,
        784
      ],
      "parameters": {
        "color": 7,
        "width": 656,
        "height": 480,
        "content": "## Second follow-up email process\n\nHandles sending and checking responses for the second email follow-up."
      },
      "typeVersion": 1
    },
    {
      "id": "bc987e88-4b56-458f-929a-8ed0a49901a0",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6032,
        784
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 496,
        "content": "## Final follow-up email process\n\nCompletes the follow-up sequence with the third and final email and response handling."
      },
      "typeVersion": 1
    },
    {
      "id": "fbe97013-f1b6-45a2-8d56-380acc25a4ea",
      "name": "Post Apify Search Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4704,
        -656
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/scraperlink~google-search-results-serp-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN_HERE",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"keyword\": \"Product Manager New York site:linkedin.com/in\",\n  \"limit\": \"20\",\n    \"page\": 1,\n    \"start\": 1\n} ",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "f476dee1-1629-41bf-ae79-b3996b2bdb39",
      "name": "Parse Apify Response",
      "type": "n8n-nodes-base.code",
      "position": [
        4992,
        -656
      ],
      "parameters": {
        "jsCode": "const output = [];\n\nfor (const page of items) {\n  const searchTerm = page.json.search_term || null;\n\n  const results = page.json.results || [];\n\n  for (const r of results) {\n    if (!r.url || !r.url.includes('linkedin.com/in')) continue;\n\n    output.push({\n      json: {\n        search_term: searchTerm,\n        linkedin_url: r.url,\n        title: r.title || null,\n        description: r.description || null,\n        source: \"Apify Google Search\",\n        collected_at: new Date().toISOString()\n      }\n    });\n  }\n}\n\nreturn output;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "51556930-5eb5-4fba-9300-a1926c30236b",
      "name": "Append Profiles to Raw Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5200,
        -656
      ],
      "parameters": {
        "columns": {
          "value": {
            "Title": "=YOUR_SHEET_ID",
            "Enriched": "No",
            "Description": "=YOUR_SHEET_ID",
            "Search Term": "=YOUR_SHEET_ID",
            "Collected At": "=[invalid syntax]",
            "Linkedin URL": "=YOUR_SHEET_ID"
          },
          "schema": [
            {
              "id": "Collected At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Collected At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Search Term",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Search Term",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Linkedin URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Enriched",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Enriched",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Raw Profiles"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "5d2a06ce-5aa5-4d6f-98ef-013f90b08682",
      "name": "Batch LinkedIn Searches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4416,
        -672
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "645ec30a-b5f0-4cb1-9144-2ccd8aa5ef9d",
      "name": "Read Unenriched Profiles",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3968,
        -176
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Raw Profiles"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "c7fcecb4-91c1-4e7c-92d7-1f944b1b726a",
      "name": "Batch Process Profiles",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4464,
        -192
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "ee7d6ecb-55c7-45e9-83e7-2178da532451",
      "name": "Post LinkedIn Profile Enrichment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4688,
        -176
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/anchor~linkedin-profile-enrichment/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"startUrls\": [\n    {\n      \"url\": \"[invalid syntax]\"\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "b3d7daf1-8574-4487-b723-bb74ae635055",
      "name": "Append Enriched Data to Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5376,
        -160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "=[invalid syntax]",
            "Email": "=YOUR_SHEET_ID",
            "Company": "=[Referenced node doesn't exist]",
            "Headline": "=[Referenced node doesn't exist]",
            "Email Sent": "No",
            "Designation": "=[Referenced node doesn't exist]",
            "LinkedIn_URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headline",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "d9ed45d2-231a-437c-8ef0-9ada7a9bff7a",
      "name": "Read Input Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4016,
        -656
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=0",
          "cachedResultName": "Input_List"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "90352893-14e2-4567-ab00-6d11f616c88f",
      "name": "Check Input Sheet is Empty",
      "type": "n8n-nodes-base.if",
      "position": [
        4176,
        -656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "01ec9a0c-45e1-4998-953b-0c41097c0276",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0311f193-99f7-4a79-8c76-960b28924797",
      "name": "Update Input Sheet Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5408,
        -656
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Done",
            "row_number": "=[Referenced node doesn't exist]",
            "Last_Run_At": "=YOUR_SHEET_ID",
            "Total_Profiles_Found": "=[invalid syntax]"
          },
          "schema": [
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last_Run_At",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Last_Run_At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total_Profiles_Found",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Total_Profiles_Found",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=0",
          "cachedResultName": "Input_List"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6988e768-51b7-4e30-a71c-0344e8f85482",
      "name": "Check Profile Unenriched",
      "type": "n8n-nodes-base.if",
      "position": [
        4176,
        -176
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f1eda896-27a9-421d-877b-64c7dd8695c7",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": "No"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "executeOnce": false,
      "typeVersion": 2.3
    },
    {
      "id": "2a14a367-cad3-459d-abd1-b400efabd079",
      "name": "Post LinkedIn to Email API",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        4896,
        -176
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/anchor~linkedin-to-email/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"startUrls\": [\n    {\n      \"url\": \"[invalid syntax]\",\n      \"id\": \"1\"\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "9e28b481-6417-4329-9e70-78898e649491",
      "name": "Check Enrichment Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        5104,
        -176
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1020d7f6-1ab9-4a8c-a6bd-05be79c0a083",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "33e9d234-43ac-4c44-a33a-54a62f408976",
      "name": "Update Profile Enriched Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5376,
        304
      ],
      "parameters": {
        "columns": {
          "value": {
            "Enriched": "Yes",
            "Linkedin URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Collected At",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Collected At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Search Term",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Search Term",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Linkedin URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Enriched",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Enriched",
              "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": [
            "Linkedin URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Profile from APify"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "LeadsCompany Name"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "bc96183b-6721-4eb7-a343-67b258e3388c",
      "name": "Append Follow-Up to Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5152,
        304
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email_1": "=YOUR_SHEET_ID",
            "Email_2": "=YOUR_SHEET_ID",
            "Email_3": "=YOUR_SHEET_ID",
            "LinkedIn_URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headline",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_3",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn_URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "2881c525-acba-4d4c-9fc8-0180d08dc5f7",
      "name": "AI Follow-Up Message Generator",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        4816,
        304
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.0-flash-lite",
          "cachedResultName": "models/gemini-2.0-flash-lite"
        },
        "options": {
          "systemMessage": "=You are a professional B2B cold email assistant.\n\nWrite short, polite, human emails using only the provided prospect details.\n\nRules:\n- Professional and simple tone\n- No emojis\n- No salesy language\n- No buzzwords\n- No links\n- Do not mention AI or automation\n- Do not invent any facts\n- Use only the given data\n- Keep emails concise and natural\n- Output plain text only\n"
        },
        "messages": {
          "values": [
            {
              "content": "=Prospect details:\nName: \nRole: \nCompany: \nHeadline: \n\nWrite the first cold email.\nInclude:\n- A short subject line\n- Email body\n- Signature with name \"Dinakar\""
            },
            {
              "content": "=Prospect details:\nName: \nRole: \nCompany: \nHeadline: \n\nThe prospect did not reply to the first email.\nWrite a short, polite follow-up email.\nInclude subject, body, and signature."
            },
            {
              "content": "=Prospect details:\nName: \nRole: \nCompany: \nHeadline: \n\nThe prospect did not reply to previous emails.\nWrite a final short follow-up email.\nBe polite and respectful.\nInclude subject, body, and signature."
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1
    },
    {
      "id": "677b9309-9925-4ae7-9a7c-17166ca5acd9",
      "name": "Update Raw Profile Enrichment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5584,
        -160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Enriched": "Yes",
            "row_number": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Collected At",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Collected At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Search Term",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Search Term",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Linkedin URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Enriched",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Enriched",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Raw Profiles"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "136ceecb-b543-4952-815f-922f95ab6588",
      "name": "Check Profile Enriched",
      "type": "n8n-nodes-base.if",
      "position": [
        4352,
        304
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f1eda896-27a9-421d-877b-64c7dd8695c7",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": "No"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "executeOnce": false,
      "typeVersion": 2.3
    },
    {
      "id": "e6640198-ee5c-4cf1-af1c-2f7c7e3b6e8c",
      "name": "Batch Process Enriched Profiles",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4592,
        288
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "55df48b8-40f0-4373-9871-012bcdecfbc4",
      "name": "Read Enriched Profiles",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4176,
        304
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f8aa947d-d08e-407d-90d0-eea314dfa97a",
      "name": "Manual Outreach Starting Point",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        3696,
        880
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "78453cde-1ada-4520-b323-a49356efd635",
      "name": "Read Leads for Outreach",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3904,
        880
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "eb47eeb9-6079-4546-b967-8bfca2847c44",
      "name": "Check Email Sent Status",
      "type": "n8n-nodes-base.if",
      "position": [
        4096,
        880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f1eda896-27a9-421d-877b-64c7dd8695c7",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": "No"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "executeOnce": false,
      "typeVersion": 2.3
    },
    {
      "id": "17d15afa-2b31-486e-a1db-05204879cadc",
      "name": "Batch Process Email Leads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4336,
        864
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "e86b84ee-cb51-45cb-9e70-ac1e7375cf21",
      "name": "Send Initial Email via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4624,
        880
      ],
      "parameters": {
        "message": "=",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes",
              "resumeAmount": 0.1
            }
          },
          "appendAttribution": false,
          "messageButtonLabel": "Respond"
        },
        "subject": "First Mail",
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "radio",
              "fieldLabel": "Interestred?",
              "defaultValue": "Yes",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Notice Period",
              "placeholder": "Enter your Notice period"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f9f41173-6f3b-4cae-a712-6080dd7230ac",
      "name": "Check Response to Email 1",
      "type": "n8n-nodes-base.if",
      "position": [
        4864,
        880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b0ffe7c8-df35-4b9a-abe8-3fc06802972f",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "678ccd78-a2f7-489e-a4cf-8ccddf906233",
      "name": "Append Email 1 Response",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5104,
        1104
      ],
      "parameters": {
        "columns": {
          "value": {
            "Response": "=Interested :  YOUR_SHEET_ID\n\nNotice period : YOUR_SHEET_ID",
            "Email Sent": "Yes",
            "LinkedIn_URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headline",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn_URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f4d85d8d-2253-48d4-91ec-43c05fe93dac",
      "name": "Send Follow-Up Email 2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        5360,
        896
      ],
      "parameters": {
        "message": "=",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes",
              "resumeAmount": 0.2
            }
          },
          "appendAttribution": false,
          "messageButtonLabel": "Respond"
        },
        "subject": "Second Mail",
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "radio",
              "fieldLabel": "Interestred?",
              "defaultValue": "Yes",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Notice Period",
              "placeholder": "Enter your Notice period"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "60cc8b28-f06c-4b82-922a-94b907edf306",
      "name": "Check Response to Email 2",
      "type": "n8n-nodes-base.if",
      "position": [
        5664,
        896
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "224f702e-000e-4332-98c1-7ee6f198a2c9",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "4b63b9cf-651b-4c2a-8da0-6d9c78c842f8",
      "name": "Append Email 2 Response",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5824,
        1104
      ],
      "parameters": {
        "columns": {
          "value": {
            "Response": "=Interested :  YOUR_SHEET_ID\n\nNotice period : YOUR_SHEET_ID",
            "Email 2 Sent": "Yes",
            "LinkedIn_URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headline",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 2 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 2 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 3 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 3 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn_URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "76557773-139f-4b3e-ae50-eb2a3b172839",
      "name": "Send Final Follow-Up Email 3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        6080,
        912
      ],
      "parameters": {
        "message": "=",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes",
              "resumeAmount": 0.3
            }
          },
          "appendAttribution": false,
          "messageButtonLabel": "Respond"
        },
        "subject": "Third Mail",
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "radio",
              "fieldLabel": "Interestred?",
              "defaultValue": "Yes",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Notice Period",
              "placeholder": "Enter your Notice period"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3f0711a5-c6b3-4d23-bf1a-4dd83a66c9ea",
      "name": "Check Response to Email 3",
      "type": "n8n-nodes-base.if",
      "position": [
        6288,
        912
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "224f702e-000e-4332-98c1-7ee6f198a2c9",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "=YOUR_SHEET_ID",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "fab5d72b-3a51-4280-8bd6-05aa44e0af0b",
      "name": "Append Email 3 Response",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        6480,
        1104
      ],
      "parameters": {
        "columns": {
          "value": {
            "Response": "=Interested :  YOUR_SHEET_ID\n\nNotice period : YOUR_SHEET_ID",
            "Email 3 Sent": "Yes",
            "LinkedIn_URL": "=[Referenced node doesn't exist]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headline",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 2 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 2 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 3 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 3 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Response",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Response",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn_URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false,
          "ignoreTypeMismatchErrors": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=YOUR_SHEET_ID",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Linkedin_Leads_Generation and Follow Up"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "12e97691-3e39-4bf9-9eee-b61f03f6edd7",
      "name": "Wait 1 Day for Follow-Up 2",
      "type": "n8n-nodes-base.wait",
      "position": [
        5088,
        896
      ],
      "parameters": {
        "unit": "days",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "4bc81aff-5aaf-4c48-b213-319703a02ba9",
      "name": "Wait 1 Day for Final Follow-Up",
      "type": "n8n-nodes-base.wait",
      "position": [
        5872,
        912
      ],
      "parameters": {
        "unit": "days",
        "amount": 1
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "21377672-5746-4b26-91fc-c36fa5d7586f",
  "connections": {
    "Read Input Leads": {
      "main": [
        [
          {
            "node": "Check Input Sheet is Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Apify Response": {
      "main": [
        [
          {
            "node": "Append Profiles to Raw Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Process Profiles": {
      "main": [
        [],
        [
          {
            "node": "Post LinkedIn Profile Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Profile Enriched": {
      "main": [
        [
          {
            "node": "Batch Process Enriched Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Enriched Profiles": {
      "main": [
        [
          {
            "node": "Check Profile Enriched",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Follow-Up Email 2": {
      "main": [
        [
          {
            "node": "Check Response to Email 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Email 1 Response": {
      "main": [
        [
          {
            "node": "Batch Process Email Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Email 2 Response": {
      "main": [
        [
          {
            "node": "Batch Process Email Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Email 3 Response": {
      "main": [
        [
          {
            "node": "Batch Process Email Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch LinkedIn Searches": {
      "main": [
        [],
        [
          {
            "node": "Post Apify Search Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Email Sent Status": {
      "main": [
        [
          {
            "node": "Batch Process Email Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Enrichment Exists": {
      "main": [
        [],
        [
          {
            "node": "Append Enriched Data to Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Leads for Outreach": {
      "main": [
        [
          {
            "node": "Check Email Sent Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Profile Unenriched": {
      "main": [
        [
          {
            "node": "Batch Process Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Unenriched Profiles": {
      "main": [
        [
          {
            "node": "Check Profile Unenriched",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Follow-Up to Leads": {
      "main": [
        [
          {
            "node": "Update Profile Enriched Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Process Email Leads": {
      "main": [
        [],
        [
          {
            "node": "Send Initial Email via Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Response to Email 1": {
      "main": [
        [
          {
            "node": "Append Email 1 Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 1 Day for Follow-Up 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Response to Email 2": {
      "main": [
        [
          {
            "node": "Append Email 2 Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 1 Day for Final Follow-Up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Response to Email 3": {
      "main": [
        [
          {
            "node": "Append Email 3 Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Apify Search Request": {
      "main": [
        [
          {
            "node": "Parse Apify Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Input Sheet Status": {
      "main": [
        [
          {
            "node": "Batch LinkedIn Searches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Input Sheet is Empty": {
      "main": [
        [
          {
            "node": "Batch LinkedIn Searches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post LinkedIn to Email API": {
      "main": [
        [
          {
            "node": "Check Enrichment Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 Day for Follow-Up 2": {
      "main": [
        [
          {
            "node": "Send Follow-Up Email 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Profiles to Raw Sheet": {
      "main": [
        [
          {
            "node": "Update Input Sheet Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Final Follow-Up Email 3": {
      "main": [
        [
          {
            "node": "Check Response to Email 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Initial Email via Gmail": {
      "main": [
        [
          {
            "node": "Check Response to Email 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Enriched Data to Leads": {
      "main": [
        [
          {
            "node": "Update Raw Profile Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Raw Profile Enrichment": {
      "main": [
        [
          {
            "node": "Batch Process Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Follow-Up Message Generator": {
      "main": [
        [
          {
            "node": "Append Follow-Up to Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Outreach Starting Point": {
      "main": [
        [
          {
            "node": "Read Leads for Outreach",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Profile Enriched Status": {
      "main": [
        [
          {
            "node": "Batch Process Enriched Profiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 Day for Final Follow-Up": {
      "main": [
        [
          {
            "node": "Send Final Follow-Up Email 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Process Enriched Profiles": {
      "main": [
        [],
        [
          {
            "node": "AI Follow-Up Message Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post LinkedIn Profile Enrichment": {
      "main": [
        [
          {
            "node": "Post LinkedIn to Email API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}