{
  "name": "Formul\u00e1rio para Google Sheets",
  "nodes": [
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000001",
      "name": "Webhook Formul\u00e1rio",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "form-submission",
        "responseMode": "responseNode",
        "options": {}
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000002",
      "name": "Formatar Dados",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "fields": {
          "values": [
            {
              "name": "nome",
              "type": "stringValue",
              "value": "={{ $json.body.nome }}"
            },
            {
              "name": "email",
              "type": "stringValue",
              "value": "={{ $json.body.email }}"
            },
            {
              "name": "telefone",
              "type": "stringValue",
              "value": "={{ $json.body.telefone }}"
            },
            {
              "name": "mensagem",
              "type": "stringValue",
              "value": "={{ $json.body.mensagem }}"
            },
            {
              "name": "data_envio",
              "type": "stringValue",
              "value": "={{ new Date().toLocaleString('pt-BR', { timeZone: 'America/Sao_Paulo' }) }}"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000003",
      "name": "Salvar no Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        680,
        300
      ],
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "SEU_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Leads",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Nome": "={{ $json.nome }}",
            "Email": "={{ $json.email }}",
            "Telefone": "={{ $json.telefone }}",
            "Mensagem": "={{ $json.mensagem }}",
            "Data Envio": "={{ $json.data_envio }}"
          }
        },
        "options": {}
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000004",
      "name": "Enviar Email Notifica\u00e7\u00e3o",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        900,
        300
      ],
      "parameters": {
        "fromEmail": "noreply@seudominio.com",
        "toEmail": "vendas@seudominio.com",
        "subject": "Novo lead: {{ $json.nome }}",
        "emailFormat": "html",
        "message": "<h2>Novo contato recebido</h2><p><strong>Nome:</strong> {{ $json.nome }}</p><p><strong>Email:</strong> {{ $json.email }}</p><p><strong>Telefone:</strong> {{ $json.telefone }}</p><p><strong>Mensagem:</strong> {{ $json.mensagem }}</p><p><strong>Data:</strong> {{ $json.data_envio }}</p>",
        "options": {}
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Formul\u00e1rio": {
      "main": [
        [
          {
            "node": "Formatar Dados",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Formatar Dados": {
      "main": [
        [
          {
            "node": "Salvar no Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salvar no Google Sheets": {
      "main": [
        [
          {
            "node": "Enviar Email Notifica\u00e7\u00e3o",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "b2c3d4e5-0002-0002-0002-000000000000",
  "meta": {
    "templateCredsSetupCompleted": false
  }
}