{
  "name": "Instant lead notifications with Gmail/SMTP for teams & auto-responses",
  "nodes": [
    {
      "id": "fc53e914-3f27-46aa-bd68-6e662e5b583d",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -288,
        2224
      ]
    },
    {
      "id": "666340f9-3cbb-400b-952d-4ac804eea26d",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2896,
        2416
      ]
    },
    {
      "id": "098a2b85-9ba6-4382-b8b4-5cda2c7ab4c9",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -16,
        1840
      ]
    },
    {
      "id": "b83afe86-848f-464c-bf31-7e16801e7b50",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        2224
      ]
    },
    {
      "id": "7aa50d00-962a-40a1-b757-394e5a6d1841",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        1232
      ],
      "parameters": {
        "width": 704,
        "height": 2208,
        "content": "### Lead Automation Email Workflow\n\n### This workflow automatically sends email alerts whenever a new lead is created from any CRM, web form, or connected app.  \n### It also supports optional thank-yo"
      }
    },
    {
      "id": "98eb4cbf-9f18-439a-bbba-fd48fd333d4e",
      "name": "Overview Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        1664
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Request & Validation\nReceives the API request and checks for the required “name” parameter.\nReturns a validation message if missing."
      }
    },
    {
      "id": "3a21015a-688f-4bc8-931b-0a47a4754bcd",
      "name": "Overview Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        2048
      ],
      "parameters": {
        "width": 596,
        "height": 364,
        "content": "## Manual Trigger node and Sample Data"
      }
    },
    {
      "id": "c6869f67-982e-4f50-a070-be9f31262e40",
      "name": "Overview Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        1664
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## HTML Template\n- Prepare Awesome HTML template."
      }
    },
    {
      "id": "f27b8c6d-3ca7-436e-b848-10f69f3e6b18",
      "name": "Overview Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        1536
      ],
      "parameters": {
        "width": 708,
        "height": 492,
        "content": "## Email\n- Send an automated email to the configured recipient through the Gmail / SMTP mail integration."
      }
    },
    {
      "id": "4a57579e-27cf-4342-9c24-fb4b27bb0700",
      "name": "Overview Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        1664
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Company Email Address\n- Enter your email address in this node to receive notifications whenever a new lead is created."
      }
    },
    {
      "id": "8bf17cba-a9fb-4f74-9925-3c69ba7f2cc1",
      "name": "Configured email1",
      "type": "n8n-nodes-base.set",
      "position": [
        1456,
        1840
      ]
    },
    {
      "id": "352d2ab6-b902-466c-8d33-2430b20da621",
      "name": "Overview Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        1664
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Prepare Data / Clean Payload\n- Remove unused key from JSON data"
      }
    },
    {
      "id": "e77a9c68-22f1-4ce8-9d11-8e21e6ad9896",
      "name": "JsonData1",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        1840
      ]
    },
    {
      "id": "11914de9-3e30-4cc7-b88e-fe09dfcecc3a",
      "name": "Send email1",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2192,
        1664
      ]
    },
    {
      "id": "1a47d125-6953-4afa-a63a-9f2e02f20d33",
      "name": "Overview Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        2096
      ],
      "parameters": {
        "width": 708,
        "height": 492,
        "content": "## Send Email to Reception\n- Send a polite thank-you email to the client, expressing appreciation for their interest in our services."
      }
    },
    {
      "id": "70a4cc7a-135b-4e84-ae7d-a0732b76df58",
      "name": "Overview Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        2096
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Client HTML Template\n- Client HTML template — thank you email."
      }
    },
    {
      "id": "eab5b3af-fed9-4224-a622-2f6662593ed4",
      "name": "Send email client",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2912,
        2208
      ]
    },
    {
      "id": "c0617d1e-2640-49bf-9f2d-597751edf44e",
      "name": "Client HTML Template",
      "type": "n8n-nodes-base.html",
      "position": [
        2192,
        2240
      ]
    },
    {
      "id": "f0f24f3c-a372-4123-a722-97593e3597bd",
      "name": "Internal Team HTML Template",
      "type": "n8n-nodes-base.html",
      "position": [
        1088,
        1840
      ]
    },
    {
      "id": "4f871ed1-c366-434f-82ce-467dc48142c2",
      "name": "Company Data Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1824,
        2304
      ]
    },
    {
      "id": "85206691-1eeb-4a88-bd3e-4077c49eede2",
      "name": "Overview Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        2096
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Company Data Config for Prepare HTML Template\n- company_name\n- company_logo_url\n- website_url\n- copy_right_year\n- contact_url"
      }
    },
    {
      "id": "7a03ae13-5594-46c8-b079-c3233c8b9176",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2192,
        1872
      ]
    },
    {
      "id": "dd2e331b-808f-45d6-ad0f-8569128f18cf",
      "name": "Send Email From Gmail / SMPT",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1840
      ]
    },
    {
      "id": "f8fd10ca-26af-41a4-92d4-590a52225fec",
      "name": "Overview Note24",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        1664
      ],
      "parameters": {
        "width": 340,
        "height": 364,
        "content": "## Send Email (Gmail / SMTP Switch)\n- Switch to send email via Gmail or SMTP."
      }
    },
    {
      "id": "083932c2-95ad-4130-8ed7-dd992c1495ac",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        1824,
        1760
      ]
    },
    {
      "id": "be404fc9-3ab8-43f5-9378-eb0db4f8fbf2",
      "name": "Switch2",
      "type": "n8n-nodes-base.switch",
      "position": [
        2608,
        2336
      ]
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "JsonData1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Send email1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch2": {
      "main": [
        [
          {
            "node": "Send email client",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "JsonData1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JsonData1": {
      "main": [
        [
          {
            "node": "Send Email From Gmail / SMPT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        []
      ]
    },
    "Configured email1": {
      "main": [
        [
          {
            "node": "Company Data Config",
            "type": "main",
            "index": 0
          },
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company Data Config": {
      "main": [
        [
          {
            "node": "Client HTML Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Client HTML Template": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Internal Team HTML Template": {
      "main": [
        [
          {
            "node": "Configured email1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email From Gmail / SMPT": {
      "main": [
        [
          {
            "node": "Internal Team HTML Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}