{
  "name": "Automate lead response with Google Sheets, OpenAI, Gmail, and Slack notifications",
  "nodes": [
    {
      "id": null,
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -192,
        160
      ]
    },
    {
      "id": null,
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        128,
        160
      ]
    },
    {
      "id": null,
      "name": "Create Email & Tag",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        416,
        160
      ]
    },
    {
      "id": null,
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        -64
      ]
    },
    {
      "id": null,
      "name": "Update Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        192
      ]
    },
    {
      "id": null,
      "name": "Notify Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        1024,
        448
      ]
    },
    {
      "id": null,
      "name": "Sticky: Template overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -576
      ],
      "parameters": {
        "width": 1072,
        "height": 320,
        "content": "## Template overview\\n\\nThis workflow emails new leads, notifies your team, and updates your sheet.\\nAny form works as long as it writes a row into Google Sheets.\\nFlow: Sheets Trigger → (short Wait) "
      }
    },
    {
      "id": null,
      "name": "Sticky: Trigger help",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -144
      ],
      "parameters": {
        "width": 336,
        "height": 272,
        "content": "## Google Sheets Trigger\\nFires when a new row is added to your form responses tab.\\nPick the correct spreadsheet and tab name.\\nExpected headers: Timestamp, Name, Email Address, Phone Number, Service"
      }
    },
    {
      "id": null,
      "name": "Sticky: Wait tip",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        304
      ],
      "parameters": {
        "width": 272,
        "height": 176,
        "content": "## Wait (buffer)\\nA 1–2 second pause so Google finishes writing the row before we read it.\\nYou can shorten or remove this once writes are stable.\\n"
      }
    },
    {
      "id": null,
      "name": "Sticky: AI help",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -176
      ],
      "parameters": {
        "width": null,
        "height": 304,
        "content": "## Create Email & Tag (AI)\\nFeeds the row into OpenAI to produce three JSON fields: Subject, Body, Tag.\\nTag = High / Medium / Low using simple budget/services/timeline rules in the prompt.\\nIf it err"
      }
    },
    {
      "id": null,
      "name": "Sticky: Email help",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -304
      ],
      "parameters": {
        "width": null,
        "height": 224,
        "content": "## Send Email\\nSends the model's Subject and Body to the lead's Email Address.\\nUse Gmail or SMTP with your own mailbox.\\nTest with your email first to confirm formatting and deliverability.\\n"
      }
    },
    {
      "id": null,
      "name": "Sticky: Sheet writeback",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        128
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "## Update Status\\nWrites Status and Tag back to the same sheet so you can track outcomes.\\nCurrently matches by Name. If you have duplicates, switch to Timestamp or a unique ID.\\n"
      }
    },
    {
      "id": null,
      "name": "Sticky: Slack help",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        528
      ],
      "parameters": {
        "width": null,
        "height": 208,
        "content": "## Notify Team (Slack)\\nPosts a short alert with the lead's name, services, budget, and a link to the sheet row.\\nSet the Slack channel you want and connect your Slack credential.\\n"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Create Email & Tag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Email & Tag": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}