{
  "name": "Website form → Telegram + Google Sheets + Gmail",
  "nodes": [
    {
      "parameters": {
        "content": "## Website form → Telegram + Sheets + Gmail\n\nThe pipeline behind the contact form on makeflows.pro.\n\n1. Attach credentials: Telegram (bot token), Google Sheets + Gmail (OAuth2).\n2. Replace YOUR_TELEGRAM_CHAT_ID and YOUR_GOOGLE_SHEET_ID.\n3. Sheet header row: timestamp, name, email, contact_platform, contact_handle, description, budget, status.\n4. Set an error workflow (Settings → Error workflow).\n\nGuide: https://makeflows.pro/blog/website-form-to-telegram-with-n8n",
        "height": 300,
        "width": 420
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        -140
      ],
      "id": "note-1",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "website-form",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "webhook-1",
      "name": "Webhook"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "cond-name",
              "leftValue": "={{ $json.body.name }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "id": "cond-email",
              "leftValue": "={{ $json.body.email }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        220,
        0
      ],
      "id": "filter-1",
      "name": "Drop empty submissions"
    },
    {
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "text": "=🔔 *New request — your-site.com*\n👤 *{{ $json.body.name }}*\n📧 {{ $json.body.email }}\n📱 {{ $json.body.contact_platform }}: {{ $json.body.contact_handle }}\n💬 {{ $json.body.description }}\n💰 {{ $json.body.budget }}\n🕐 {{ $now.toFormat('dd.MM.yyyy HH:mm') }}",
        "additionalFields": {
          "parse_mode": "Markdown"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        460,
        -180
      ],
      "id": "telegram-1",
      "name": "Telegram alert"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_GOOGLE_SHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Leads"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "timestamp": "={{ $now.toFormat('yyyy-MM-dd HH:mm') }}",
            "name": "={{ $json.body.name }}",
            "email": "={{ $json.body.email }}",
            "contact_platform": "={{ $json.body.contact_platform }}",
            "contact_handle": "={{ $json.body.contact_handle }}",
            "description": "={{ $json.body.description }}",
            "budget": "={{ $json.body.budget }}",
            "status": "New"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "timestamp",
              "displayName": "timestamp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "contact_platform",
              "displayName": "contact_platform",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "contact_handle",
              "displayName": "contact_handle",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "displayName": "description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "budget",
              "displayName": "budget",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        460,
        0
      ],
      "id": "sheets-1",
      "name": "Log to Google Sheet"
    },
    {
      "parameters": {
        "sendTo": "you@example.com",
        "subject": "=New request: {{ $json.body.name }}",
        "message": "=<h2>New request</h2><p><strong>Name:</strong> {{ $json.body.name }}<br><strong>Email:</strong> {{ $json.body.email }}<br><strong>Contact:</strong> {{ $json.body.contact_platform }}: {{ $json.body.contact_handle }}<br><strong>Budget:</strong> {{ $json.body.budget }}<br><strong>Received:</strong> {{ $now.toFormat('dd.MM.yyyy HH:mm') }}</p><p><strong>Description:</strong><br>{{ $json.body.description }}</p>",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        460,
        180
      ],
      "id": "gmail-1",
      "name": "Email copy"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Drop empty submissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Drop empty submissions": {
      "main": [
        [
          {
            "node": "Telegram alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email copy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
