Guardar desde formularios web en Google Sheets

Intermedio

Este es unLead Generationflujo de automatización del dominio deautomatización que contiene 11 nodos.Utiliza principalmente nodos como Code, Wait, Webhook, GoogleSheets, SplitInBatches. Recopilación automática de datos de formularios web y almacenamiento en Google Sheets

Requisitos previos
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Credenciales de API de Google Sheets
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "SovVLaYsdGLMJPnS",
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "name": "Save to Google Sheets via Web Form",
  "tags": [],
  "nodes": [
    {
      "id": "cf2ed5e3-f96a-48d2-af22-360e3009bc3d",
      "name": "Recorrer elementos",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueRegularOutput",
      "position": [
        1216,
        320
      ],
      "parameters": {
        "options": {}
      },
      "notesInFlow": false,
      "typeVersion": 3
    },
    {
      "id": "30199601-bb17-4eff-a5ee-00555e0c21ae",
      "name": "Disparador Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        512,
        320
      ],
      "webhookId": "93a81ced-e52c-4d31-96d2-c91a20bd7453",
      "parameters": {
        "path": "93a81ced-e52c-4d31-96d2-c91a20bd7453",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "2fd4f703-b974-44b0-9fb5-31de9107ff00",
      "name": "Store Data in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1552,
        240
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $json.submitted_date }}",
            "Name": "={{ $json.name }}",
            "Email ": "={{ $json.email }}",
            "Location": "={{ $json.location }}",
            "Business Name": "={{ $json.business_name }}",
            "WhatsApp Number": "={{ $json.whatsapp }}"
          },
          "schema": [
            {
              "id": "Business Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Business Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "WhatsApp Number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "WhatsApp Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email ",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "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/1jGQybPhdWyDQNU2wvVP__PbxInReSa3dBtw2yTSOWKg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jGQybPhdWyDQNU2wvVP__PbxInReSa3dBtw2yTSOWKg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jGQybPhdWyDQNU2wvVP__PbxInReSa3dBtw2yTSOWKg/edit?usp=drivesdk",
          "cachedResultName": "Sales - Save to Google Sheets"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gFH3Wjq6yYqSEAei",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "78904589-f8b2-45ec-bdf5-b9dc6771b5c3",
      "name": "Clean response data",
      "type": "n8n-nodes-base.code",
      "position": [
        848,
        320
      ],
      "parameters": {
        "jsCode": "// Get current date in YYYY-MM-DD format\nconst submitted_at = new Date().toISOString().split('T')[0];\n\n// Return only the submitted form data along with the date\nreturn [\n  {\n    json: {\n      business_name: $json.body.business_name,\n      location: $json.body.location,\n      whatsapp: $json.body.whatsapp,\n      email: $json.body.email,\n      name: $json.body.name,\n      submitted_date: submitted_at\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "87e98656-6854-4d62-b2cf-6b64ef138506",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        -368
      ],
      "parameters": {
        "color": 4,
        "width": 992,
        "height": 1488,
        "content": "# Save to Google Sheets via Web Form\n\n## Overflow\nThis n8n workflow allows you to collect data from a web form and automatically store it in a Google Sheet. It includes data cleanup, date stamping, optional batching, and throttling for smooth handling of single or bulk submissions.\n\n\n---\n\n## Features\n- Accepts form submissions via **HTTP POST Webhook**\n- Cleans and formats incoming data using a **JavaScript Code node**\n- Automatically appends new rows into a connected **Google Sheet**\n- Includes a **loop and delay mechanism** for controlled data handling\n- Supports **custom column mapping** to match sheet structure\n- Adds a submission date field automatically for each entry\n\n---\n\n## Requirements / Prerequisites\n- **Google Sheets OAuth2 API credentials** connected to n8n\n- **A Google Sheet** formatted like this ➤ [sample](https://docs.google.com/spreadsheets/d/1jGQybPhdWyDQNU2wvVP__PbxInReSa3dBtw2yTSOWKg/edit?usp=sharing)  \n- A valid **Google Sheet** with edit permissions and the required columns\n- A frontend form or app that can make **POST requests** to the webhook\n- An active **n8n instance** (self-hosted or cloud)\n\n---\n\n# Nodes Used in the Workflow\nNodes used in this workflow:\n- `Webhook`\n- `Code (Clean response data)`\n- `Split In Batches (Loop Over Items)`\n- `Google Sheets (Store Data in Sheet)`\n- `Wait (Wait 5s)`\n- `Sticky Notes` (for documentation)\n\n---\n\n## Google Sheet Format (Required Columns)\n\nMake sure your sheet includes the following columns exactly (case-sensitive):\n\n| Business Name     | Location   | WhatsApp Number | Email             | Name           | Date       |\n|-------------------|------------|-----------------|-------------------|----------------|------------|\n| SpaGreen          | Bangladesh | 8801322827753   | spagreen@gmail.com| Abdul Mannan   | 2025-09-14 |\n| Dev Code Journey  | Bangladesh | 8801322827753   | admin@gmail.com   | Shakil Ahammed | 2025-09-14 |\n\n---\n\n## Notes\n- The `Email ` field in the Google Sheet contains a trailing space — ensure it matches exactly.\n- The webhook path is uniquely generated; you can change or secure it as needed.\n- This workflow assumes one submission at a time. If sending bulk data, modify the loop logic accordingly.\n\n---\n\n## Ideal Use Cases\n- Contact form submissions\n- Lead capture from landing pages\n- Business registration forms\n- Data collection from event or booking forms\n\n---\n\nThis setup ensures form submissions are received, cleaned, stored efficiently, and processed in a controlled manner.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3e600129-67b3-4b48-874b-91fb227dc62f",
      "name": "Nota adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 960,
        "content": "## **Webhook Trigger**\nThe **Webhook** node acts as the entry point for the workflow. It listens for `POST` requests sent to a unique path (`/93a81ced-e52c-4d31-96d2-c91a20bd7453`). When a form or frontend app submits data to this URL, the workflow is triggered. This node is essential for capturing user inputs from a web form and routing them into the automation process.\n\nThis is the entry point of your workflow. It listens for HTTP `POST` requests, usually from a frontend form or app. When data is submitted to this webhook URL, it triggers the workflow.\n\n   - Node: `Webhook`\n   - Triggers when a form is submitted\n   - URL path: `/93a81ced-e52c-4d31-96d2-c91a20bd7453`\n\n## Requirements:\n### **Connect a Web Form**\n   - Use any web form or frontend app to make a `POST` request to the webhook URL.\n   - Required form fields:\n     - `business_name`\n     - `location`\n     - `whatsapp`\n     - `email`\n     - `name`"
      },
      "typeVersion": 1
    },
    {
      "id": "219a09fc-7e16-4630-b5c5-1f8c43d4d999",
      "name": "Nota adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -368
      ],
      "parameters": {
        "width": 368,
        "height": 960,
        "content": "## **Clean and Structure Incoming Data**\n\nThis is a **Code** node that processes Cleans and restructures incoming data from the webhook and appends a submission date in `YYYY-MM-DD` format. It extracts specific fields from the `body` of the incoming JSON payload — such as `business_name`, `location`, `number`, `email`, and `name`. The result is a clean and structured JSON object ready for further processing.\n\n\n   - Node: `Clean response data`\n   - It extracts the relevant fields from the webhook body and creates a simplified data structure, like this:\n```json\n{\n  \"business_name\": \"...\",\n  \"location\": \"...\",\n  \"number\": \"...\",\n  \"email\": \"...\",\n  \"name\": \"...\",\n  \"submitted_date\": \"2025-09-16\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "f37db36d-028a-4022-ab44-b4539f0cb22e",
      "name": "Nota adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        -368
      ],
      "parameters": {
        "color": 5,
        "width": 304,
        "height": 960,
        "content": "## **Looping for Batch Handling**\nPrepares the workflow to handle data in batches — useful if you're processing multiple submissions at once (like a list of items from the frontend).\n\nHow it works:\nEven though single submissions don’t need looping, this node ensures the workflow is scalable. It breaks incoming data into manageable pieces and processes them one at a time.\n\n\n\n   - Node: `Loop Over Items`\n   - Can be used to manage multiple items if batch submission is enabled"
      },
      "typeVersion": 1
    },
    {
      "id": "2f47f2f7-433a-4557-b9e8-ffa86c2127da",
      "name": "Nota adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -368
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 960,
        "content": "## **Append Data to Google Sheets**\nThe **Google Sheets** node named “Store Data in Sheet” is responsible for appending the incoming structured data into a specific Google Sheet. The sheet is defined with a `documentId` and `sheetName`. The node uses column mapping to place values into columns like `Business Name`, `Location`, `WhatsApp Number`, `Email ` (note the trailing space), `Name`, and `Date`. OAuth2 credentials are used to authenticate and allow data writing access to the sheet.\n\n\n   - Node: `Store Data in Sheet`\n   - Appends each record to the specified\n- **A Google Sheet** formatted like this ➤ [sample](https://docs.google.com/spreadsheets/d/1jGQybPhdWyDQNU2wvVP__PbxInReSa3dBtw2yTSOWKg/edit?usp=sharing)  \n- Sheet columns mapped:\n     - `Business Name`\n     - `Location`\n     - `WhatsApp Number`\n     - `Email `\n     - `Name`\n     - `Date`"
      },
      "typeVersion": 1
    },
    {
      "id": "1088b3f4-546c-40dc-9443-1ab617aeaa09",
      "name": "Nota adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        -368
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 960,
        "content": "## **Wait**\nThe **Wait** node introduces a delay of 5 seconds in the workflow. This is especially useful when handling multiple items in a loop or batch, as it prevents hitting Google Sheets API rate limits or overloading the system with too many quick requests. After the delay, the loop continues processing the next batch of items.\n\n\n   - Node: `Wait`\n   - Adds a 5-second delay before proceeding to the next batch (optional but useful for large submissions)"
      },
      "typeVersion": 1
    },
    {
      "id": "eeb0a16e-d621-4a58-8231-d5812c69e9b1",
      "name": "Esperar",
      "type": "n8n-nodes-base.wait",
      "position": [
        1952,
        320
      ],
      "webhookId": "a8a457d5-f88d-451c-ac51-1af17c8435b0",
      "parameters": {},
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "da42ef3c-4244-4b49-9da6-80b63b429d59",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "78904589-f8b2-45ec-bdf5-b9dc6771b5c3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "2fd4f703-b974-44b0-9fb5-31de9107ff00",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "78904589-f8b2-45ec-bdf5-b9dc6771b5c3": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2fd4f703-b974-44b0-9fb5-31de9107ff00": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Generación de leads

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Facebook页面评论gestiónbot:回复、eliminación、封禁ynotificación
AI驱动deFacebook评论gestión:automático回复、eliminación、封禁ynotificación
If
Set
Code
+
If
Set
Code
59 NodosSpaGreen Creative
Redes sociales
Envío automático de mensajes de agradecimiento y cupones de lealtad de WhatsApp para Shopify (usando la API de Rapiwa)
Envío automático de mensajes de agradecimiento y cupones de fidelización de WhatsApp desde Shopify con Rapiwa
If
Code
Wait
+
If
Code
Wait
17 NodosSpaGreen Creative
Creación de contenido
Desarrollo de leads y flujos de correo electrónico
Usar Google Maps, SendGrid e IA para automatizar el desarrollo de leads B2B y el marketing por correo electrónico
If
Set
Code
+
If
Set
Code
141 NodosEzema Kingsley Chibuzo
Generación de leads
Recordatorios de WhatsApp para carritos abandonados en Shopify con Rapiwa (enlace del producto incluido)
Automatización de recordatorios de abandono del carrito de compras de Shopify en WhatsApp: inclusión de enlaces de productos a través de Rapiwa
If
Code
Wait
+
If
Code
Wait
19 NodosSpaGreen Creative
Creación de contenido
Cumplimiento de pedidos de Shopify y envío de enlaces de seguimiento por WhatsApp con la API de Rapiwa
Automatización de las notificaciones de cumplimiento de pedidos de Shopify a través de WhatsApp
If
Code
Wait
+
If
Code
Wait
17 NodosSpaGreen Creative
Creación de contenido
Pipeline automatizado para enriquecimiento de prospectos de LinkedIn con Apollo.io y Hojas de Cálculo de Google
Tubería automatizada para enriquecimiento de leads de LinkedIn usando Apollo.io y Google Sheets
If
Code
Wait
+
If
Code
Wait
33 NodosRahi Uppal
Generación de leads
Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos11
Categoría1
Tipos de nodos6
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
SpaGreen Creative

SpaGreen Creative

@spagreen

SpaGreen Creative is a leading software company specializing in SaaS solutions, AI automation, and Laravel/Vue.js development. With 800+ eCommerce platforms and 8,000+ global clients, we deliver powerful tools for OTT, CRM, ERP, and WhatsApp marketing. We combine innovation and tech to build scalable digital products.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34