{
  "workflow": {
    "id": 10827,
    "name": "AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)",
    "views": 123,
    "recentViews": 0,
    "totalViews": 123,
    "createdAt": "2025-11-14T12:16:49.681Z",
    "description": "## Description\n Automate your AI-powered outreach and follow-up pipeline end-to-end with GPT-4o, Gmail, and Google Sheets. 🤖📬\n This workflow personalizes emails for each lead, manages follow-ups automatically, tracks client replies, and updates CRM records in real time — all from a single Google Sheet. Ideal for sales and growth teams looking to convert leads faster without manual effort. ⚙️🚀\n\n## What This Template Does\n 1️⃣ Starts manually when you click “Execute workflow.” 🕹️\n 2️⃣ Fetches all leads from the Google Sheet (sample_leads_50). 📊\n 3️⃣ Validates email format and filters only active (unbooked) leads. 🔍\n 4️⃣ Uses Azure OpenAI GPT-4o to generate short, personalized outreach emails in HTML. ✉️\n 5️⃣ Cleans and parses the AI output (subject + HTML body). 🧠\n 6️⃣ Sends the first outreach email via Gmail and stores its thread ID. 📤\n 7️⃣ Waits 24 hours, then checks for a client reply in the Gmail thread. ⏱️\n 8️⃣ If a positive reply is found → marks lead as BOOKED and updates in Sheets. ✅\n 9️⃣ If no reply → triggers a polite follow-up email, waits again 24 hours, and checks the thread a second time. 🔁\n 🔟 If a second reply is found → marks BOOKED and logs the client message.\n \n1️⃣1️⃣ If still no response → updates status to Declined in Google Sheets. ❌\n \n1️⃣2️⃣ Logs invalid or incomplete leads to a separate sheet for data cleanup. 🧾\n\n## Key Benefits\n ✅ Eliminates manual outreach and follow-up effort.\n ✅ Produces personalized, context-aware AI emails for every lead.\n ✅ Auto-tracks replies and updates CRM status with zero input.\n ✅ Prevents duplicate or repeated contact with booked clients.\n ✅ Keeps lead database synchronized and audit-ready.\n\n## Features\n- Google Sheets integration for dynamic lead retrieval and updates.\n- Regex-based email validation for clean data pipelines.\n- Azure OpenAI GPT-4o for contextual email writing.\n- Two-stage Gmail automation (initial + follow-up).\n- JavaScript parsing for AI output and Gmail thread analysis.\n- Automated 24-hour wait and recheck logic.\n- Conditional branches for Booked / Declined / Invalid outcomes.\n- End-to-end CRM synchronization without manual review.\n\n## Requirements\n- Google Sheets OAuth2 credentials with read/write access.\n- Azure OpenAI API key for GPT-4o model access.\n- Gmail OAuth2 credentials with send, read, modify permissions.\n\n## Environment Variables\n- GOOGLE_SHEET_LEADS_ID\n- GOOGLE_SHEET_OUTREACH_TAB_ID\n- AZURE_OPENAI_API_KEY\n- GMAIL_OAUTH_CLIENT_ID\n- GMAIL_OAUTH_SECRET\n\n## Target Audience\n 💼 Sales and Business Development teams automating outreach.\n 📈 Marketing and Growth teams running re-engagement campaigns.\n 🤖 Automation and RevOps teams integrating AI lead workflows.\n 💬 Freelancers and agencies managing large prospect lists.\n 📊 Operations teams maintaining CRM cleanliness and tracking.\n\n## Step-by-Step Setup Instructions\n 1️⃣ Connect your Google Sheets, Azure OpenAI, and Gmail credentials.\n 2️⃣ Set your Google Sheet ID and tab name (outreach automation).\n 3️⃣ Update the GPT-4o system prompt to match your tone and signature.\n 4️⃣ Verify column headers (Company Name, Email, Booking Status, etc.).\n 5️⃣ Test the email validation branch with sample data.\n 6️⃣ Run once manually to confirm Gmail thread creation and reply detection.\n 7️⃣ Confirm successful CRM updates in Google Sheets.\n 8️⃣ Activate for continuous lead outreach and follow-up automation. ✅\n",
    "workflow": {
      "id": "ZXu9x8swL0SiSX6C",
      "meta": {
        "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177"
      },
      "name": "AI-Powered Outreach & Follow-Up Automation (GPT-4o + Gmail + Google Sheets)",
      "tags": [],
      "nodes": [
        {
          "id": "0d069126-2ec1-43ac-8122-8d444f20c43b",
          "name": "When clicking ‘Execute workflow’",
          "type": "n8n-nodes-base.manualTrigger",
          "position": [
            -1232,
            304
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "461208fc-76f3-4882-a743-ca623b2ca29b",
          "name": "Configure GPT-4o Model",
          "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
          "position": [
            -16,
            832
          ],
          "parameters": {
            "model": "gpt-4o",
            "options": {}
          },
          "credentials": {
            "azureOpenAiApi": {
              "id": "credential-id",
              "name": "azureOpenAiApi Credential"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "a7137b17-4d59-4ce1-857c-03e15e590f70",
          "name": "Retrieve Lead Records from Google Sheets",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            -944,
            304
          ],
          "parameters": {
            "options": {},
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 46113423,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit#gid=46113423",
              "cachedResultName": "outreach automation"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit?usp=drivesdk",
              "cachedResultName": "sample_leads_50"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "credential-id",
              "name": "googleSheetsOAuth2Api Credential"
            }
          },
          "typeVersion": 4
        },
        {
          "id": "35a5d947-361f-40a9-9d57-efe5a2d462db",
          "name": "Validate Lead Data Payload",
          "type": "n8n-nodes-base.if",
          "position": [
            -688,
            304
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "e2adb005-2b3c-4d1e-8445-442df1fe925a",
                  "operator": {
                    "type": "string",
                    "operation": "notEmpty",
                    "singleValue": true
                  },
                  "leftValue": "=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test({{ $json.Email }})",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "f7aaf899-8eec-4178-bc3e-88985592be72",
          "name": "Filter for Booked Leads",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            304
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "b7913fcd-b70c-47fd-a926-d09a0086b40e",
                  "operator": {
                    "name": "filter.operator.equals",
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json[\"Booking Status\"] }}",
                  "rightValue": "BOOKED"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "35b45b6e-c542-49f7-aead-01c561647444",
          "name": "Generate Personalized Outreach Email (AI)",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            0,
            320
          ],
          "parameters": {
            "text": "=Generate a personalized outreach email in HTML format for this lead:\n\nCompany Name: {{ $json[\"Company Name\"] }}\nContact Person: {{ $json[\"Contact Person\"] }}\nJob Title: {{ $json[\"Job Title\"] }}\nIndustry: {{ $json[\"Industry\"] }}\nLocation: {{ $json[\"Location\"] }}\nLead Source: {{ $json[\"Lead Source\"] }}\nBooking Status: {{ $json[\"Booking Status\"] }}\n\nThe goal is to re-engage them and encourage a meeting booking.\nMention their company or industry naturally, and make it sound warm and specific.\nKeep it clean and mobile-friendly HTML (no styles or colors).\n",
            "options": {
              "systemMessage": "=You are an AI sales assistant that writes short, friendly, and professional B2B outreach emails in HTML format. \nEach email should be under 150 words and formatted using <p>, <b>, and <br> tags. \nAlways output both the Subject and the Email Body separately. \nDo not include <html> or <body> tags. \nThe tone should be polite, conversational, and slightly persuasive. \nEnd with a clear call to action (like booking a meeting) and sign off as “Saurabh Garg, Sales Team.”\nReturn your answer in JSON format with two keys:\n{\n  \"subject\": \"...\",\n  \"body_html\": \"...\"\n}\n"
            },
            "promptType": "define"
          },
          "typeVersion": 2.1
        },
        {
          "id": "eb74688d-5d4b-4a8f-ba88-03111715fb52",
          "name": "Parse AI Email Output (JavaScript)",
          "type": "n8n-nodes-base.code",
          "position": [
            448,
            320
          ],
          "parameters": {
            "jsCode": "// Loop through AI results and clean up JSON output\nreturn items.map(item => {\n  let raw = item.json.output || '';\n  \n  // Remove code block markers like ```json or ```\n  raw = raw.replace(/```json|```/g, '').trim();\n\n  // Parse JSON safely\n  let parsed;\n  try {\n    parsed = JSON.parse(raw);\n  } catch (e) {\n    parsed = { subject: \"No Subject\", body_html: \"Error parsing AI output.\" };\n  }\n\n  return { json: parsed };\n});\n"
          },
          "typeVersion": 2
        },
        {
          "id": "5e6c825b-1739-411b-b7b5-291937596a9f",
          "name": "Send Initial Outreach Email via Gmail",
          "type": "n8n-nodes-base.gmail",
          "position": [
            768,
            320
          ],
          "webhookId": "0c82c299-6938-42ed-bda6-5007d79af34f",
          "parameters": {
            "sendTo": "={{ $('Retrieve Lead Records from Google Sheets').item.json.Email }}",
            "message": "={{ $json.body_html }}",
            "options": {},
            "subject": "={{ $json.subject }}"
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "credential-id",
              "name": "gmailOAuth2 Credential"
            }
          },
          "typeVersion": 2.1
        },
        {
          "id": "540211f0-f006-4845-8fed-02d41d9fc634",
          "name": "Wait Before Thread Check (24 hr)",
          "type": "n8n-nodes-base.wait",
          "position": [
            1040,
            320
          ],
          "webhookId": "7475fece-4562-46b3-a702-7a5c5fe88266",
          "parameters": {
            "amount": 24
          },
          "typeVersion": 1
        },
        {
          "id": "537915a6-88d4-4353-b5f7-d0c2424119ce",
          "name": "Fetch Sent Email Thread from Gmail",
          "type": "n8n-nodes-base.gmail",
          "position": [
            1312,
            320
          ],
          "webhookId": "ffb3a844-8c8b-4f17-a6e9-98e0371f4214",
          "parameters": {
            "options": {},
            "resource": "thread",
            "threadId": "={{ $('Send Initial Outreach Email via Gmail').item.json.threadId }}",
            "operation": "get"
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "credential-id",
              "name": "gmailOAuth2 Credential"
            }
          },
          "typeVersion": 2.1
        },
        {
          "id": "80bbd250-f9ab-46de-9ad6-b3ab8e7f3233",
          "name": "Check for Client Reply (If Condition)",
          "type": "n8n-nodes-base.if",
          "position": [
            1568,
            320
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "4a6d1310-29be-4559-8bea-afe8fe0f0f30",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{$json[\"messages\"][1][\"snippet\"]}}",
                  "rightValue": "Yes"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "5366521f-fc42-4907-9e1e-29994458578c",
          "name": "Extract Reply Details (JavaScript)",
          "type": "n8n-nodes-base.code",
          "position": [
            1920,
            48
          ],
          "parameters": {
            "jsCode": "// Loop through all email threads where reply = true\nreturn items.map(item => {\n  const data = item.json;\n\n  // Extract the reply message (second email in thread)\n  const reply = data.messages?.[1];\n  const original = data.messages?.[0];\n\n  // Clean the reply text (remove quoted text from Gmail)\n  let clientMessage = reply?.snippet || \"\";\n  clientMessage = clientMessage.split(\"On Wed\")[0].trim(); // basic cleanup example\n\n  // Prepare clean structured output\n  return {\n    json: {\n      Email: reply?.From?.match(/<(.+?)>/)?.[1] || reply?.From || \"\",\n      ContactPerson: reply?.From?.split(\"<\")[0].trim() || \"\",\n      ThreadID: reply?.threadId || data.id || \"\",\n      Subject: reply?.Subject || original?.Subject || \"\",\n      ClientMessage: clientMessage,\n      BookingStatus: \"BOOKED\",\n      LastUpdated: new Date().toISOString()\n    }\n  };\n});\n"
          },
          "typeVersion": 2
        },
        {
          "id": "dfc24134-8604-47d3-8932-41df52d14620",
          "name": "Update Lead Record – Booked (Google Sheets)",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            2224,
            48
          ],
          "parameters": {
            "columns": {
              "value": {
                "Email": "={{ $json.Email }}",
                "ThreadID": "={{ $json.ThreadID }}",
                "LastUpdated": "={{ $json.LastUpdated }}",
                "ClientMessage": "={{ $json.ClientMessage }}",
                "Booking Status": "={{ $json.BookingStatus }}"
              },
              "schema": [
                {
                  "id": "Company Name",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Company Name",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Contact Person",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Contact Person",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Job Title",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Job Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Email",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Email",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Phone",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Phone",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Industry",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Industry",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Location",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Location",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Lead Source",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Lead Source",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Booking Status",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Booking Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ClientMessage",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "ClientMessage",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "LastUpdated",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "LastUpdated",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ThreadID",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "ThreadID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "Email"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "appendOrUpdate",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 46113423,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit#gid=46113423",
              "cachedResultName": "outreach automation"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit?usp=drivesdk",
              "cachedResultName": "sample_leads_50"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "credential-id",
              "name": "googleSheetsOAuth2Api Credential"
            }
          },
          "typeVersion": 4.6
        },
        {
          "id": "bf3a2ee4-1bbc-445e-8c3f-2119dd16e95d",
          "name": "Wait Before Second Thread Check (24 hr)",
          "type": "n8n-nodes-base.wait",
          "position": [
            2224,
            544
          ],
          "webhookId": "7475fece-4562-46b3-a702-7a5c5fe88266",
          "parameters": {
            "unit": "seconds",
            "amount": 24
          },
          "typeVersion": 1
        },
        {
          "id": "6ac3e8ce-2dac-4953-97d2-3221e3d5be82",
          "name": "Send Second Follow-Up Email via Gmail",
          "type": "n8n-nodes-base.gmail",
          "position": [
            1888,
            544
          ],
          "webhookId": "0c82c299-6938-42ed-bda6-5007d79af34f",
          "parameters": {
            "sendTo": "={{ $json.messages[0].To }}",
            "message": "=<p>Hi {{ $json[\"Contact Person\"] || \"there\" }},</p>\n\n<p>I wanted to quickly follow up on my previous email.  \nI understand things can get busy, so just checking if you had a chance to review my message.</p>\n\n<p>I’d love to schedule a short chat to explore how we could support <b> {{ $('Retrieve Lead Records from Google Sheets').item.json['Contact Person'] }}</b> in your upcoming initiatives.</p>\n\n<p>If now’s not a good time, no worries — just let me know when it might be better for you.</p>\n\n<p>Best regards,<br>\n<b>Saurabh Garg</b><br>\nSales Team</p>\n",
            "options": {},
            "subject": "Still open to a quick chat."
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "credential-id",
              "name": "gmailOAuth2 Credential"
            }
          },
          "typeVersion": 2.1
        },
        {
          "id": "7b8c0b58-0aba-4b63-b690-6efee3c35d52",
          "name": "Fetch Follow-Up Thread from Gmail",
          "type": "n8n-nodes-base.gmail",
          "position": [
            2512,
            544
          ],
          "webhookId": "ffb3a844-8c8b-4f17-a6e9-98e0371f4214",
          "parameters": {
            "options": {},
            "resource": "thread",
            "threadId": "={{ $json.threadId }}",
            "operation": "get"
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "credential-id",
              "name": "gmailOAuth2 Credential"
            }
          },
          "typeVersion": 2.1
        },
        {
          "id": "9b0df250-edcd-4963-a14d-7c332ca2ba78",
          "name": "Check for Second Reply (If Condition)",
          "type": "n8n-nodes-base.if",
          "position": [
            2784,
            544
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "4a6d1310-29be-4559-8bea-afe8fe0f0f30",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{$json[\"messages\"][1][\"snippet\"]}}",
                  "rightValue": "Yes"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "54350e4a-92e1-445e-aa9a-05ca7b2bc015",
          "name": "Update Lead Status to Declined (Set Node)",
          "type": "n8n-nodes-base.set",
          "position": [
            3200,
            800
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "eddf188b-c756-4cd3-b5ac-3bdbce3a3049",
                  "name": "Booking Status",
                  "type": "string",
                  "value": "Declined"
                },
                {
                  "id": "df707470-60d7-4024-a998-8b7ba3c93283",
                  "name": "Email",
                  "type": "string",
                  "value": "={{ $json.messages[0].To }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "cb100856-ab8b-42d8-a899-8273a21d2498",
          "name": "Update Lead Record – Declined (Google Sheets)",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            3424,
            800
          ],
          "parameters": {
            "columns": {
              "value": {
                "Email": "={{ $json.Email }}",
                "Booking Status": "={{ $json[\"Booking Status\"] }}"
              },
              "schema": [
                {
                  "id": "Company Name",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Company Name",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Contact Person",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Contact Person",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Job Title",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Job Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Email",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Email",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Phone",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Phone",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Industry",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Industry",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Location",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Location",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Lead Source",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Lead Source",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Booking Status",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Booking Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ClientMessage",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "ClientMessage",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "LastUpdated",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "LastUpdated",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ThreadID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "ThreadID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "Email"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "appendOrUpdate",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 46113423,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit#gid=46113423",
              "cachedResultName": "outreach automation"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit?usp=drivesdk",
              "cachedResultName": "sample_leads_50"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "credential-id",
              "name": "googleSheetsOAuth2Api Credential"
            }
          },
          "typeVersion": 4.6
        },
        {
          "id": "392fd316-f1e0-4de5-aea6-5fb872b1c767",
          "name": "Update Lead Record – Replied (Google Sheets)",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            3440,
            240
          ],
          "parameters": {
            "columns": {
              "value": {
                "Email": "={{ $json.Email }}",
                "ThreadID": "={{ $json.ThreadID }}",
                "LastUpdated": "={{ $json.LastUpdated }}",
                "ClientMessage": "={{ $json.ClientMessage }}",
                "Booking Status": "={{ $json.BookingStatus }}"
              },
              "schema": [
                {
                  "id": "Company Name",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Company Name",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Contact Person",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Contact Person",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Job Title",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Job Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Email",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Email",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Phone",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Phone",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Industry",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Industry",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Location",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Location",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Lead Source",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Lead Source",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Booking Status",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Booking Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ClientMessage",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "ClientMessage",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "LastUpdated",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "LastUpdated",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "ThreadID",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "ThreadID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "Email"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "appendOrUpdate",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 46113423,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit#gid=46113423",
              "cachedResultName": "outreach automation"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit?usp=drivesdk",
              "cachedResultName": "sample_leads_50"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "credential-id",
              "name": "googleSheetsOAuth2Api Credential"
            }
          },
          "typeVersion": 4.6
        },
        {
          "id": "6da18860-30f8-476a-84fc-b10084fc6f4e",
          "name": "Extract Second Reply Details (JavaScript)",
          "type": "n8n-nodes-base.code",
          "position": [
            3168,
            240
          ],
          "parameters": {
            "jsCode": "// Loop through all email threads where reply = true\nreturn items.map(item => {\n  const data = item.json;\n\n  // Extract the reply message (second email in thread)\n  const reply = data.messages?.[1];\n  const original = data.messages?.[0];\n\n  // Clean the reply text (remove quoted text from Gmail)\n  let clientMessage = reply?.snippet || \"\";\n  clientMessage = clientMessage.split(\"On Wed\")[0].trim(); // basic cleanup example\n\n  // Prepare clean structured output\n  return {\n    json: {\n      Email: reply?.From?.match(/<(.+?)>/)?.[1] || reply?.From || \"\",\n      ContactPerson: reply?.From?.split(\"<\")[0].trim() || \"\",\n      ThreadID: reply?.threadId || data.id || \"\",\n      Subject: reply?.Subject || original?.Subject || \"\",\n      ClientMessage: clientMessage,\n      BookingStatus: \"BOOKED\",\n      LastUpdated: new Date().toISOString()\n    }\n  };\n});\n"
          },
          "typeVersion": 2
        },
        {
          "id": "3672ff59-f78b-42c3-b5d4-c311bd12bc09",
          "name": "Log Invalid Leads to Google Sheets",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            -352,
            784
          ],
          "parameters": {
            "operation": "append",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": "",
              "cachedResultUrl": "",
              "cachedResultName": ""
            },
            "documentId": {
              "__rl": true,
              "mode": "url",
              "value": ""
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "credential-id",
              "name": "googleSheetsOAuth2Api Credential"
            }
          },
          "typeVersion": 4.6
        },
        {
          "id": "fa1d3fb9-4316-473c-a98d-d86688288bc1",
          "name": "Sticky Note",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -2176,
            -592
          ],
          "parameters": {
            "width": 976,
            "height": 544,
            "content": "## 🤖 AI-Powered Outreach & Follow-Up Automation (GPT-4o + Gmail + Google Sheets)\nAutomates personalized outreach, follow-ups, and lead status management directly from Google Sheets using GPT-4o and Gmail.\n\n### 🔹 Core Workflow Summary\n1️⃣ Fetches leads from Google Sheets  \n2️⃣ Validates lead data and filters “BOOKED” prospects  \n3️⃣ Generates personalized outreach emails using GPT-4o  \n4️⃣ Sends emails via Gmail and monitors for replies  \n5️⃣ If no reply → Sends automated follow-up  \n6️⃣ Updates lead booking status automatically in Google Sheets\n\n### 🔹 Tools & Integrations\n- Google Sheets → Lead database  \n- Azure OpenAI (GPT-4o) → Email personalization  \n- Gmail → Message delivery + reply tracking  \n- JavaScript → Data cleanup and formatting  \n- Wait nodes → Timing for recheck and follow-ups  \n\n### 🔹 Use Case\nIdeal for sales teams handling cold/warm leads who need to automate email outreach, monitor engagement, and maintain clean CRM updates — all without manual effort.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "396639c9-7361-4452-9d84-3d979e7823fb",
          "name": "Sticky Note1",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -1008,
            0
          ],
          "parameters": {
            "color": 7,
            "height": 512,
            "content": "## 🧾 Retrieve Lead Records from Google Sheets  \nPulls all lead data from the specified Google Sheet (“sample_leads_50”).  \nIncludes fields like company name, contact person, job title, industry, and booking status.  \nActs as the entry point for the outreach campaign.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "7c0917c7-bbb8-493c-b795-7d0cbef9de56",
          "name": "Sticky Note2",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -752,
            48
          ],
          "parameters": {
            "color": 7,
            "height": 448,
            "content": "## 🧩 Validate Lead Data Payload  \nEnsures that each record has a valid email address format using regex.  \nIf valid → proceeds to filtering.  \nIf invalid → logs details to the “Invalid Leads” sheet.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "e4fd669c-4099-4fb2-ac1a-f8b50a0d957c",
          "name": "Sticky Note3",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -464,
            64
          ],
          "parameters": {
            "color": 7,
            "height": 432,
            "content": "## 🎯 Filter for Booked Leads  \nSeparates leads based on the “Booking Status” column.  \nOnly unbooked or open leads proceed to email generation.  \nPrevents re-contacting leads already converted or declined.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "91004249-8604-423c-9173-1510532b4c32",
          "name": "Sticky Note4",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -80,
            576
          ],
          "parameters": {
            "color": 7,
            "height": 416,
            "content": "## ⚙️ Configure GPT-4o Model  \nLinks Azure OpenAI GPT-4o model for personalized email generation.  \nEnsures each message is contextually relevant, professional, and concise.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "36b8dd72-9f4a-4f7a-b42f-16b917b7a7f7",
          "name": "Sticky Note5",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -32,
            -16
          ],
          "parameters": {
            "color": 7,
            "width": 288,
            "height": 528,
            "content": "## ✉️ Generate Personalized Outreach Email (AI)  \nGPT-4o creates customized outreach messages for each lead using name, industry, and lead source context.  \nOutput includes:\n- “subject” → catchy and relevant  \n- “body_html” → mobile-friendly HTML with <p> and <b> tags  \nEnds with a polite CTA signed as “Saurabh Garg, Sales Team.”\n"
          },
          "typeVersion": 1
        },
        {
          "id": "48df91f8-b98d-47ca-9ae1-7b18883531ea",
          "name": "Sticky Note6",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            384,
            64
          ],
          "parameters": {
            "color": 7,
            "height": 432,
            "content": "## 🧠 Parse AI Email Output (JavaScript)  \nCleans GPT-4o output by removing code blocks and parsing JSON safely.  \nEnsures valid `subject` and `body_html` fields before email dispatch.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "ea0c948b-46f5-4439-811f-b109d9f13b3a",
          "name": "Sticky Note7",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            704,
            64
          ],
          "parameters": {
            "color": 7,
            "height": 464,
            "content": "## 📤 Send Initial Outreach Email via Gmail  \nDelivers the AI-generated email to the lead’s email address.  \nUses Gmail OAuth for secure delivery.  \nStores Gmail thread IDs for tracking replies.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "0d840272-78c6-4676-9e22-e80ed0c51c85",
          "name": "Sticky Note8",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            976,
            96
          ],
          "parameters": {
            "color": 7,
            "height": 432,
            "content": "## ⏱️ Wait Before Thread Check  \nIntroduces a controlled delay (e.g., 24 hours) before checking if the lead has replied.  \nEnsures enough time for recipients to respond naturally.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "d4508106-1715-400b-a4c4-1ae422647747",
          "name": "Sticky Note9",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            1232,
            144
          ],
          "parameters": {
            "color": 7,
            "width": 512,
            "height": 400,
            "content": "## 🧩 Check for Client Reply  \nFetches Gmail thread data to see if a response was received.  \nIf the message contains any positive snippet or “Yes”, marks lead as “BOOKED.”  \nIf not, moves to follow-up sequence.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "d4b7826a-4119-4638-989d-7ced0c23cfb9",
          "name": "Sticky Note10",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            1856,
            -224
          ],
          "parameters": {
            "color": 7,
            "height": 464,
            "content": "## 📬 Extract Reply Details (JavaScript)  \nParses client reply text and extracts useful data (email, message, thread ID).  \nSanitizes Gmail snippets by removing quoted text.  \nStores results for CRM update.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "cfb1aeb6-0030-45a8-aba9-8473abcbb64b",
          "name": "Sticky Note11",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            2160,
            -256
          ],
          "parameters": {
            "color": 7,
            "height": 496,
            "content": "## ✅ Update Lead Record – Booked (Google Sheets)  \nUpdates the lead record in the main sheet with “BOOKED” status, reply message, and timestamp.  \nMaintains real-time CRM hygiene.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "89803f2c-06ef-4ff5-aaab-37a21b4e3069",
          "name": "Sticky Note12",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            1824,
            272
          ],
          "parameters": {
            "color": 7,
            "height": 480,
            "content": "## 🔁 Send Second Follow-Up Email via Gmail  \nIf no reply after the first email, sends a polite follow-up after 24 hours.  \nTone remains professional and friendly, encouraging response without pressure.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "ef74ec33-bd55-4f50-baa8-7b8ee5b28953",
          "name": "Sticky Note13",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            2160,
            304
          ],
          "parameters": {
            "color": 7,
            "width": 208,
            "height": 432,
            "content": "## ⏱️ Wait Before Thread Check  \nIntroduces a controlled delay (e.g., 24 hours) before checking if the lead has replied.  \nEnsures enough time for recipients to respond naturally.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "1fc0aee3-436a-4048-a8c7-1961a47ffec4",
          "name": "Sticky Note14",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            2432,
            336
          ],
          "parameters": {
            "color": 7,
            "height": 416,
            "content": "## 📨 Fetch Follow-Up Thread from Gmail  \nRetrieves the Gmail thread of the follow-up message to check if a new reply arrived.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "67182b47-ddba-47d2-be7c-ea3ad548d7a1",
          "name": "Sticky Note15",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            2720,
            320
          ],
          "parameters": {
            "color": 7,
            "height": 432,
            "content": "## 🔍 Check for Second Reply  \nInspects the follow-up thread for responses.  \nBranches into “Reply Found” (update as BOOKED) or “No Reply” (mark as Declined).\n"
          },
          "typeVersion": 1
        },
        {
          "id": "833511eb-4e42-484c-ad8a-8bf59814b5a2",
          "name": "Sticky Note16",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            3088,
            608
          ],
          "parameters": {
            "color": 7,
            "width": 560,
            "height": 384,
            "content": "## ❌ Update Lead Record – Declined (Google Sheets)  \nIf no response after follow-up, updates status to “Declined.”  \nPrevents repeated outreach and keeps CRM clean.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "99ffdfe2-e395-4004-acf7-3dfc51d5cfe6",
          "name": "Sticky Note17",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            3104,
            0
          ],
          "parameters": {
            "color": 7,
            "height": 432,
            "content": "## 🧾 Extract Second Reply Details (JavaScript)  \nHandles cases where the client replied to the follow-up instead of the first message.  \nParses, cleans, and prepares structured JSON data for CRM update.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "6570873f-5445-49cb-951d-9aa2014df10c",
          "name": "Sticky Note18",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            3376,
            -32
          ],
          "parameters": {
            "color": 7,
            "height": 496,
            "content": "## ✅ Update Lead Record – Booked (Google Sheets)  \nUpdates the lead record in the main sheet with “BOOKED” status, reply message, and timestamp.  \nMaintains real-time CRM hygiene.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "22fed90c-0601-421b-9079-3ca3652b1f9a",
          "name": "Sticky Note19",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -416,
            560
          ],
          "parameters": {
            "color": 7,
            "height": 464,
            "content": "## ⚠️ Log Invalid Leads to Google Sheets  \nStores invalid or incomplete entries (missing emails, broken data) in a separate sheet.  \nUseful for data quality improvement.\n"
          },
          "typeVersion": 1
        }
      ],
      "active": false,
      "pinData": {},
      "settings": {
        "executionOrder": "v1"
      },
      "versionId": "cc9e6722-fa25-48dc-b8cc-9060afd4be2e",
      "connections": {
        "Configure GPT-4o Model": {
          "ai_languageModel": [
            [
              {
                "node": "Generate Personalized Outreach Email (AI)",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "Filter for Booked Leads": {
          "main": [
            [],
            [
              {
                "node": "Generate Personalized Outreach Email (AI)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Validate Lead Data Payload": {
          "main": [
            [
              {
                "node": "Filter for Booked Leads",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Log Invalid Leads to Google Sheets",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Wait Before Thread Check (24 hr)": {
          "main": [
            [
              {
                "node": "Fetch Sent Email Thread from Gmail",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Fetch Follow-Up Thread from Gmail": {
          "main": [
            [
              {
                "node": "Check for Second Reply (If Condition)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract Reply Details (JavaScript)": {
          "main": [
            [
              {
                "node": "Update Lead Record – Booked (Google Sheets)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Fetch Sent Email Thread from Gmail": {
          "main": [
            [
              {
                "node": "Check for Client Reply (If Condition)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Parse AI Email Output (JavaScript)": {
          "main": [
            [
              {
                "node": "Send Initial Outreach Email via Gmail",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "When clicking ‘Execute workflow’": {
          "main": [
            [
              {
                "node": "Retrieve Lead Records from Google Sheets",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Check for Client Reply (If Condition)": {
          "main": [
            [
              {
                "node": "Extract Reply Details (JavaScript)",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Send Second Follow-Up Email via Gmail",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Check for Second Reply (If Condition)": {
          "main": [
            [
              {
                "node": "Extract Second Reply Details (JavaScript)",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Update Lead Status to Declined (Set Node)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send Initial Outreach Email via Gmail": {
          "main": [
            [
              {
                "node": "Wait Before Thread Check (24 hr)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send Second Follow-Up Email via Gmail": {
          "main": [
            [
              {
                "node": "Wait Before Second Thread Check (24 hr)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Wait Before Second Thread Check (24 hr)": {
          "main": [
            [
              {
                "node": "Fetch Follow-Up Thread from Gmail",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Retrieve Lead Records from Google Sheets": {
          "main": [
            [
              {
                "node": "Validate Lead Data Payload",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract Second Reply Details (JavaScript)": {
          "main": [
            [
              {
                "node": "Update Lead Record – Replied (Google Sheets)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Generate Personalized Outreach Email (AI)": {
          "main": [
            [
              {
                "node": "Parse AI Email Output (JavaScript)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Update Lead Status to Declined (Set Node)": {
          "main": [
            [
              {
                "node": "Update Lead Record – Declined (Google Sheets)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    },
    "lastUpdatedBy": 1,
    "workflowInfo": {
      "nodeCount": 42,
      "nodeTypes": {
        "n8n-nodes-base.if": {
          "count": 4
        },
        "n8n-nodes-base.set": {
          "count": 1
        },
        "n8n-nodes-base.code": {
          "count": 3
        },
        "n8n-nodes-base.wait": {
          "count": 2
        },
        "n8n-nodes-base.gmail": {
          "count": 4
        },
        "n8n-nodes-base.stickyNote": {
          "count": 20
        },
        "n8n-nodes-base.googleSheets": {
          "count": 5
        },
        "n8n-nodes-base.manualTrigger": {
          "count": 1
        },
        "@n8n/n8n-nodes-langchain.agent": {
          "count": 1
        },
        "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi": {
          "count": 1
        }
      }
    },
    "status": "published",
    "user": {
      "name": "Rahul Joshi",
      "username": "rahul08",
      "bio": "Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.\n\n",
      "verified": true,
      "links": [
        "https://www.linkedin.com/in/callrahul/"
      ],
      "avatar": "https://gravatar.com/avatar/b6cf57822463143589b36ada06fbf6cb1509223a740fae3160b28f1ce41ccc12?r=pg&d=retro&size=200"
    },
    "nodes": [
      {
        "id": 18,
        "icon": "file:googleSheets.svg",
        "name": "n8n-nodes-base.googleSheets",
        "codex": {
          "data": {
            "alias": [
              "CSV",
              "Sheet",
              "Spreadsheet",
              "GS"
            ],
            "resources": {
              "generic": [
                {
                  "url": "https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/",
                  "icon": "❤️",
                  "label": "Love at first sight: Ricardo’s n8n journey"
                },
                {
                  "url": "https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/",
                  "icon": "🧬",
                  "label": "Why business process automation with n8n can change your daily life"
                },
                {
                  "url": "https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/",
                  "icon": "🧾",
                  "label": "Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"
                },
                {
                  "url": "https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/",
                  "icon": "🎫",
                  "label": "Supercharging your conference registration process with n8n"
                },
                {
                  "url": "https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/",
                  "icon": "⏲",
                  "label": "Creating triggers for n8n workflows using polling"
                },
                {
                  "url": "https://n8n.io/blog/no-code-ecommerce-workflow-automations/",
                  "icon": "store",
                  "label": "6 e-commerce workflows to power up your Shopify s"
                },
                {
                  "url": "https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/",
                  "icon": "📈",
                  "label": "Migrating Community Metrics to Orbit using n8n"
                },
                {
                  "url": "https://n8n.io/blog/automate-google-apps-for-productivity/",
                  "icon": "💡",
                  "label": "15 Google apps you can combine and automate to increase productivity"
                },
                {
                  "url": "https://n8n.io/blog/your-business-doesnt-need-you-to-operate/",
                  "icon": " 🖥️",
                  "label": "Hey founders! Your business doesn't need you to operate"
                },
                {
                  "url": "https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/",
                  "icon": "🍔",
                  "label": "How Honest Burgers Use Automation to Save $100k per year"
                },
                {
                  "url": "https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/",
                  "icon": "💻",
                  "label": "How a digital strategist uses n8n for online marketing"
                },
                {
                  "url": "https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/",
                  "icon": "🧠",
                  "label": "Why this Product Manager loves workflow automation with n8n"
                },
                {
                  "url": "https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/",
                  "icon": "🙌",
                  "label": "Sending Automated Congratulations with Google Sheets, Twilio, and n8n "
                },
                {
                  "url": "https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/",
                  "icon": "📈",
                  "label": "How a Membership Development Manager automates his work and investments"
                },
                {
                  "url": "https://n8n.io/blog/aws-workflow-automation/",
                  "label": "7 no-code workflow automations for Amazon Web Services"
                }
              ],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"
                }
              ],
              "credentialDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"
                }
              ]
            },
            "categories": [
              "Data & Storage",
              "Productivity"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0"
          }
        },
        "group": "[\"input\",\"output\"]",
        "defaults": {
          "name": "Google Sheets"
        },
        "iconData": {
          "type": "file",
          "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNS42OSAxIDUyIDE3LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwIDAgMSA0OC4yOTMgNjBIMTIuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMtMS4wNzhBMy42NyAzLjY3IDAgMCAxIDkgNTYuMzEyVjQuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTIuNzA3IDF6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM1LjY5IDEgNTIgMTcuMjI1SDM5LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzkuMjExIDE3LjIyNSA1MiAyMi40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIwLjEyIDMxLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMS42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzEuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNC42OSAwIDUxIDE2LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwIDAgMSA0Ny4yOTMgNTlIMTEuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMtMS4wNzhBMy42NyAzLjY3IDAgMCAxIDggNTUuMzEyVjMuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTEuNzA3IDB6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM0LjY5IDAgNTEgMTYuMjI1SDM4LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzguMjExIDE2LjIyNSA1MSAyMS40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE5LjEyIDMwLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMC42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzAuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="
        },
        "displayName": "Google Sheets",
        "typeVersion": 5,
        "nodeCategories": [
          {
            "id": 3,
            "name": "Data & Storage"
          },
          {
            "id": 4,
            "name": "Productivity"
          }
        ]
      },
      {
        "id": 20,
        "icon": "fa:map-signs",
        "name": "n8n-nodes-base.if",
        "codex": {
          "data": {
            "alias": [
              "Router",
              "Filter",
              "Condition",
              "Logic",
              "Boolean",
              "Branch"
            ],
            "details": "The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.",
            "resources": {
              "generic": [
                {
                  "url": "https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/",
                  "icon": "🏭",
                  "label": "Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"
                },
                {
                  "url": "https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/",
                  "icon": "☀️",
                  "label": "2021: The Year to Automate the New You with n8n"
                },
                {
                  "url": "https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/",
                  "icon": "🧬",
                  "label": "Why business process automation with n8n can change your daily life"
                },
                {
                  "url": "https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/",
                  "icon": "🤬",
                  "label": "Create a toxic language detector for Telegram in 4 step"
                },
                {
                  "url": "https://n8n.io/blog/no-code-ecommerce-workflow-automations/",
                  "icon": "store",
                  "label": "6 e-commerce workflows to power up your Shopify s"
                },
                {
                  "url": "https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/",
                  "icon": "🔗",
                  "label": "How to build a low-code, self-hosted URL shortener in 3 steps"
                },
                {
                  "url": "https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/",
                  "icon": "⚙️",
                  "label": "Automate your data processing pipeline in 9 steps"
                },
                {
                  "url": "https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/",
                  "icon": "👥",
                  "label": "How to get started with CRM automation (with 3 no-code workflow ideas"
                },
                {
                  "url": "https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/",
                  "icon": "⚡️",
                  "label": "5 tasks you can automate with the new Notion API "
                },
                {
                  "url": "https://n8n.io/blog/automate-google-apps-for-productivity/",
                  "icon": "💡",
                  "label": "15 Google apps you can combine and automate to increase productivity"
                },
                {
                  "url": "https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/",
                  "icon": "🏷️",
                  "label": "How to automatically manage contributions to open-source projects"
                },
                {
                  "url": "https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/",
                  "icon": " 🕸️",
                  "label": "How uProc scraped a multi-page website with a low-code workflow"
                },
                {
                  "url": "https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/",
                  "icon": "🤖",
                  "label": "5 workflow automations for Mattermost that we love at n8n"
                },
                {
                  "url": "https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/",
                  "icon": "🧠",
                  "label": "Why this Product Manager loves workflow automation with n8n"
                },
                {
                  "url": "https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/",
                  "icon": "🙌",
                  "label": "Sending Automated Congratulations with Google Sheets, Twilio, and n8n "
                },
                {
                  "url": "https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/",
                  "icon": "🎡",
                  "label": "How to set up a no-code CI/CD pipeline with GitHub and TravisCI"
                },
                {
                  "url": "https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/",
                  "icon": "🎖",
                  "label": "Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"
                },
                {
                  "url": "https://n8n.io/blog/aws-workflow-automation/",
                  "label": "7 no-code workflow automations for Amazon Web Services"
                }
              ],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"
                }
              ]
            },
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Flow"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "If",
          "color": "#408000"
        },
        "iconData": {
          "icon": "map-signs",
          "type": "icon"
        },
        "displayName": "If",
        "typeVersion": 2,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 38,
        "icon": "fa:pen",
        "name": "n8n-nodes-base.set",
        "codex": {
          "data": {
            "alias": [
              "Set",
              "JS",
              "JSON",
              "Filter",
              "Transform",
              "Map"
            ],
            "resources": {
              "generic": [
                {
                  "url": "https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/",
                  "icon": "🏭",
                  "label": "Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"
                },
                {
                  "url": "https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/",
                  "icon": "☀️",
                  "label": "2021: The Year to Automate the New You with n8n"
                },
                {
                  "url": "https://n8n.io/blog/automatically-pulling-and-visualizing-data-with-n8n/",
                  "icon": "📈",
                  "label": "Automatically pulling and visualizing data with n8n"
                },
                {
                  "url": "https://n8n.io/blog/database-monitoring-and-alerting-with-n8n/",
                  "icon": "📡",
                  "label": "Database Monitoring and Alerting with n8n"
                },
                {
                  "url": "https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/",
                  "icon": "🧾",
                  "label": "Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"
                },
                {
                  "url": "https://n8n.io/blog/no-code-ecommerce-workflow-automations/",
                  "icon": "store",
                  "label": "6 e-commerce workflows to power up your Shopify s"
                },
                {
                  "url": "https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/",
                  "icon": "🔗",
                  "label": "How to build a low-code, self-hosted URL shortener in 3 steps"
                },
                {
                  "url": "https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/",
                  "icon": "⚙️",
                  "label": "Automate your data processing pipeline in 9 steps"
                },
                {
                  "url": "https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/",
                  "icon": "👥",
                  "label": "How to get started with CRM automation (with 3 no-code workflow ideas"
                },
                {
                  "url": "https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/",
                  "icon": "⚡️",
                  "label": "5 tasks you can automate with the new Notion API "
                },
                {
                  "url": "https://n8n.io/blog/automate-google-apps-for-productivity/",
                  "icon": "💡",
                  "label": "15 Google apps you can combine and automate to increase productivity"
                },
                {
                  "url": "https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/",
                  "icon": " 🕸️",
                  "label": "How uProc scraped a multi-page website with a low-code workflow"
                },
                {
                  "url": "https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/",
                  "icon": "📱",
                  "label": "Building an expense tracking app in 10 minutes"
                },
                {
                  "url": "https://n8n.io/blog/the-ultimate-guide-to-automate-your-video-collaboration-with-whereby-mattermost-and-n8n/",
                  "icon": "📹",
                  "label": "The ultimate guide to automate your video collaboration with Whereby, Mattermost, and n8n"
                },
                {
                  "url": "https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/",
                  "icon": "🤖",
                  "label": "5 workflow automations for Mattermost that we love at n8n"
                },
                {
                  "url": "https://n8n.io/blog/learn-to-build-powerful-api-endpoints-using-webhooks/",
                  "icon": "🧰",
                  "label": "Learn to Build Powerful API Endpoints Using Webhooks"
                },
                {
                  "url": "https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/",
                  "icon": "📈",
                  "label": "How a Membership Development Manager automates his work and investments"
                },
                {
                  "url": "https://n8n.io/blog/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io/",
                  "icon": "📈",
                  "label": "A low-code bitcoin ticker built with QuestDB and n8n.io"
                },
                {
                  "url": "https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/",
                  "icon": "🎡",
                  "label": "How to set up a no-code CI/CD pipeline with GitHub and TravisCI"
                },
                {
                  "url": "https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/",
                  "icon": "🎖",
                  "label": "Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"
                },
                {
                  "url": "https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/",
                  "icon": "🛵",
                  "label": "How Goomer automated their operations with over 200 n8n workflows"
                },
                {
                  "url": "https://n8n.io/blog/aws-workflow-automation/",
                  "label": "7 no-code workflow automations for Amazon Web Services"
                }
              ],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/"
                }
              ]
            },
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Data Transformation"
              ]
            }
          }
        },
        "group": "[\"input\"]",
        "defaults": {
          "name": "Edit Fields"
        },
        "iconData": {
          "icon": "pen",
          "type": "icon"
        },
        "displayName": "Edit Fields (Set)",
        "typeVersion": 3,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 356,
        "icon": "file:gmail.svg",
        "name": "n8n-nodes-base.gmail",
        "codex": {
          "data": {
            "alias": [
              "email",
              "human",
              "form",
              "wait",
              "hitl",
              "approval"
            ],
            "resources": {
              "generic": [
                {
                  "url": "https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/",
                  "icon": "🧬",
                  "label": "Why business process automation with n8n can change your daily life"
                },
                {
                  "url": "https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/",
                  "icon": "🎫",
                  "label": "Supercharging your conference registration process with n8n"
                },
                {
                  "url": "https://n8n.io/blog/no-code-ecommerce-workflow-automations/",
                  "icon": "store",
                  "label": "6 e-commerce workflows to power up your Shopify s"
                },
                {
                  "url": "https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/",
                  "icon": "👥",
                  "label": "How to get started with CRM automation (with 3 no-code workflow ideas"
                },
                {
                  "url": "https://n8n.io/blog/automate-google-apps-for-productivity/",
                  "icon": "💡",
                  "label": "15 Google apps you can combine and automate to increase productivity"
                },
                {
                  "url": "https://n8n.io/blog/your-business-doesnt-need-you-to-operate/",
                  "icon": " 🖥️",
                  "label": "Hey founders! Your business doesn't need you to operate"
                },
                {
                  "url": "https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/",
                  "icon": "💪",
                  "label": "Using Automation to Boost Productivity in the Workplace"
                }
              ],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/"
                }
              ],
              "credentialDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"
                }
              ]
            },
            "categories": [
              "Communication",
              "HITL"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "HITL": [
                "Human in the Loop"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "Gmail"
        },
        "iconData": {
          "type": "file",
          "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMTkzIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZmlsbD0iIzQyODVGNCIgZD0iTTU4LjE4MiAxOTIuMDVWOTMuMTRMMjcuNTA3IDY1LjA3NyAwIDQ5LjUwNHYxMjUuMDkxYzAgOS42NTggNy44MjUgMTcuNDU1IDE3LjQ1NSAxNy40NTV6Ii8+PHBhdGggZmlsbD0iIzM0QTg1MyIgZD0iTTE5Ny44MTggMTkyLjA1aDQwLjcyN2M5LjY1OSAwIDE3LjQ1NS03LjgyNiAxNy40NTUtMTcuNDU1VjQ5LjUwNWwtMzEuMTU2IDE3LjgzNy0yNy4wMjYgMjUuNzk4eiIvPjxwYXRoIGZpbGw9IiNFQTQzMzUiIGQ9Im01OC4xODIgOTMuMTQtNC4xNzQtMzguNjQ3IDQuMTc0LTM2Ljk4OUwxMjggNjkuODY4bDY5LjgxOC01Mi4zNjQgNC42NyAzNC45OTItNC42NyA0MC42NDRMMTI4IDE0NS41MDR6Ii8+PHBhdGggZmlsbD0iI0ZCQkMwNCIgZD0iTTE5Ny44MTggMTcuNTA0VjkzLjE0TDI1NiA0OS41MDRWMjYuMjMxYzAtMjEuNTg1LTI0LjY0LTMzLjg5LTQxLjg5LTIwLjk0NXoiLz48cGF0aCBmaWxsPSIjQzUyMjFGIiBkPSJtMCA0OS41MDQgMjYuNzU5IDIwLjA3TDU4LjE4MiA5My4xNFYxNy41MDRMNDEuODkgNS4yODZDMjQuNjEtNy42NiAwIDQuNjQ2IDAgMjYuMjN6Ii8+PC9zdmc+"
        },
        "displayName": "Gmail",
        "typeVersion": 2,
        "nodeCategories": [
          {
            "id": 6,
            "name": "Communication"
          },
          {
            "id": 28,
            "name": "HITL"
          }
        ]
      },
      {
        "id": 514,
        "icon": "fa:pause-circle",
        "name": "n8n-nodes-base.wait",
        "codex": {
          "data": {
            "alias": [
              "pause",
              "sleep",
              "delay",
              "timeout"
            ],
            "resources": {
              "generic": [
                {
                  "url": "https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/",
                  "icon": "👥",
                  "label": "How to get started with CRM automation (with 3 no-code workflow ideas"
                },
                {
                  "url": "https://n8n.io/blog/aws-workflow-automation/",
                  "label": "7 no-code workflow automations for Amazon Web Services"
                }
              ],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/"
                }
              ]
            },
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Helpers",
                "Flow"
              ]
            }
          }
        },
        "group": "[\"organization\"]",
        "defaults": {
          "name": "Wait",
          "color": "#804050"
        },
        "iconData": {
          "icon": "pause-circle",
          "type": "icon"
        },
        "displayName": "Wait",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 565,
        "icon": "fa:sticky-note",
        "name": "n8n-nodes-base.stickyNote",
        "codex": {
          "data": {
            "alias": [
              "Comments",
              "Notes",
              "Sticky"
            ],
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Helpers"
              ]
            }
          }
        },
        "group": "[\"input\"]",
        "defaults": {
          "name": "Sticky Note",
          "color": "#FFD233"
        },
        "iconData": {
          "icon": "sticky-note",
          "type": "icon"
        },
        "displayName": "Sticky Note",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 834,
        "icon": "file:code.svg",
        "name": "n8n-nodes-base.code",
        "codex": {
          "data": {
            "alias": [
              "cpde",
              "Javascript",
              "JS",
              "Python",
              "Script",
              "Custom Code",
              "Function"
            ],
            "details": "The Code node allows you to execute JavaScript in your workflow.",
            "resources": {
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"
                }
              ]
            },
            "categories": [
              "Development",
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Helpers",
                "Data Transformation"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "Code"
        },
        "iconData": {
          "type": "file",
          "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjEyNyA0NjQgMTk2LjUgNDY0SDE2Mi4yODNDMTQ5LjAyOCA0NjQgMTM4LjI4MyA0NTMuMjU1IDEzOC4yODMgNDQwVjMzNkMxMzguMjgzIDMwOS4wMjIgMTI4LjAxMSAyODQuNDQzIDExMS4xNjQgMjY1Ljk2MUMxMDYuMTA5IDI2MC40MTYgMTA2LjEwOSAyNTEuNTg0IDExMS4xNjQgMjQ2LjAzOUMxMjguMDExIDIyNy41NTcgMTM4LjI4MyAyMDIuOTc4IDEzOC4yODMgMTc2VjgwQzEzOC4yODMgNjIuMzI2OSAxNTIuNjEgNDggMTcwLjI4MyA0OFoiIGZpbGw9IiNGRjk5MjIiLz4KPHBhdGggZD0iTTMwNSAzNkMzMDUgNDIuNjI3NCAzMTAuMzczIDQ4IDMxNyA0OEgzNDIuOTc5QzM2MC42NTIgNDggMzc0Ljk3OCA2Mi4zMjY5IDM3NC45NzggODBWMTc2QzM3NC45NzggMjAyLjk3OCAzODUuMjUxIDIyNy41NTcgNDAyLjA5OCAyNDYuMDM5QzQwNy4xNTMgMjUxLjU4NCA0MDcuMTUzIDI2MC40MTYgNDAyLjA5OCAyNjUuOTYxQzM4NS4yNTEgMjg0LjQ0MyAzNzQuOTc4IDMwOS4wMjIgMzc0Ljk3OCAzMzZWNDMyQzM3NC45NzggNDQ5LjY3MyAzNjAuNjUyIDQ2NCAzNDIuOTc5IDQ2NEgzMTdDMzEwLjM3MyA0NjQgMzA1IDQ2OS4zNzMgMzA1IDQ3NlY1MDBDMzA1IDUwNi42MjcgMzEwLjM3MyA1MTIgMzE3IDUxMkgzNDIuOTc5QzM4Ny4xNjEgNTEyIDQyMi45NzggNDc2LjE4MyA0MjIuOTc4IDQzMlYzMzZDNDIyLjk3OCAzMDUuMDcyIDQ0OC4wNTEgMjgwIDQ3OC45NzkgMjgwSDQ5MEM0OTYuNjI3IDI4MCA1MDIgMjc0LjYyOCA1MDIgMjY4VjI0NEM1MDIgMjM3LjM3MyA0OTYuNjI4IDIzMiA0OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="
        },
        "displayName": "Code",
        "typeVersion": 2,
        "nodeCategories": [
          {
            "id": 5,
            "name": "Development"
          },
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 838,
        "icon": "fa:mouse-pointer",
        "name": "n8n-nodes-base.manualTrigger",
        "codex": {
          "data": {
            "resources": {
              "generic": [],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.manualworkflowtrigger/"
                }
              ]
            },
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0"
          }
        },
        "group": "[\"trigger\"]",
        "defaults": {
          "name": "When clicking ‘Execute workflow’",
          "color": "#909298"
        },
        "iconData": {
          "icon": "mouse-pointer",
          "type": "icon"
        },
        "displayName": "Manual Trigger",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 1119,
        "icon": "fa:robot",
        "name": "@n8n/n8n-nodes-langchain.agent",
        "codex": {
          "data": {
            "alias": [
              "LangChain",
              "Chat",
              "Conversational",
              "Plan and Execute",
              "ReAct",
              "Tools"
            ],
            "resources": {
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"
                }
              ]
            },
            "categories": [
              "AI",
              "Langchain"
            ],
            "subcategories": {
              "AI": [
                "Agents",
                "Root Nodes"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "AI Agent",
          "color": "#404040"
        },
        "iconData": {
          "icon": "robot",
          "type": "icon"
        },
        "displayName": "AI Agent",
        "typeVersion": 3,
        "nodeCategories": [
          {
            "id": 25,
            "name": "AI"
          },
          {
            "id": 26,
            "name": "Langchain"
          }
        ]
      },
      {
        "id": 1253,
        "icon": "file:azure.svg",
        "name": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
        "codex": {
          "data": {
            "resources": {
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatazureopenai/"
                }
              ]
            },
            "categories": [
              "AI",
              "Langchain"
            ],
            "subcategories": {
              "AI": [
                "Language Models",
                "Root Nodes"
              ],
              "Language Models": [
                "Chat Models (Recommended)"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "Azure OpenAI Chat Model"
        },
        "iconData": {
          "type": "file",
          "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMjQyIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iNTguOTcyJSIgeDI9IjM3LjE5MSUiIHkxPSI3LjQxMSUiIHkyPSIxMDMuNzYyJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzExNEE4QiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzA2NjlCQyIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iNTkuNzE5JSIgeDI9IjUyLjY5MSUiIHkxPSI1Mi4zMTMlIiB5Mj0iNTQuODY0JSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1vcGFjaXR5PSIuMyIvPjxzdG9wIG9mZnNldD0iNy4xJSIgc3RvcC1vcGFjaXR5PSIuMiIvPjxzdG9wIG9mZnNldD0iMzIuMSUiIHN0b3Atb3BhY2l0eT0iLjEiLz48c3RvcCBvZmZzZXQ9IjYyLjMlIiBzdG9wLW9wYWNpdHk9Ii4wNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIzNy4yNzklIiB4Mj0iNjIuNDczJSIgeTE9IjQuNiUiIHkyPSI5OS45NzklIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjM0NDQkY0Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMjg5MkRGIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTg1LjM0My4wMDNoNzUuNzUzTDgyLjQ1NyAyMzNhMTIuMDggMTIuMDggMCAwIDEtMTEuNDQyIDguMjE2SDEyLjA2QTEyLjA2IDEyLjA2IDAgMCAxIC42MzMgMjI1LjMwM0w3My44OTggOC4yMTlBMTIuMDggMTIuMDggMCAwIDEgODUuMzQzIDB6Ii8+PHBhdGggZmlsbD0iIzAwNzhENCIgZD0iTTE5NS40MjMgMTU2LjI4Mkg3NS4yOTdhNS41NiA1LjU2IDAgMCAwLTMuNzk2IDkuNjI3bDc3LjE5IDcyLjA0N2ExMi4xNCAxMi4xNCAwIDAgMCA4LjI4IDMuMjZoNjguMDJ6Ii8+PHBhdGggZmlsbD0idXJsKCNiKSIgZD0iTTg1LjM0My4wMDNhMTEuOTggMTEuOTggMCAwIDAtMTEuNDcxIDguMzc2TC43MjMgMjI1LjEwNWExMi4wNDUgMTIuMDQ1IDAgMCAwIDExLjM3IDE2LjExMmg2MC40NzVhMTIuOTMgMTIuOTMgMCAwIDAgOS45MjEtOC40MzdsMTQuNTg4LTQyLjk5MSA1Mi4xMDUgNDguNmExMi4zMyAxMi4zMyAwIDAgMCA3Ljc1NyAyLjgyOGg2Ny43NjZsLTI5LjcyMS04NC45MzUtODYuNjQzLjAyTDE2MS4zNy4wMDN6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTE4Mi4wOTggOC4yMDdBMTIuMDYgMTIuMDYgMCAwIDAgMTcwLjY3LjAwM0g4Ni4yNDVjNS4xNzUgMCA5Ljc3MyAzLjMwMSAxMS40MjggOC4yMDRMMTcwLjk0IDIyNS4zYTEyLjA2MiAxMi4wNjIgMCAwIDEtMTEuNDI4IDE1LjkyaDg0LjQyOWExMi4wNjIgMTIuMDYyIDAgMCAwIDExLjQyNS0xNS45MnoiLz48L3N2Zz4="
        },
        "displayName": "Azure OpenAI Chat Model",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 25,
            "name": "AI"
          },
          {
            "id": 26,
            "name": "Langchain"
          }
        ]
      }
    ],
    "categories": [
      {
        "id": 38,
        "name": "Lead Nurturing"
      },
      {
        "id": 51,
        "name": "Multimodal AI"
      }
    ],
    "image": []
  }
}