{
  "id": "29coyIqym2oyD2M9",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Enterprise AI Outreach Automation",
  "tags": [],
  "nodes": [
    {
      "id": "4db22f0d-289f-4d7d-a8d8-0cc15bbc2d2a",
      "name": "Scheduler",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        624,
        80
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a17e5401-88f3-49e8-b8e9-8210e6b917b5",
      "name": "Read Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1776,
        80
      ],
      "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "f76c8d06-49fe-43bb-a2b1-1b07328d5d01",
      "name": "Lead Filter Logic",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        80
      ],
      "parameters": {
        "jsCode": "const blankRows = items.filter(item => {\n  const status = String(item.json.Status || '').trim();\n  return status === '';\n});\n\nreturn blankRows.slice(0, 1);"
      },
      "typeVersion": 2
    },
    {
      "id": "40394211-78f8-41e3-8255-5073254a9591",
      "name": "Website Scraper",
      "type": "n8n-nodes-puppeteer.puppeteer",
      "onError": "continueRegularOutput",
      "position": [
        2224,
        80
      ],
      "parameters": {
        "url": "={{ $json.Website }}",
        "options": {
          "browserWSEndpoint": "ws://browserless:3000?token=YOUR_BROWSERLESS_TOKEN"
        }
      },
      "retryOnFail": false,
      "typeVersion": 1
    },
    {
      "id": "ac24cab1-8b24-4749-ac2e-ee23581b5641",
      "name": "Clean Website Data",
      "type": "n8n-nodes-base.code",
      "position": [
        2496,
        80
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nfunction decodeHtmlEntities(text) {\n  return text\n    .replace(/&nbsp;/gi, ' ')\n    .replace(/&amp;/gi, '&')\n    .replace(/&lt;/gi, '<')\n    .replace(/&gt;/gi, '>')\n    .replace(/&quot;/gi, '\"')\n    .replace(/&#39;/gi, \"'\")\n    .replace(/&#x27;/gi, \"'\")\n    .replace(/&#x2F;/gi, \"/\");\n}\n\nfunction cleanHtmlToText(html) {\n  if (!html || typeof html !== 'string') return '';\n\n  let text = html\n    .replace(/<script[\\s\\S]*?<\\/script>/gi, ' ')\n    .replace(/<style[\\s\\S]*?<\\/style>/gi, ' ')\n    .replace(/<noscript[\\s\\S]*?<\\/noscript>/gi, ' ')\n    .replace(/<svg[\\s\\S]*?<\\/svg>/gi, ' ')\n    .replace(/<iframe[\\s\\S]*?<\\/iframe>/gi, ' ')\n    .replace(/<br\\s*\\/?>/gi, '\\n')\n    .replace(/<\\/p>/gi, '\\n')\n    .replace(/<\\/div>/gi, '\\n')\n    .replace(/<\\/section>/gi, '\\n')\n    .replace(/<\\/article>/gi, '\\n')\n    .replace(/<\\/li>/gi, '\\n')\n    .replace(/<\\/h[1-6]>/gi, '\\n')\n    .replace(/<[^>]+>/g, ' ');\n\n  text = decodeHtmlEntities(text);\n\n  text = text\n    .replace(/\\b(function|var|const|let|return|async|await|window|document|style|script|sourceURL)\\b/gi, ' ')\n    .replace(/\\b(class|id|href|src|width|height|loading|decoding|aria-label|data-[\\w-]+)\\b/gi, ' ')\n    .replace(/https?:\\/\\/\\S+/gi, ' ')\n    .replace(/[{}[\\];=_<>]+/g, ' ')\n    .replace(/\\b[a-zA-Z0-9_-]+\\.(js|css|png|jpg|jpeg|webp|svg|mp4)\\b/gi, ' ')\n    .replace(/\\b(elementor|wp-|flaticon|swiper|wow|fa-|wpcf7|marqueeAnimation|translate3d|rotateX|opacity)\\b/gi, ' ')\n    .replace(/\\s+\\n/g, '\\n')\n    .replace(/\\n\\s+/g, '\\n')\n    .replace(/[ \\t]{2,}/g, ' ')\n    .replace(/\\n{2,}/g, '\\n\\n')\n    .trim();\n\n  const lines = text\n    .split('\\n')\n    .map(line => line.trim())\n    .filter(line => line.length > 2)\n    .filter(line => !/^(home|about|services|faqs|contact us|linkedin|instagram|facebook|behance)$/i.test(line));\n\n  const uniqueLines = [];\n  const seen = new Set();\n\n  for (const line of lines) {\n    const key = line.toLowerCase();\n    if (!seen.has(key) && key.length > 2) {\n      seen.add(key);\n      uniqueLines.push(line);\n    }\n  }\n\n  return uniqueLines.join('\\n');\n}\n\nreturn items.map(item => {\n  const html =\n    item.json.html ??\n    item.json.content ??\n    item.json.body ??\n    item.json.data ??\n    item.json.result ??\n    '';\n\n  return {\n    json: {\n      ...item.json,\n      cleaned_text: cleanHtmlToText(html)\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "402d11e7-4e73-4d9c-8fda-6d50bd4b16c0",
      "name": "Generate Website Summary",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueRegularOutput",
      "position": [
        2848,
        80
      ],
      "parameters": {
        "text": "=You are an elite B2B sales researcher and outbound personalization expert.\n\nYour task is to deeply analyze a company's website content and extract highly actionable outreach intelligence.\n\nAnalyze:\n\n* what the company does\n* who they serve\n* industry\n* positioning\n* services\n* possible pain points\n* growth signals\n* technology maturity\n* marketing maturity\n* automation opportunities\n* weak points in sales/marketing/process\n\nThen create a highly personalized first-line opener for cold email outreach.\n\nIMPORTANT RULES:\n\n* Do NOT sound robotic\n* Do NOT hallucinate fake facts\n* Do NOT invent metrics\n* Use natural business language\n* Keep summaries concise\n* Personalized line should feel human and observant\n* Avoid generic phrases like:\n\n  * \u201cI came across your website\u201d\n  * \u201cI noticed your company\u201d\n  * \u201cHope you're doing well\u201d\n\nWEBSITE CONTENT:\n{{ $json.cleaned_text }}\n\nRETURN STRICT JSON ONLY:\n\n{\n\"company_name\":\"\",\n\"industry\":\"\",\n\"company_summary\":\"\",\n\"target_audience\":\"\",\n\"main_services\":[],\n\"pain_points\":[],\n\"growth_signals\":[],\n\"marketing_maturity\":\"\",\n\"automation_opportunities\":[],\n\"personalized_line\":\"\",\n\"email_angle\":\"\",\n\"confidence_score\":\"\"\n}",
        "promptType": "define",
        "needsFallback": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "b4a24e7b-c5fd-4c3f-8af6-f176064efdde",
      "name": "Parse Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        3200,
        80
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n\n  try {\n\n    let raw = item.json.text || '{}';\n\n    // remove markdown\n    raw = raw.replace(/```json/g, '');\n    raw = raw.replace(/```/g, '');\n    raw = raw.trim();\n\n    const parsed = JSON.parse(raw);\n\n    item.json['Company Summary'] =\n      parsed.company_summary || '';\n\n    item.json['Industry'] =\n      parsed.industry || '';\n\n    item.json['Personalized Line'] =\n      parsed.personalized_line || '';\n\n    item.json['Pain Points'] =\n      JSON.stringify(parsed.pain_points || []);\n\n    item.json['Growth Signals'] =\n      JSON.stringify(parsed.growth_signals || []);\n\n    item.json['Email Angle'] =\n      parsed.email_angle || '';\n\n    item.json['Confidence Score'] =\n      parsed.confidence_score || '';\n\n  } catch (error) {\n\n    item.json.parse_error = error.message;\n\n    item.json.raw_response =\n      item.json.text || '';\n\n  }\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "1c089d0f-ecbe-4d42-af20-225f28046c9a",
      "name": "Update Summary",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        3424,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Website": "={{ $('Need Website Summary').item.json.Website }}",
            "Industry": "={{ $json.Industry }}",
            "Email Angle": "={{ $json['Email Angle'] }}",
            "Pain Points": "={{ $json['Pain Points'] }}",
            "Growth Signals": "={{ $json['Growth Signals'] }}",
            "Website summary": "={{ $json['Company Summary'] }}",
            "Confidence Score": "={{ $json['Confidence Score'] }}",
            "Personalized Line": "={{ $json['Personalized Line'] }}"
          },
          "schema": [
            {
              "id": "No",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E3-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-5",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-6",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Note",
              "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": [
            "Website"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "a323ef2f-6bbc-408a-bd57-bd5106b40347",
      "name": "Mark Done",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1072,
        2704
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $('Gmail Trigger').item.json.id }}",
            "Note": "={{ $json.reply_text }}",
            "Status": "={{ $json.reply_status }}",
            "Thread ID": "={{ $json.threadId }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Thread ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "c7d515f4-8ea4-48ec-9e06-a4ce0b726659",
      "name": "Read Services",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        3648,
        80
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 563293032,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=563293032",
          "cachedResultName": "Our Services"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "6db5420c-839a-42fb-a3a5-aab4af3fde2c",
      "name": "Sequence Logic",
      "type": "n8n-nodes-base.code",
      "position": [
        4096,
        80
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n\n  const current = Number(\n    item.json['Sequence Step'] || 0\n  );\n\n  const stages = [\n    'initial',\n    '3_day_followup',\n    '5_day_followup',\n    '7_day_followup',\n    '15_day_followup',\n    '30_day_followup'\n  ];\n\n  item.json.sequence_stage =\n    stages[current] || 'completed';\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "c4915917-b142-4b0a-8fd0-388a1c61d87e",
      "name": "Generate Email",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueRegularOutput",
      "position": [
        4320,
        80
      ],
      "parameters": {
        "text": "=You are an elite B2B outbound copywriter specializing in highly personalized cold email sequences that generate replies and booked meetings.\n\nYour job is to generate a complete 6-email outbound sequence.\n\nThe sequence must:\n\n* feel human\n* feel manually written\n* sound intelligent but natural\n* progressively introduce our services\n* create curiosity\n* position us as experts\n* avoid sounding pushy or spammy\n\nThe emails should feel like they are coming from a thoughtful founder or consultant.\n\nNever sound:\n\n* robotic\n* corporate\n* hype-driven\n* desperate\n* AI-generated\n* overly polished\n\n---\n\n## LEAD INFORMATION\n\nFirst Name:\n{{ $('Read all data to make email').item.json.FirstName }}\n\nIndustry:\n{{ $('Read all data to make email').item.json.Industry }}\n\nCompany Summary:\n{{ $('Read all data to make email').item.json['Website summary'] }}\n\nPersonalized Observation:\n{{ $('Read all data to make email').item.json['Personalized Line'] }}\n\nPain Points:\n{{ $('Read all data to make email').item.json['Pain Points'] }}\n\nGrowth Signals:\n{{ $('Read all data to make email').item.json['Growth Signals'] }}\n\nOur Services:\n{{ $('Read Services').item.json.Services }}\n\n---\n\n## CORE OBJECTIVE\n\nThe sequence should naturally connect:\n\n* their business situation\n* their likely operational bottlenecks\n* our relevant services\n* realistic business outcomes\n\nDo NOT randomly mention all services.\n\nInstead:\n\n* intelligently match services to their likely pain points\n* gradually introduce capabilities across the sequence\n* make every email feel context-aware\n\n---\n\n## SEQUENCE STRUCTURE\n\nEMAIL 1:\n\n* personalized opener\n* introduce one relevant opportunity\n* lightly introduce service fit\n* curiosity-based CTA\n\nEMAIL 2:\n\n* focus on operational inefficiency\n* explain one automation/service angle\n* continue naturally from first email\n\nEMAIL 3:\n\n* introduce missed opportunity or scaling bottleneck\n* explain how our service solves it\n* slightly stronger positioning\n\nEMAIL 4:\n\n* focus on time savings, workflow efficiency, or team overload\n* establish expertise naturally\n* mention realistic operational improvements\n\nEMAIL 5:\n\n* ROI / business outcome angle\n* more commercially focused\n* demonstrate practical implementation thinking\n\nEMAIL 6:\n\n* respectful closing email\n* no pressure\n* acknowledge timing may not be right\n* leave door open professionally\n\n---\n\n## FOLLOWUP RULES\n\n* ONLY Email 1 should have a subject line\n* Followups should NOT generate new subjects\n* Followups will be sent as replies in same Gmail thread\n* Every email must feel different\n* Never repeat same structure\n* Never repeat same CTA\n* Never repeat same opening\n* Followups should become shorter over time\n* Final email should be shortest\n\n---\n\n## WRITING RULES\n\n* Use conversational English\n* Write at 6th grade reading level\n* Use short paragraphs\n* Maximum 2 sentences per paragraph\n* Avoid walls of text\n* Keep emails mobile-friendly\n\nDO NOT USE:\n\n* \u201cHope you're doing well\u201d\n* \u201cJust following up\u201d\n* \u201cChecking in\u201d\n* \u201cCircling back\u201d\n* \u201cTouching base\u201d\n* \u201cRevolutionize\u201d\n* \u201cUnlock\u201d\n* \u201cLeverage\u201d\n* \u201cSynergy\u201d\n\nAvoid:\n\n* corporate jargon\n* fake excitement\n* exaggerated promises\n* spam wording\n* marketing fluff\n\n---\n\n## EMAIL FORMAT\n\nEach email must include:\n\nHi {{ $('Read all data to make email').item.json.FirstName }},\n\nand end with:\n\nBest,\nRavi\n\n---\n\n## LENGTH RULES\n\nEmail 1:\n80-120 words\n\nEmail 2-5:\n50-90 words\n\nEmail 6:\n30-60 words\n\n---\n\n## RETURN FORMAT\n\nRETURN RAW JSON ONLY.\n\nDO NOT WRAP IN MARKDOWN.\n\n{\n\"email_1\": {\n\"subject\": \"\",\n\"body\": \"\",\n\"angle_used\": \"\"\n},\n\n\"email_2\": {\n\"body\": \"\",\n\"angle_used\": \"\"\n},\n\n\"email_3\": {\n\"body\": \"\",\n\"angle_used\": \"\"\n},\n\n\"email_4\": {\n\"body\": \"\",\n\"angle_used\": \"\"\n},\n\n\"email_5\": {\n\"body\": \"\",\n\"angle_used\": \"\"\n},\n\n\"email_6\": {\n\"body\": \"\",\n\"angle_used\": \"\"\n}\n}\n",
        "promptType": "define",
        "needsFallback": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "eef48d4a-eaa3-4e03-82ca-e02415abf361",
      "name": "Parse Email JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        4672,
        80
      ],
      "parameters": {
        "jsCode": "const DAILY_LIMIT = 40;\n\nfor (const item of items) {\n\n  try {\n\n    // DAILY LIMIT CHECK\n    const sentToday =\n      Number(item.json['Sent Count'] || 0);\n\n    if (sentToday >= DAILY_LIMIT) {\n\n      console.log(\n        `Daily limit reached: ${sentToday}`\n      );\n\n      return [];\n\n    }\n\n    // TRACKING\n    item.json['Daily Limit'] =\n      DAILY_LIMIT;\n\n    item.json['Today Sent Count'] =\n      sentToday;\n\n    item.json['Remaining Daily Limit'] =\n      DAILY_LIMIT - sentToday;\n\n    // RAW AI RESPONSE\n    let raw =\n      item.json.text || '{}';\n\n    // CLEAN MARKDOWN\n    raw = raw\n      .replace(/```json/g, '')\n      .replace(/```/g, '')\n      .trim();\n\n    // PARSE JSON\n    const parsed =\n      JSON.parse(raw);\n\n    // FIRST NAME\n    const firstName =\n      item.json.FirstName || 'there';\n\n    // EMAIL FORMATTER\n    const cleanEmail = (text) => {\n\n      if (!text) return '';\n\n      // REMOVE GREETINGS\n      text = text\n        .replace(/^hi\\s.+?,/i, '')\n        .replace(/^hello\\s.+?,/i, '')\n        .replace(/^hey\\s.+?,/i, '');\n\n      // REMOVE SIGNATURES\n      text = text\n        .replace(/best,\\s*ravi/is, '')\n        .replace(/regards,\\s*ravi/is, '');\n\n      // CLEAN SPACING\n      text = text\n        .replace(/\\r/g, '')\n        .replace(/\\n{3,}/g, '\\n\\n')\n        .trim();\n\n      // CLEAN PARAGRAPHS\n      const paragraphs =\n        text\n          .split('\\n\\n')\n          .map(p => p.trim())\n          .filter(Boolean);\n\n      const formatted =\n        paragraphs.join('\\n\\n');\n\n      // FINAL EMAIL\n      return `Hi ${firstName},\n\n${formatted}\n\n\nBest,\nRavi`;\n\n    };\n\n    // LOOP ALL EMAILS\n    for (let i = 1; i <= 6; i++) {\n\n      const emailKey =\n        `email_${i}`;\n\n      item.json[`Subject-${i}`] =\n        parsed[emailKey]?.subject || '';\n\n      item.json[`Email-${i}`] =\n        cleanEmail(\n          parsed[emailKey]?.body || ''\n        );\n\n      item.json[`Angle-${i}`] =\n        parsed[emailKey]?.angle_used || '';\n\n    }\n\n    // SUCCESS STATUS\n    item.json['Parse Status'] =\n      'success';\n\n  } catch (error) {\n\n    item.json['Parse Status'] =\n      'failed';\n\n    item.json['Parse Error'] =\n      error.message;\n\n    item.json['Raw AI Response'] =\n      item.json.text || '';\n\n    item.json['Status'] =\n      'Failed';\n\n  }\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "fb9626f3-f6c3-4dd5-8ce0-7b7038e2c572",
      "name": "Update Lead",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        6112,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "={{ $json.Note }}",
            "Email": "={{ $('Read all data to make email').item.json.Email }}",
            "Status": "={{ $json.Status }}",
            "Email-1": "={{ $('Parse Email JSON').item.json['Email-1'] }}",
            "Email-2": "={{ $('Parse Email JSON').item.json['Email-2'] }}",
            "Email-3": "={{ $('Parse Email JSON').item.json['Email-3'] }}",
            "Email-4": "={{ $('Parse Email JSON').item.json['Email-4'] }}",
            "Email-5": "={{ $('Parse Email JSON').item.json['Email-5'] }}",
            "Email-6": "={{ $('Parse Email JSON').item.json['Email-6'] }}",
            "Subject-1": "={{ $('Parse Email JSON').item.json['Subject-1'] }}",
            "Thread ID": "={{ $json.threadId }}",
            "row_number": 0,
            "Email 1 Sent": "={{ $json['E1 Status'] }}",
            "Email 2 Sent": "={{ $json['E2 Status'] }}",
            "Email 4 Sent": "={{ $json['E4 Status'] }}",
            "Email 5 Sent": "={{ $json['E5 Status'] }}",
            "Email 3 sent ": "={{ $json['E3 Status'] }}",
            "E1-Send-date&time": "={{ $json['Last Email Sent'] }}",
            "E2-Send-date&time": "={{ $json['Followup 1 Date'] }}",
            "E3-Send-date&time": "={{ $json['Followup 2 Date'] }}",
            "E4-Send-date&time": "={{ $json['Followup 3 Date'] }}",
            "E5-Send-date&time": "={{ $json['Followup 4 Date'] }}",
            "E6-Send-date&time": "={{ $json['Followup 5 Date'] }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "9a8daefa-5ec3-4857-a27b-4d6b833b7428",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2848,
        304
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "54d93472-b7e0-4e47-88b1-cade593926e6",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        4336,
        304
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "eeac1421-4136-4973-b3fa-12cff2fa2a3d",
      "name": "Read all data to make email",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        3872,
        80
      ],
      "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "85c2fa4a-75e6-41cd-9e68-d2f0a2389fe5",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "onError": "continueRegularOutput",
      "position": [
        544,
        2704
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1.4
    },
    {
      "id": "ad27c9d0-2577-4aee-9240-a0b1c22ba473",
      "name": "Reply Identifier",
      "type": "n8n-nodes-base.code",
      "position": [
        768,
        2704
      ],
      "parameters": {
        "jsCode": "const hasReply = !!$json.headers?.[\"in-reply-to\"];\n\nreturn [\n  {\n    json: {\n      email: $json.from || \"\",\n      threadId: $json.threadId || \"\",\n      reply_status: hasReply ? \"active\" : \"Reply Received\",\n      reply_text: $json.textPlain || $json.snippet || \"\",\n      date: new Date().toISOString()\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "19d7d387-5001-45ea-8742-d2227cce6b1f",
      "name": "Working Hours Protection",
      "type": "n8n-nodes-base.code",
      "position": [
        848,
        80
      ],
      "parameters": {
        "jsCode": "const now = new Date();\n\nconst hour = now.getHours();\n\nconst day = now.getDay();\n\n// Sunday = 0\n// Monday = 1\n// Friday = 5\n// Saturday = 6\n\nconst isWeekend =\n  day === 0 || day === 6;\n\nconst isWorkingHours =\n  hour >= 9 && hour < 20;\n\nconsole.log({\n  serverTime: now.toISOString(),\n  localServerTime: now.toString(),\n  hour,\n  day,\n  isWeekend,\n  isWorkingHours\n});\n\nif (isWeekend || !isWorkingHours) {\n\n  console.log(\n    'Outside working hours'\n  );\n\n  return [];\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "b63cbff7-c0d1-4cdc-b619-ca55df97e6fd",
      "name": "email tracker",
      "type": "n8n-nodes-base.code",
      "position": [
        5888,
        80
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n\n  // SERVER CURRENT TIME\n  const now = new Date();\n\n  // FOLLOWUP DAYS\n  const delays = [3, 5, 7, 15, 30];\n\n  // CURRENT SEQUENCE STEP\n  const currentStep =\n    Number(\n      item.json['Sequence Step'] || 0\n    );\n\n  // NEXT EMAIL NUMBER\n  const emailNumber =\n    currentStep + 1;\n\n  // STAGES\n  const stages = [\n    'initial',\n    '3_day_followup',\n    '5_day_followup',\n    '7_day_followup',\n    '15_day_followup',\n    '30_day_followup'\n  ];\n\n  // ISO FORMATTER\n  const formatDate = (date) => {\n\n    return new Date(date)\n      .toISOString();\n\n  };\n\n  // CREATE FOLLOWUP DATES\n  const followupDates = [];\n\n  for (const delay of delays) {\n\n    const futureDate =\n      new Date(now);\n\n    futureDate.setDate(\n      futureDate.getDate() + delay\n    );\n\n    followupDates.push(\n      formatDate(futureDate)\n    );\n\n  }\n\n  // NEXT FOLLOWUP DATE\n  const nextDelay =\n    delays[currentStep] || 30;\n\n  const nextDate =\n    new Date(now);\n\n  nextDate.setDate(\n    nextDate.getDate() + nextDelay\n  );\n\n  // SENT COUNT\n  const currentSent =\n    Number(\n      item.json['Sent Count'] || 0\n    );\n\n  item.json['Sent Count'] =\n    currentSent + 1;\n\n  // UPDATE STEP\n  item.json['Sequence Step'] =\n    emailNumber;\n\n  // MAIN TRACKING\n  item.json['Last Email Sent'] =\n    formatDate(now);\n\n  item.json['Next Followup Date'] =\n    formatDate(nextDate);\n\n  item.json['Last Email Number'] =\n    emailNumber;\n\n  item.json['Last Email Stage'] =\n    stages[currentStep] ||\n    'completed';\n\n  item.json['Emails Sent Count'] =\n    emailNumber;\n\n  // FOLLOWUP DATE TRACKING\n  item.json['Followup 1 Date'] =\n    followupDates[0];\n\n  item.json['Followup 2 Date'] =\n    followupDates[1];\n\n  item.json['Followup 3 Date'] =\n    followupDates[2];\n\n  item.json['Followup 4 Date'] =\n    followupDates[3];\n\n  item.json['Followup 5 Date'] =\n    followupDates[4];\n\n  // EXISTING SHEET DATE FORMAT\n  item.json['E2-Send-date&time'] =\n    followupDates[0];\n\n  item.json['E3-Send-date&time'] =\n    followupDates[1];\n\n  item.json['E4-Send-date&time'] =\n    followupDates[2];\n\n  item.json['E5-Send-date&time'] =\n    followupDates[3];\n\n  item.json['E6-Send-date&time'] =\n    followupDates[4];\n\n  // EMAIL STATUS\n  item.json['E1 Status'] =\n    emailNumber >= 1\n      ? 'sent'\n      : 'not sent';\n\n  item.json['E2 Status'] =\n    emailNumber >= 2\n      ? 'sent'\n      : 'not sent';\n\n  item.json['E3 Status'] =\n    emailNumber >= 3\n      ? 'sent'\n      : 'not sent';\n\n  item.json['E4 Status'] =\n    emailNumber >= 4\n      ? 'sent'\n      : 'not sent';\n\n  item.json['E5 Status'] =\n    emailNumber >= 5\n      ? 'sent'\n      : 'not sent';\n\n  item.json['E6 Status'] =\n    emailNumber >= 6\n      ? 'sent'\n      : 'not sent';\n\n  // MAIN STATUS\n  if (currentStep >= 5) {\n\n    item.json['Status'] =\n      'Completed';\n\n    item.json['Note'] =\n      'All followups completed';\n\n  } else {\n\n    item.json['Status'] =\n      'Pending';\n\n    item.json['Note'] =\n      `Email ${emailNumber} sent successfully`;\n\n  }\n\n  // LOGGING\n  item.json['Last Sent Subject'] =\n    item.json.subject || '';\n\n  item.json['Last Sent Email'] =\n    item.json.message || '';\n\n  // DELIVERY TRACKING\n  item.json['Delivery Status'] =\n    'Delivered';\n\n  item.json['Sent From Workflow'] =\n    'n8n AI Outreach';\n\n  item.json['Updated At'] =\n    formatDate(now);\n\n  // SERVER INFO\n  item.json['Server Current Time'] =\n    formatDate(now);\n\n  item.json['Server Timestamp'] =\n    now.getTime();\n\n  item.json['Timezone Offset'] =\n    now.getTimezoneOffset();\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "84108fd1-dadf-44ec-b1ce-769f0405e035",
      "name": "Wait",
      "type": "n8n-nodes-base.code",
      "position": [
        4896,
        80
      ],
      "parameters": {
        "jsCode": "{{ Math.floor(Math.random() * 300) + 30 }}"
      },
      "typeVersion": 2
    },
    {
      "id": "05d7ace6-6801-4e0b-8f91-6271465864d9",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        592,
        1472
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ebb031db-c0ac-4e9a-841e-5a25005a356a",
      "name": "Update Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        4368,
        1456
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "Email 2 sent successfully",
            "Email": "={{ $('Read Leads1').item.json.Email }}",
            "row_number": 0,
            "Email 2 Sent": "={{ $json.labelIds[1] }}",
            "E2-Send-date&time": "={{ $('Live Time 2').item.json.currentDate }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "a608c5b5-5874-48ad-9196-cfe5f639097e",
      "name": "Read Leads1",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1712,
        1472
      ],
      "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "e943fc7b-a3f0-4711-a74a-ecd5d62938ae",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        3632,
        1456
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "70d81da9-1a41-4e88-87df-1e2a419a0dc5",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $('Read Leads1').item.json['E2-Send-date&time'] }}",
              "rightValue": "={{ $json.currentDate }}  "
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "c9aafc30-9eb5-456b-b4e7-df83ac6e9fda",
      "name": "Email 2 check sent or not",
      "type": "n8n-nodes-base.if",
      "position": [
        2160,
        1472
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5f836f81-731b-451c-966d-9b9660dd3cc7",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json['Email 2 Sent'] }}",
              "rightValue": "not sent"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "cf539af1-04c3-48af-8f54-cabe055a9866",
      "name": "Email 3 check sent or not",
      "type": "n8n-nodes-base.if",
      "position": [
        2384,
        1616
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b557230a-ea51-4261-b94e-50b20a061cb7",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Read Leads1').item.json['Email 3 sent '] }}",
              "rightValue": "not sent"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "08a0957c-5ce9-4a19-a985-151f0956ee78",
      "name": "Email 4 check sent or not",
      "type": "n8n-nodes-base.if",
      "position": [
        2608,
        1712
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b557230a-ea51-4261-b94e-50b20a061cb7",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Read Leads1').item.json['Email 4 Sent'] }}",
              "rightValue": "not sent"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7ee7e28f-1e80-4137-8ad4-fd44d3f8ded9",
      "name": "Email 5 check sent or not",
      "type": "n8n-nodes-base.if",
      "position": [
        2816,
        1952
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b0d3bcfc-93f4-4357-bc1a-12b5d5d36843",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Read Leads1').item.json['Email 5 Sent'] }}",
              "rightValue": "not sent"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "2d7ceb89-7f1f-427c-a2cf-da29379dd1ad",
      "name": "Update Google Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        4384,
        1696
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "Email 3 sent successfully",
            "Email": "={{ $('Read Leads1').item.json.Email }}",
            "row_number": 0,
            "Email 3 sent ": "={{ $json.labelIds[1] }}",
            "E3-Send-date&time": "={{ $('Live Time 3').item.json.currentDate }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "b4c31a20-2e4f-4df7-8185-4199577b483d",
      "name": "Filter1",
      "type": "n8n-nodes-base.filter",
      "position": [
        3632,
        1696
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "70d81da9-1a41-4e88-87df-1e2a419a0dc5",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $('Read Leads1').item.json['E3-Send-date&time'] }}",
              "rightValue": "={{ $json.currentDate }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "ae904da5-57d6-415e-9d1d-7446f6775383",
      "name": "Update Google Sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        4384,
        1888
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "Email 4 sent successfully",
            "Email": "={{ $('Read Leads1').item.json.Email }}",
            "row_number": 0,
            "Email 4 Sent": "={{ $json.labelIds[1] }}",
            "E4-Send-date&time": "={{ $('Live Time 4').item.json.currentDate }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "268227ec-f773-4693-b1f5-a92c41dd924f",
      "name": "Filter2",
      "type": "n8n-nodes-base.filter",
      "position": [
        3632,
        1888
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "70d81da9-1a41-4e88-87df-1e2a419a0dc5",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $('Read Leads1').item.json['E4-Send-date&time'] }}",
              "rightValue": "={{ $json.currentDate }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "527fe8d1-f80e-4be8-9ab9-accd627d7e7b",
      "name": "Update Google Sheet3",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        4384,
        2112
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "Email 5 sent successfully",
            "Email": "={{ $('Read Leads1').item.json.Email }}",
            "row_number": 0,
            "Email 5 Sent": "={{ $json.labelIds[1] }}",
            "E5-Send-date&time": "={{ $('Live Time 5').item.json.currentDate }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "f4b4c6a7-eadb-4e40-b547-eaeb75403d58",
      "name": "Filter3",
      "type": "n8n-nodes-base.filter",
      "position": [
        3632,
        2112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "70d81da9-1a41-4e88-87df-1e2a419a0dc5",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $('Read Leads1').item.json['E5-Send-date&time'] }}",
              "rightValue": "={{ $json.currentDate }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "96cc3e46-2ef5-48e6-a6f9-3ff9c9c6cade",
      "name": "Update Google Sheet4",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        4384,
        2352
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.id }}",
            "Note": "Email 6 sent successfully",
            "Email": "={{ $('Read Leads1').item.json.Email }}",
            "Status": "All Email Sent",
            "row_number": 0,
            "E6-Send-date&time": "={{ $('Live Time 6').item.json.currentDate }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "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",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E3-Send-date&time",
              "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": "Email-4",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Note",
              "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": [
            "Email"
          ],
          "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "236ca7d7-1224-4982-9527-e3f2a9bd5b86",
      "name": "Filter4",
      "type": "n8n-nodes-base.filter",
      "position": [
        3632,
        2352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "70d81da9-1a41-4e88-87df-1e2a419a0dc5",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $('Read Leads1').item.json['E6-Send-date&time'] }}",
              "rightValue": "={{ $json.currentDate }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "c3cb729d-6ed9-45e0-85e0-731426e00f43",
      "name": "Email 2",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        4000,
        1456
      ],
      "parameters": {
        "message": "={{ $('Read Leads1').item.json['Email-2'] }}",
        "options": {},
        "emailType": "text",
        "messageId": "={{ $('Read Leads1').item.json.ID }}",
        "operation": "reply"
      },
      "typeVersion": 2.2
    },
    {
      "id": "a8f48e16-5a01-4f99-b63a-bb789ad777b9",
      "name": "Email 1",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        5120,
        80
      ],
      "parameters": {
        "sendTo": "={{ $('Read Leads').item.json.Email }}",
        "message": "={{ $('Parse Email JSON').item.json['Email-1'] }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ $('Parse Email JSON').item.json['Subject-1'] }}",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2da40917-6bed-4ad8-b931-d5f3b783838b",
      "name": "Email 3",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        4000,
        1696
      ],
      "parameters": {
        "message": "={{ $('Read Leads1').item.json['Email-3'] }}",
        "options": {
          "appendAttribution": false
        },
        "emailType": "text",
        "messageId": "={{ $('Read Leads1').item.json['Thread ID'] }}",
        "operation": "reply"
      },
      "typeVersion": 2.1
    },
    {
      "id": "b0546f45-abe0-4c39-9abd-73e17fa802b9",
      "name": "Email 4",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        4000,
        1888
      ],
      "parameters": {
        "message": "={{ $('Read Leads1').item.json['Email-4'] }}",
        "options": {
          "appendAttribution": false
        },
        "emailType": "text",
        "messageId": "={{ $('Read Leads1').item.json.ID }}",
        "operation": "reply"
      },
      "typeVersion": 2.1
    },
    {
      "id": "243a42aa-338e-4dc6-b659-87c74c210d84",
      "name": "Email 5",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        4000,
        2112
      ],
      "parameters": {
        "message": "={{ $('Read Leads1').item.json['Email-5'] }}",
        "options": {
          "appendAttribution": false
        },
        "emailType": "text",
        "messageId": "={{ $('Read Leads1').item.json.ID }}",
        "operation": "reply"
      },
      "typeVersion": 2.1
    },
    {
      "id": "b2892aa2-1e6b-476c-9880-77508c289b2b",
      "name": "Email 6",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        4000,
        2352
      ],
      "parameters": {
        "message": "={{ $('Read Leads1').item.json['Email-6'] }}",
        "options": {
          "appendAttribution": false
        },
        "emailType": "text",
        "messageId": "={{ $('Read Leads1').item.json.ID }}",
        "operation": "reply"
      },
      "typeVersion": 2.1
    },
    {
      "id": "bcd9d92b-d6eb-43be-ba55-543ade96d2dd",
      "name": "Live Time 2",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        3296,
        1456
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "5e3d1401-19fa-41d6-80f4-e0301024985c",
      "name": "Live Time 3",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        3296,
        1696
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "e7aa44b6-9c6c-4365-b928-d3d6db5a6d91",
      "name": "Live Time 4",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        3296,
        1888
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "2c6e2f85-8933-462f-b90b-b1d0501aeac3",
      "name": "Live Time 5",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        3296,
        2112
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "5cf3ee9d-b1e3-46e5-9a1f-945609353a2c",
      "name": "Live Time 6",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        3296,
        2352
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "243b7ba5-bd1d-490f-9e5e-ed0cb000622d",
      "name": "Working Hours Protection1",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        1472
      ],
      "parameters": {
        "jsCode": "const now = new Date();\n\nconst hour = now.getHours();\n\nconst day = now.getDay();\n\n// Sunday = 0\n// Monday = 1\n// Friday = 5\n// Saturday = 6\n\nconst isWeekend =\n  day === 0 || day === 6;\n\nconst isWorkingHours =\n  hour >= 9 && hour < 20;\n\nconsole.log({\n  serverTime: now.toISOString(),\n  localServerTime: now.toString(),\n  hour,\n  day,\n  isWeekend,\n  isWorkingHours\n});\n\nif (isWeekend || !isWorkingHours) {\n\n  console.log(\n    'Outside working hours'\n  );\n\n  return [];\n\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "fd82e322-6996-4222-8983-ae68d373fe2e",
      "name": "Run after working hours",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        3488
      ],
      "parameters": {
        "jsCode": "const now = new Date();\n\nconst hour = now.getHours();\n\nconst day = now.getDay();\n\n\nconst isWeekend =\n  day === 0 || day === 6;\n\nconst isWorkingHours =\n  hour >= 9 && hour < 20;\n\nconst isOutsideWorkingHours =\n  isWeekend || !isWorkingHours;\n\nconsole.log({\n  serverTime: now.toISOString(),\n  localServerTime: now.toString(),\n  hour,\n  day,\n  isWeekend,\n  isWorkingHours,\n  isOutsideWorkingHours\n});\n\nif (isOutsideWorkingHours) {\n\n  console.log(\n    'Outside working hours'\n  );\n\n  return items;\n\n}\n\nreturn [];"
      },
      "typeVersion": 2
    },
    {
      "id": "b8c34957-8d65-432f-942c-a05b2e7c9999",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        528,
        3488
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f9f69f63-8323-4dc2-b460-d03a7f91bd5b",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1040,
        3488
      ],
      "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": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "da7bb83d-c669-41cd-8310-2ffa2ac6bf37",
      "name": "only pending contact filter",
      "type": "n8n-nodes-base.code",
      "position": [
        1936,
        1472
      ],
      "parameters": {
        "jsCode": "const pendingRows = items.filter(item => {\n  const status = String(item.json.Status || '').trim().toLowerCase();\n  return status === 'pending';\n});\n\nreturn pendingRows.slice(0, 1);"
      },
      "typeVersion": 2
    },
    {
      "id": "ec46daea-a64a-49c4-9488-7754d8313210",
      "name": "Reply manage",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1872,
        2704
      ],
      "parameters": {
        "operation": "delete",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        },
        "startIndex": "={{ $('Get data').item.json.row_number }}"
      },
      "typeVersion": 4.7
    },
    {
      "id": "13dbff7a-0d51-4a9e-b80c-e4da7f59f147",
      "name": "Get data",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1296,
        2704
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json['Thread ID'] }}",
              "lookupColumn": "Thread ID"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Email Sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "3ab1a649-cf03-402b-a308-9a6cddda28dd",
      "name": "Data move to another sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1648,
        2704
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $json.ID }}",
            "No": "={{ $json.No }}",
            "Note": "={{ $json.Note }}",
            "Email": "={{ $json.Email }}",
            "Status": "={{ $json.Status }}",
            "Email-1": "={{ $json['Email-1'] }}",
            "Email-2": "={{ $json['Email-2'] }}",
            "Email-3": "={{ $json['Email-3'] }}",
            "Email-4": "={{ $json['Email-4'] }}",
            "Email-5": "={{ $json['Email-5'] }}",
            "Email-6": "={{ $json['Email-6'] }}",
            "Website": "={{ $json.Website }}",
            "Industry": "={{ $json.Industry }}",
            "LastName": "={{ $json.LastName }}",
            "FirstName": "={{ $json.FirstName }}",
            "Subject-1": "={{ $json['Subject-1'] }}",
            "Thread ID": "={{ $json['Thread ID'] }}",
            "Email Angle": "={{ $json['Email Angle'] }}",
            "Pain Points": "={{ $json['Pain Points'] }}",
            "Email 1 Sent": "={{ $json['Email 1 Sent'] }}",
            "Email 2 Sent": "={{ $json['Email 2 Sent'] }}",
            "Email 4 Sent": "={{ $json['Email 4 Sent'] }}",
            "Email 5 Sent": "={{ $json['Email 5 Sent'] }}",
            "Email 3 sent ": "={{ $json['Email 3 sent '] }}",
            "Growth Signals": "={{ $json['Growth Signals'] }}",
            "Website summary": "={{ $json['Website summary'] }}",
            "Confidence Score": "={{ $json['Confidence Score'] }}",
            "E1-Send-date&time": "={{ $json['E1-Send-date&time'] }}",
            "E2-Send-date&time": "={{ $json['E2-Send-date&time'] }}",
            "E3-Send-date&time": "={{ $json['E3-Send-date&time'] }}",
            "E4-Send-date&time": "={{ $json['E4-Send-date&time'] }}",
            "E5-Send-date&time": "={{ $json['E5-Send-date&time'] }}",
            "E6-Send-date&time": "={{ $json['E6-Send-date&time'] }}",
            "Personalized Line": "={{ $json['Personalized Line'] }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thread ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thread ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "No",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "FirstName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LastName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "LastName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Line",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Personalized Line",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain Points",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Pain Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth Signals",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Growth Signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Angle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email Angle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Confidence Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Confidence Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject-1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E1-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E1-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 1 Sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email 1 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E2-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E2-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 2 Sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email 2 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E3-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E3-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 3 sent ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email 3 sent ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E4-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E4-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 4 Sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email 4 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-5",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E5-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E5-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email 5 Sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email 5 Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email-6",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email-6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "E6-Send-date&time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "E6-Send-date&time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Note",
              "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": [
            "Thread ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 365343214,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=365343214",
          "cachedResultName": "Reply Received"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "89b00d1d-c50a-4c9f-abfc-d57bef91c513",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -32
      ],
      "parameters": {
        "width": 480,
        "height": 128,
        "content": "# Lead enrichment + sequence generation"
      },
      "typeVersion": 1
    },
    {
      "id": "df613199-4f28-49de-85d6-ef3a2e17538b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        1376
      ],
      "parameters": {
        "width": 464,
        "height": 96,
        "content": "# Follow-up sending engine"
      },
      "typeVersion": 1
    },
    {
      "id": "b76b00a4-0f84-41cd-8a96-b09d617211ce",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        2576
      ],
      "parameters": {
        "width": 624,
        "height": 80,
        "content": "# Reply detection + lead status update"
      },
      "typeVersion": 1
    },
    {
      "id": "e229db1f-32fa-44e5-9e2b-3a59df24e7b8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        3360
      ],
      "parameters": {
        "width": 496,
        "height": 80,
        "content": "# No-reply sequence closure\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4da6385f-ed95-41dd-9f13-87992016c3b1",
      "name": "Read Daily Limit",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1072,
        80
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2037480359,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=2037480359",
          "cachedResultName": "Daily limit email sending"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6f811d45-8c8a-4b71-a4ac-ec074e7122b0",
      "name": "Compare Limit",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        80
      ],
      "parameters": {
        "jsCode": "const today = new Date()\n.toISOString()\n.split('T')[0];\n\n// DEFAULT LIMIT\nconst DEFAULT_LIMIT = 10;\n\n// FIND TODAY ROW\nconst todayRow = items.find(item =>\nitem.json.Date === today\n);\n\n// IF NO ROW FOUND\nif (!todayRow) {\n\nreturn [\n{\njson: {\nDate: today,\n\"New Email Limit\":\nDEFAULT_LIMIT,\n\"New Sent Today\": 0,\nallowSend: true\n}\n}\n];\n\n}\n\n// GET LIMIT\nconst limit =\nNumber(\ntodayRow.json[\n\"New Email Limit\"\n]\n) || DEFAULT_LIMIT;\n\n// GET CURRENT SENT\nconst sentToday =\nNumber(\ntodayRow.json[\n\"New Sent Today\"\n]\n) || 0;\n\n// CHECK LIMIT\nconst allowSend =\nsentToday < limit;\n\nreturn [\n{\njson: {\n...todayRow.json,\nallowSend,\nlimit,\nsentToday\n}\n}\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "bc148657-727a-40cf-8ae7-7e6038a777e3",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1520,
        80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc7e1a39-3acf-4433-a0ef-c3003fa29ca2",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.allowSend }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "dc29690a-01de-451b-a706-2c2aef53f767",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        5408,
        160
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n\nconst current =\nNumber(\nitem.json[\n\"New Sent Today\"\n]\n) || 0;\n\nitem.json[\n\"New Sent Today\"\n] = current + 1;\n\n}\n\nreturn items;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5f900719-f5f1-4ead-8744-9e3d00f19908",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        5600,
        160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $json.Date }}",
            "New Sent Today": "={{ $json['New Sent Today'] }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Email Limit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "New Email Limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Sent Today",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "New Sent Today",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Followup limit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Followup limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Followup Sent Today",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Followup Sent Today",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Date"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2037480359,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=2037480359",
          "cachedResultName": "Daily limit email sending"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c444ddde-27a6-47b9-acaa-035721f6cd26",
      "name": "Code in JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        5072,
        1936
      ],
      "parameters": {
        "jsCode": "for (const item of items) {\n\nconst current =\nNumber(\nitem.json[\n\"Followup Sent Today\"\n]\n) || 0;\n\nitem.json[\n\"Followup Sent Today\"\n] = current + 1;\n\n}\n\nreturn items;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5588c637-c784-435b-8f47-c4999b2c3a1e",
      "name": "Append or update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        5408,
        1936
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $json.Date }}",
            "New Sent Today": "={{ $json['New Sent Today'] }}",
            "Followup Sent Today": "={{ $json['Followup Sent Today'] }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Email Limit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "New Email Limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Sent Today",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "New Sent Today",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Followup limit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Followup limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Followup Sent Today",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Followup Sent Today",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Date"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2037480359,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=2037480359",
          "cachedResultName": "Daily limit email sending"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6c777388-d42b-44d0-971c-a3b108681031",
      "name": "Read Daily Limit1",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1040,
        1472
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2037480359,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=2037480359",
          "cachedResultName": "Daily limit email sending"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "AI Outreach Template Sheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "96b65f7d-acc6-4712-a354-4db8b88d68e3",
      "name": "Compare Limit1",
      "type": "n8n-nodes-base.code",
      "position": [
        1264,
        1472
      ],
      "parameters": {
        "jsCode": "const today = new Date()\n.toISOString()\n.split('T')[0];\n\n// DEFAULT FOLLOWUP LIMIT\nconst DEFAULT_FOLLOWUP_LIMIT = 30;\n\n// FIND TODAY ROW\nconst todayRow = items.find(item =>\nitem.json.Date === today\n);\n\n// IF NO ROW FOUND\nif (!todayRow) {\n\nreturn [\n{\njson: {\nDate: today,\n\"Followup Limit\":\nDEFAULT_FOLLOWUP_LIMIT,\n\"Followup Sent Today\": 0,\nallowSend: true\n}\n}\n];\n\n}\n\n// GET FOLLOWUP LIMIT\nconst followupLimit =\nNumber(\ntodayRow.json[\n\"Followup Limit\"\n]\n) || DEFAULT_FOLLOWUP_LIMIT;\n\n// GET FOLLOWUP SENT COUNT\nconst followupSentToday =\nNumber(\ntodayRow.json[\n\"Followup Sent Today\"\n]\n) || 0;\n\n// CHECK LIMIT\nconst allowSend =\nfollowupSentToday < followupLimit;\n\nreturn [\n{\njson: {\n...todayRow.json,\nallowSend,\nfollowupLimit,\nfollowupSentToday\n}\n}\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d9c98afc-9715-441d-8a74-f0d6ed3f20d4",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        1488,
        1472
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc7e1a39-3acf-4433-a0ef-c3003fa29ca2",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.allowSend }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "6f5dc632-567d-46d9-8721-88e50ead5595",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        4464,
        304
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "c2325ce3-65e5-482c-a393-0661235d2ddf",
      "name": "OpenRouter Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        3008,
        304
      ],
      "parameters": {
        "model": "google/gemma-4-26b-a4b-it:free",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "dad98941-8c81-4273-a8f8-ee097407f876",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -64
      ],
      "parameters": {
        "color": 5,
        "width": 848,
        "height": 1472,
        "content": "## Try It Out!\n### This n8n template is a complete AI-powered cold email sequence system built to automate lead research, personalized email writing, follow-up scheduling, reply tracking, and send-limit control.\n\nYou only need to provide these 4 basic inputs:\n* First Name\n* Last Name\n* Email\n* Website\n\nOnce those fields are added, the workflow handles everything else automatically. It researches the lead\u2019s website, understands the business, generates personalized email copy, creates the full follow-up sequence, assigns follow-up dates, monitors replies, and updates your tracking sheets without manual work.\n\n### How it works\n* A scheduled workflow reads new leads from your main Google Sheet.\n* You only need to fill in the lead\u2019s First Name, Last Name, Email, and Website.\n* The workflow uses the website URL to visit and scrape the company\u2019s website content.\n* The scraped content is cleaned and prepared so AI can understand the business clearly.\n* AI then analyzes the company and generates useful outreach context such as industry, summary, pain points, growth signals, and a personalized opening line.\n* Your services or offer can be stored in a separate sheet, and the workflow reads that data so AI can align the outreach with what you actually sell.\n* Based on the website research and your offer, AI generates a full cold email sequence automatically.\n* The workflow prepares the first email plus all follow-up emails, so you get a ready-to-run outreach system instead of writing emails manually every time.\n* Follow-up dates are automatically added to the sheet based on the sequence logic, helping you spread messages naturally and reduce the risk of sending too aggressively.\n* Follow-up sending is separated from new lead processing, which keeps the system more organized and easier to manage.\n* Daily sending limits can also be controlled from a separate Google Sheet, so you can define how many new emails and how many follow-ups can be sent each day.\n* This helps protect your Gmail account by avoiding over-sending and keeping outreach volume under control.\n* The workflow also tracks sent status, next follow-up timing, sequence step, and reply status inside the sheet.\n* If a lead replies, the Gmail reply-handling flow detects the response and updates the lead so future follow-ups stop automatically.\n* You can also move completed, replied, or processed leads into another sheet for better record keeping and cleaner lead management.\n* This makes the workflow a full end-to-end solution for email sequencing, not just an email generator.\n\n### What makes this useful\n* You do not need to manually research every company before outreach.\n* You do not need to manually write each email or each follow-up.\n* You do not need to manually calculate or assign follow-up dates.\n* You do not need to keep checking who replied and who should stop receiving emails.\n* You can control sending volume in a simple spreadsheet without editing workflow logic.\n* You can update your service offering in one place and let AI adapt the outreach automatically.\n\n### How to use\n* Add your lead details into the main sheet using only First Name, Last Name, Email, and Website.\n* Add your services, offer, or positioning into the services sheet so the AI knows what solution to pitch.\n* Set your Gmail daily limits in the limit sheet for both new emails and follow-ups.\n* Activate the workflow.\n* The system will research, generate, schedule, send, track, and update the full sequence automatically.\n\n### Requirements\n* Google Sheets for lead input, service data, tracking, and daily send-limit control.\n* Gmail for sending emails and monitoring replies.\n* Gemini account for AI research and email generation.\n* Browser scraping setup Puppeteer community node for reading website content.\n\n### Sheets Setup\n* Main sheet for lead input and sequence tracking.\n* Services sheet for your offers, solutions, or business positioning.\n* Daily limit sheet for controlling Gmail sending volume.\n* Optional processed or archive sheet for replied, completed, or moved leads.\n\n### Template Sheet\n* Download the sheet template from this URL:\n* [Google Sheet Template](https://docs.google.com/spreadsheets/d/1yf-LKw6NURexE5cyTLcjuSYFaB2l-KjgvTK8sGxTpo0/edit?usp=sharing)"
      },
      "typeVersion": 1
    },
    {
      "id": "5b45abbf-4ec6-4a12-a9fa-6312a810722a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -272
      ],
      "parameters": {
        "color": 2,
        "width": 1056,
        "height": 592,
        "content": "\n## 1 Working hour check + Daily Limit check + Check how many already send\n* Fires the workflow automatically every minute. This is the heartbeat of the entire pipeline  it wakes up the system to check if a new lead needs to be processed and emailed. You can adjust the interval (e.g., every 5 minutes) based on how frequently you want leads picked up.\n\n* Protects your sender reputation by ensuring emails are only sent on weekdays between 9 AM \u2013 8 PM server time. If the workflow runs outside business hours or on weekends, it immediately stops execution by returning an empty array.\n\n* Reads a dedicated \"Daily limit email sending\" sheet that tracks how many new emails have been sent today. This gives you live control over your sending volume directly from the spreadsheet no need to edit the workflow.\n\n* Checks today's row in the limit sheet. If no row exists for today, it defaults to 10 emails. If a row exists, it compares New Sent Today against New Email Limit and sets allowSend: true or false.\n\nGates the entire pipeline. Only passes execution forward if allowSend === true. If the daily limit is hit, the flow stops here silently no crash, no error, just a clean exit.           "
      },
      "typeVersion": 1
    },
    {
      "id": "de507226-9387-4b77-ac30-ea7729681b46",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -272
      ],
      "parameters": {
        "color": 3,
        "width": 976,
        "height": 592,
        "content": "## 2 Pull data and scrape website \n\n* Pulls all rows from your \"Email Sheet\" tab. This is your master leads database containing: FirstName, LastName, Email, Website, Status, and all email sequence columns.\n\n* Filters the full leads list to find only rows where Status is empty (i.e., not yet contacted). It then picks exactly 1 lead at a time using .slice(0, 1) ensuring one focused execution per scheduler run.\n\n* Uses a headless browser (Browserless) to load and render the lead's website fully including JavaScript-rendered content. This captures far more than a basic HTTP request would, including dynamic text, CTAs, and page structure.\n\n* Strips all HTML tags, scripts, styles, SVGs, iframes, and irrelevant noise from the raw scraped page. Decodes HTML entities, removes duplicate lines, and outputs clean readable cleaned_text ready for AI analysis.\n\n\n(Notes): This is for self hosted : Replace YOUR_BROWSERLESS_TOKEN with your actual token. You need a running Browserless instance. For Docker users: ws://browserless:3000?token=TOKEN Or you can use Directly without this on n98n.io"
      },
      "typeVersion": 1
    },
    {
      "id": "630d0993-925d-4c83-b435-3325043fb1b1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        -272
      ],
      "parameters": {
        "color": 4,
        "width": 1488,
        "height": 768,
        "content": "## 3 Website summary and data fetching for makr email secquence\n\n* Sends the cleaned website text to an AI model with a detailed B2B researcher prompt. Returns structured JSON with: company_summary, industry, target_audience, pain_points, growth_signals, automation_opportunities, personalized_line, email_angle, and confidence_score.            \n\n* These are the AI models powering the website summary step. Google Gemini is the primary model; OpenRouter (Gemma 4 26B) is the fallback/alternative.\n\n* Parses the AI's raw JSON response from the summary step. Strips any markdown code fences ( ```json ) that the AI might wrap around its output, then maps fields into proper item properties like Company Summary, Personalized Line, Pain Points, etc.\n\n* Writes the AI-generated company intelligence back into the lead's row in the sheet matched by Website URL. Fills columns: Website summary, Industry, Personalized Line, Pain Points, Growth Signals, Email Angle, Confidence Score.\n\n* Reads your agency's service offerings from a separate \"Our Services\" tab. The AI email generator uses this to intelligently match your services to each lead's pain points making every email contextually relevant.\n\n* Re-reads the full lead row (now enriched with the summary data) to pass all context name, industry, pain points, personalized line into the email generation step. This ensures the email prompt has complete, up-to-date data.\n\n* Maps the lead's current Sequence Step number (0\u20135) to a named stage: initial, 3_day_followup, 5_day_followup, etc. This tells the email generator which position in the sequence this lead is at."
      },
      "typeVersion": 1
    },
    {
      "id": "ea639b73-f4ad-4581-8152-dc79955c145a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4256,
        -272
      ],
      "parameters": {
        "color": 5,
        "width": 1024,
        "height": 768,
        "content": "## 4 Email generated and send \n* AI models powering the email generation step. Same setup as the summary models use Gemini for best quality, OpenRouter as a free/alternative option.\n* Parses the 6-email JSON from the AI, enforces a 40 email/day hard cap check, cleans each email body (removes stray greetings/signatures from AI output), re-applies proper Hi [FirstName] + Best, Your Name formatting, and maps all 6 emails + subjects into clean item fields.\n* Generates a random delay of 30\u2013330 seconds between email generation and sending. This mimics human sending behavior and helps avoid spam detection patterns from predictable send intervals.\n* Sends Email 1 (the initial cold email) to the lead using their email address from the leads sheet. Uses the subject and body from Parse Email JSON. Attribution footer is disabled to keep emails clean."
      },
      "typeVersion": 1
    },
    {
      "id": "7077cb6f-0eca-4e1e-8fb6-60057f029d76",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5312,
        -272
      ],
      "parameters": {
        "color": 6,
        "width": 1008,
        "height": 768,
        "content": "## 5 All 6 email save in google sheet with followup date and after send email increate counter of daily send email\n\n* Increments the New Sent Today counter by +1 after each email is sent. This counter feeds back into the Read Daily Limit \u2192 Compare Limit gate on the next scheduler run.\n* Writes the updated New Sent Today count back to the \"Daily limit email sending\" sheet, matched by today's Date. Creates a new row if today's date doesn't exist yet.\n* The most comprehensive tracking node. Computes and logs: Last Email Sent, all 5 future follow-up dates (at +3, +5, +7, +15, +30 days), increments Sequence Step and Sent Count, sets per-email sent status (E1 Status \u2192 E6 Status), sets the overall Status to Pending or Completed, and logs delivery metadata.\n* Final write-back to the lead sheet. Updates the lead's row with: all 6 email bodies, the subject, all follow-up dates, sent statuses, Thread ID (for reply threading), Gmail message ID, and the overall Status/Note."
      },
      "typeVersion": 1
    },
    {
      "id": "6cc26dc7-8de0-4a18-8175-a4ef0d3a426e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        1104
      ],
      "parameters": {
        "color": 2,
        "width": 1056,
        "height": 592,
        "content": "\n## 1 Working hour check + Daily Limit check + Check how many already send\n* Fires the workflow automatically every minute. This is the heartbeat of the entire pipeline  it wakes up the system to check if a new lead needs to be processed and emailed. You can adjust the interval (e.g., every 5 minutes) based on how frequently you want leads picked up.\n\n* Protects your sender reputation by ensuring emails are only sent on weekdays between 9 AM \u2013 8 PM server time. If the workflow runs outside business hours or on weekends, it immediately stops execution by returning an empty array.\n\n* Reads a dedicated \"Daily limit email sending\" sheet that tracks how many new emails have been sent today. This gives you live control over your sending volume directly from the spreadsheet no need to edit the workflow.\n\n* Checks today's row in the limit sheet. If no row exists for today, it defaults to 10 emails. If a row exists, it compares New Sent Today against New Email Limit and sets allowSend: true or false.\n\nGates the entire pipeline. Only passes execution forward if allowSend === true. If the daily limit is hit, the flow stops here silently no crash, no error, just a clean exit.           "
      },
      "typeVersion": 1
    },
    {
      "id": "225ffd31-06a1-4b9a-ac5f-6962897524ed",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        976
      ],
      "parameters": {
        "color": 7,
        "width": 1296,
        "height": 1104,
        "content": "## 2 Real All emailand based on which email is pending to send that secquence active.\n\n* Reads all rows from the \"Email Sheet\" tab the same master leads database used in the enrichment workflow. Pulls every lead record including their email bodies, Thread IDs, send dates, and sent status columns.\n\n* Filters all leads down to only rows where Status equals pending (case-insensitive). Then picks exactly 1 lead at a time using .slice(0, 1) to process one follow-up per scheduler run  keeping sends controlled and human-paced.\n\n* Checks whether Email 2 Sent equals not sent. If true (not yet sent), it routes forward to the Email 2 sending path. If false (already sent), it cascades down to check Email 3 next creating a waterfall logic that finds exactly which follow-up is due.\n\n* Checks whether Email 3 sent equals not sent. Sits on the false branch of the Email 2 check only reached if Email 2 was already sent. Routes to Email 3 sending path if true, otherwise cascades to Email 4 check.\n\n* Checks whether Email 4 Sent equals not sent. Sits on the false branch of the Email 3 check. Routes to Email 4 sending if true, otherwise cascades to Email 5 check.\n\n* Checks whether Email 5 Sent equals not sent. The last IF in the waterfall. true branch goes to Email 5 sending path; false branch goes to Email 6 sending path since if 5 is already sent, Email 6 is the only one remaining."
      },
      "typeVersion": 1
    },
    {
      "id": "98369624-7a31-4972-83a5-dd07de293fde",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3136,
        976
      ],
      "parameters": {
        "color": 5,
        "width": 1552,
        "height": 1568,
        "content": "## 3 Check email time and fetch data and send \n\n* Captures the exact current timestamp at the moment each follow-up email is sent. This live timestamp is then written into the corresponding E2-Send-date&time through E6-Send-date&time columns in the sheet \u2014 giving you an accurate record of when each email actually went out.\n\n* Each Filter node checks whether the lead's scheduled send date for that email (E2-Send-date&time through E6-Send-date&time) is before the current live timestamp. If the scheduled date has passed, the lead passes through and the email sends. If not yet due, the item is dropped and nothing sends.\n\n* Sends the pre-generated Email 2, 3, 4, 5, 6 body as a reply to the original thread using the lead\n\n* Increments the Followup Sent Today counter by +1 after any follow-up email (2\u20136) is sent. All five email send nodes feed into this single counter node, keeping the daily follow-up tally accurate regardless of which email was sent.'s Gmail Message ID. Sends in the same thread as Email 1, so it appears as a natural follow-up in the lead's inbox rather than a new email."
      },
      "typeVersion": 1
    },
    {
      "id": "014e020d-eeff-4345-809f-a40912cf0338",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4896,
        1664
      ],
      "parameters": {
        "color": 6,
        "width": 784,
        "height": 592,
        "content": "## 4 Email followup count increase and update followup date\n\n* Increments the Followup Sent Today counter by +1 after any follow-up email (2\u20136) is sent. All five email send nodes feed into this single counter node, keeping the daily follow-up tally accurate regardless of which email was sent.\n\n* Writes the updated Followup Sent Today count back to the \"Daily limit email sending\" sheet, matched by today's Date. Keeps the follow-up counter in sync so Compare Limit1 can enforce the daily cap on the next scheduler run.      "
      },
      "typeVersion": 1
    },
    {
      "id": "fc25925b-f798-4581-82d9-34a58a58d741",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        2480
      ],
      "parameters": {
        "color": 3,
        "width": 432,
        "height": 448,
        "content": "## Reply check\n* Listens for new emails in your connected Gmail and triggers the workflow for each new message, giving near real-time reply detection for your outreach threads.  \n* Converts the raw Gmail payload into a compact reply object, extracting sender, thread ID, reply text, and status, and uses the In-Reply-To header to distinguish true replies from new inbound emails."
      },
      "typeVersion": 1
    },
    {
      "id": "0a6bdd58-2149-4605-8e89-f5a03d1838c0",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        2480
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 448,
        "content": "## status update and fetch lead data\n* Updates the main Email Sheet row matched by Thread ID with the latest reply info (Gmail ID, Thread ID, reply text, and reply status), so follow-up workflows know the lead has replied.  \n* Fetches the full lead record from the Email Sheet using Thread ID, bringing in all fields (name, email, website, sequence data, statuses) so archival and clean-up steps operate on complete, accurate data."
      },
      "typeVersion": 1
    },
    {
      "id": "e880080e-ab4f-43d9-aacf-3a73d377c797",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        2480
      ],
      "parameters": {
        "color": 5,
        "width": 432,
        "height": 448,
        "content": "## Manage Reply and data move to another sheet\n* Copies the full lead row, including all outreach and status fields, into a separate Reply Received sheet using Thread ID, giving you a dedicated, de-duplicated log of contacts who have replied.  \n* Deletes the original row from the main Email Sheet using the stored row_number, keeping the active outreach sheet clean and limited to leads who have not yet replied."
      },
      "typeVersion": 1
    },
    {
      "id": "9e2f6f8d-2679-492a-9b83-c4e773e67e15",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        3232
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 480,
        "content": "## Schedule and working-hours guard\n* Runs on a repeating schedule (every X minutes) and first checks the current server day and hour to decide if the workflow should proceed.  \n* Only continues to the next steps when it is **outside** regular working hours (weekends or before 9 AM / after 8 PM), so actions in this branch run exclusively off-hours.\n\n## Get row(s) in sheet\n* Reads rows from the main Email Sheet in Google Sheets once the off-hours condition is met, making the selected lead data available for whatever processing you run at night or on weekends (cleanup, exports, maintenance, etc.)."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "514a25ab-edb8-4c93-afa4-fc54d4273b06",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Read Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Read Leads1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Email 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Email 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 1": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          },
          {
            "node": "email tracker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 2": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 3": {
      "main": [
        [
          {
            "node": "Update Google Sheet1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 4": {
      "main": [
        [
          {
            "node": "Update Google Sheet2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 5": {
      "main": [
        [
          {
            "node": "Update Google Sheet3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 6": {
      "main": [
        [
          {
            "node": "Update Google Sheet4",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Email 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter2": {
      "main": [
        [
          {
            "node": "Email 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter3": {
      "main": [
        [
          {
            "node": "Email 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter4": {
      "main": [
        [
          {
            "node": "Email 6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get data": {
      "main": [
        [
          {
            "node": "Data move to another sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Done": {
      "main": [
        [
          {
            "node": "Get data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scheduler": {
      "main": [
        [
          {
            "node": "Working Hours Protection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Leads": {
      "main": [
        [
          {
            "node": "Lead Filter Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live Time 2": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live Time 3": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live Time 4": {
      "main": [
        [
          {
            "node": "Filter2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live Time 5": {
      "main": [
        [
          {
            "node": "Filter3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live Time 6": {
      "main": [
        [
          {
            "node": "Filter4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Leads1": {
      "main": [
        [
          {
            "node": "only pending contact filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Limit": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Reply Identifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Summary": {
      "main": [
        [
          {
            "node": "Update Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Services": {
      "main": [
        [
          {
            "node": "Read all data to make email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "email tracker": {
      "main": [
        [
          {
            "node": "Update Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Limit1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Email": {
      "main": [
        [
          {
            "node": "Parse Email JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sequence Logic": {
      "main": [
        [
          {
            "node": "Generate Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Summary": {
      "main": [
        [
          {
            "node": "Read Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Website Scraper": {
      "main": [
        [
          {
            "node": "Clean Website Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Email JSON": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Daily Limit": {
      "main": [
        [
          {
            "node": "Compare Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply Identifier": {
      "main": [
        [
          {
            "node": "Mark Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Working Hours Protection1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead Filter Logic": {
      "main": [
        [
          {
            "node": "Website Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Daily Limit1": {
      "main": [
        [
          {
            "node": "Compare Limit1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Run after working hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Website Data": {
      "main": [
        [
          {
            "node": "Generate Website Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Append or update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Email",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "OpenRouter Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Website Summary",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Run after working hours": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Website Summary": {
      "main": [
        [
          {
            "node": "Parse Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Website Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Working Hours Protection": {
      "main": [
        [
          {
            "node": "Read Daily Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 2 check sent or not": {
      "main": [
        [
          {
            "node": "Live Time 2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email 3 check sent or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 3 check sent or not": {
      "main": [
        [
          {
            "node": "Live Time 3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email 4 check sent or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 4 check sent or not": {
      "main": [
        [
          {
            "node": "Live Time 4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email 5 check sent or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email 5 check sent or not": {
      "main": [
        [
          {
            "node": "Live Time 5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Live Time 6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Working Hours Protection1": {
      "main": [
        [
          {
            "node": "Read Daily Limit1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data move to another sheet": {
      "main": [
        [
          {
            "node": "Reply manage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read all data to make email": {
      "main": [
        [
          {
            "node": "Sequence Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "only pending contact filter": {
      "main": [
        [
          {
            "node": "Email 2 check sent or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "email tracker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}