{
  "id": "wexpgIl6Rz6WCmGi",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Lead Gen & nurturing",
  "tags": [
    {
      "id": "8ulFDfMlcOKqevTT",
      "name": "B2B marketing",
      "createdAt": "2025-10-08T08:51:11.271Z",
      "updatedAt": "2025-10-08T08:51:11.271Z"
    },
    {
      "id": "VKCvL0SyGclKbiYG",
      "name": "Course",
      "createdAt": "2025-10-08T08:51:15.748Z",
      "updatedAt": "2025-10-08T08:51:15.748Z"
    }
  ],
  "nodes": [
    {
      "id": "4bc99fef-d397-4a39-9133-527133487d3f",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1440,
        -16
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "=To send",
              "lookupColumn": "Status"
            },
            {
              "lookupValue": "To Send",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit?usp=drivesdk",
          "cachedResultName": "Course 2 - S4Lec1-Lead generation and nurturing"
        },
        "combineFilters": "OR"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "aeb0cb22-8dc5-4acf-b879-98280066e068",
      "name": "Introductory email ",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1616,
        -16
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "assistant",
              "content": "You are a helpful B2B marketing assistant who will write introductory email to potential leads."
            },
            {
              "role": "system",
              "content": "=Write an introductory email using below template. Use the information provided below.\n\nFirst name -  {{ $json[\"First Name\"] }}\nCompany name - {{ $json[\"Company Name\"] }}\nCompany information - {{ $json[\"Company Information\"] }}\nMessage - {{ $json.Message }}\nEmail Id - {{ $json[\"Email ID\"] }}\nRead the message and understand pain points in painPoints\nGive response in two variables\nEmailSubject = email subject\nEmailContent = email content\n\nbelow is the template.\n\nSubject: Following up on your interest in <your company name> for [ shorter version of pain point]\nHi [ first name ]\nThanks for reaching out to us. I saw you were interested in improving [ pain points from message], and as a business leader, I know how critical that is. \n\nOur work with companies of a similar size to yours, like [company name], shows that BuildMyAIFlow can provide solutions specifically for your challenges. \n\nLet me know if you'd be open to a 15-minute chat next week to discuss how we can specifically help you improve your team's efficiency.\n\nps - [ write one line about something relevant that Ai automation did for a similar company in this domain]\n\nBest,\nAashish Bhatnagar\n"
            },
            {
              "content": "Write an introductory email using below template. Use the information provided below.\n\nFirst name -  {{ $json[\"First Name\"] }}\nCompany name - {{ $json[\"Company Name\"] }}\nCompany information - {{ $json[\"Company Information\"] }}\nMessage - {{ $json.Message }}\nEmail Id - {{ $json[\"Email ID\"] }}\nRead the message and understand pain points in painPoints\n\nGive response in two variables\nEmailSubject = email subject\nEmailContent = email content\nEmailid = Email id\nbelow is the template.\n\nSubject: Following up on your interest in BuildMyAiFlow for [ shorter version of pain point]\nHi [ first name ]\nThanks for reaching out to us. I saw you were interested in improving [ pain points from message], and as a business leader, I know how critical that is. \n\nOur work with companies of a similar size to yours, like [company name], shows that BuildMyAIFlow can provide solutions specifically for your challenges. \n\nLet me know if you'd be open to a 15-minute chat next week to discuss how we can specifically help you improve your team's efficiency.\n\nps - [ write one line about something relevant that Ai automation did for a similar company in this domain]\n\nBest,\n<your sales team>"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "63d74ffa-7991-444f-8f41-4bca79f13bd3",
      "name": "Create a draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1968,
        -16
      ],
      "parameters": {
        "message": "={{ $json.message.content.EmailContent }}",
        "options": {
          "sendTo": "={{ $json.message.content.Emailid }}"
        },
        "subject": "={{ $json.message.content.EmailSubject }}",
        "resource": "draft"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "67b166bf-90da-4d11-a351-458e2a913022",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2176,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Drafted",
            "Email ID": "={{ $('Introductory email ').item.json.message.content.Emailid }}",
            "Intro email Date": "={{ $now }}"
          },
          "schema": [
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Information",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Information",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Intro email Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Intro email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 needed?",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reminder 1 needed?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 Email Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reminder 1 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 needed? ",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reminder 2 needed? ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 Email Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reminder 2 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit?usp=drivesdk",
          "cachedResultName": "Course 2 - S4Lec1-Lead generation and nurturing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2506d795-0769-44c3-aae4-73dac74c2524",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -112,
        -160
      ],
      "parameters": {
        "options": {
          "buttonLabel": "Let's talk"
        },
        "formTitle": "Let's Talk AI marketing automation",
        "formFields": {
          "values": [
            {
              "fieldLabel": "First name",
              "placeholder": "John",
              "requiredField": true
            },
            {
              "fieldLabel": "Last Name",
              "placeholder": "Wick",
              "requiredField": true
            },
            {
              "fieldLabel": "Company name",
              "placeholder": "Acme Corporation",
              "requiredField": true
            },
            {
              "fieldLabel": "Designation",
              "placeholder": "Manager"
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email Id",
              "placeholder": "user@example.com",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Message",
              "placeholder": "Leave your message here",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Lead Capture Form"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1fedbddc-0fe2-4c98-a5d4-8d2f058f7072",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        -160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "To Send",
            "Message": "={{ $json.Message }}",
            "Email ID": "={{ $json[\"Email Id\"] }}",
            "Last Name": "={{ $json[\"Last Name\"] }}",
            "First Name": "={{ $json[\"First name\"] }}",
            "Designation": "={{ $json.Designation }}",
            "Company Name": "={{ $json['Company name'] }}"
          },
          "schema": [
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Information",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Information",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Intro email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Intro email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 needed?",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 1 needed?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 Email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 1 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 needed? ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 2 needed? ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 Email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 2 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit#gid=0",
          "cachedResultName": "Form Filled"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit?usp=drivesdk",
          "cachedResultName": "Course 2 - S4Lec1-Lead generation and nurturing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6752c1fd-613e-4ccc-873d-9c7eaa2383b2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        304,
        -160
      ],
      "parameters": {
        "text": "=Search online and write 2-3 sentences about the company -  {{ $json['Company Name'] }}\nCapture as to what they do.\nCapture the location of closes office.\nGive output in below format\n\nCompanyDescription - 1-2 sentences\nCompanyLocation - Should be either of these - Delhi/NCR, bangalore, Mumbai, Other",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "6985895b-6d39-4bc2-b60f-0dc28f7680db",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        272,
        144
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "aaae2203-4c85-426f-9a96-beea3d6caa7a",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        464,
        48
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "b4355e6a-8119-4e6f-b8a9-3617d220872b",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        656,
        -160
      ],
      "parameters": {
        "jsCode": "const inputText = $input.first().json.output\n\n// Split by \"Company Location\"\nconst parts = inputText.split(\"Company Location\");\n\n// Extract description (remove \"Company Description -\" prefix)\nconst companyDescription = parts[0]\n  .replace('Company Description -', '')\n  .replace(/\\\\n/g, ' ')\n  .trim();\n\n// Extract location (remove \"-\" prefix)\nconst companyLocation = parts[1]\n  ? parts[1].replace('-', '').replace(/\\\\n/g, ' ').trim()\n  : '';\n\nreturn {\n  ...($json),\n  companyDescription: companyDescription,\n  companyLocation: companyLocation\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "a1de561e-c54f-4bc0-8216-d251e3def12e",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        864,
        -160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email ID": "={{ $('On form submission').item.json['Email Id'] }}",
            "Location": "={{ $json.companyLocation }}",
            "Company Information": "={{ $json.companyDescription }}"
          },
          "schema": [
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Information",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Information",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Designation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Designation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Intro email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Intro email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 needed?",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 1 needed?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 1 Email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 1 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 needed? ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 2 needed? ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reminder 2 Email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Reminder 2 Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit#gid=0",
          "cachedResultName": "Form Filled"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZG7J29NF134RxUKbTTmTi3A0uBD0gIi7qccrr3sdHWQ/edit?usp=drivesdk",
          "cachedResultName": "Course 2 - S4Lec1-Lead generation and nurturing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "95d73f08-5917-4bf4-88de-401815f470ba",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -256
      ],
      "parameters": {
        "width": 1392,
        "height": 544,
        "content": "## Lead Collection form\n**The step is optional.** The AI agent searches details and location about the lead for assistance. "
      },
      "typeVersion": 1
    },
    {
      "id": "f4021014-9e6d-4f1e-8c01-1695a2284a57",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -256
      ],
      "parameters": {
        "color": 4,
        "width": 1392,
        "height": 544,
        "content": "## Introductory Email Drafting and sheet updation\n**Must know below details.** \n1- Email would be kept in draft and not sent\n2- Best practice to add auto-signature in email account used for gmail\n3- Update agent prompt to teach about your company for best result."
      },
      "typeVersion": 1
    },
    {
      "id": "05ebace2-b7b3-4c10-b694-95e023eabd0a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -720
      ],
      "parameters": {
        "width": 432,
        "height": 448,
        "content": "## Main Sticky\n**How it works** \nPhase 1\nThe flow collects user enquiry to a sheet. This is optional. user leads can be captured from anywhere and entered in a sheet. From the sheet, \nAgent searches about the company and add more details from the web.\n\nPhase 2\nBased on collected details from the form and research, agent writes a personalized email to the client and saves it in the draft of sales team email id.\n\n**How to setup**\nDefine the research prompt if needed basis your company requirement.\nAdjust the email writing structure.\nAdd the email id through which email should be sent."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "89a42958-726a-4d55-b415-52982834531b",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create a draft": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Introductory email ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Introductory email ": {
      "main": [
        [
          {
            "node": "Create a draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        []
      ]
    }
  }
}