Sauvegarde via des formulaires web vers Google Sheets
Ceci est unLead Generationworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme Code, Wait, Webhook, GoogleSheets, SplitInBatches. Collecte automatisée des données de formulaires web et stockage dans Google Sheets
- •Point de terminaison HTTP Webhook (généré automatiquement par n8n)
- •Informations d'identification Google Sheets API
Nœuds utilisés (11)
Catégorie
{
"id": "SovVLaYsdGLMJPnS",
"meta": {
"instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
"templateCredsSetupCompleted": true
},
"name": "Save to Google Sheets via Web Form",
"tags": [],
"nodes": [
{
"id": "cf2ed5e3-f96a-48d2-af22-360e3009bc3d",
"name": "Boucler sur les éléments",
"type": "n8n-nodes-base.splitInBatches",
"onError": "continueRegularOutput",
"position": [
1216,
320
],
"parameters": {
"options": {}
},
"notesInFlow": false,
"typeVersion": 3
},
{
"id": "30199601-bb17-4eff-a5ee-00555e0c21ae",
"name": "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": "Stocker les données dans la feuille",
"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": "Nettoyer les données de réponse",
"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": "Note adhésive",
"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": "Note adhésive1",
"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": "Note adhésive2",
"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": "Note adhésive3",
"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": "Note adhésive4",
"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": "Note adhésive5",
"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": "Attendre",
"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": {
"eeb0a16e-d621-4a58-8231-d5812c69e9b1": {
"main": [
[
{
"node": "cf2ed5e3-f96a-48d2-af22-360e3009bc3d",
"type": "main",
"index": 0
}
]
]
},
"30199601-bb17-4eff-a5ee-00555e0c21ae": {
"main": [
[
{
"node": "78904589-f8b2-45ec-bdf5-b9dc6771b5c3",
"type": "main",
"index": 0
}
]
]
},
"cf2ed5e3-f96a-48d2-af22-360e3009bc3d": {
"main": [
[],
[
{
"node": "2fd4f703-b974-44b0-9fb5-31de9107ff00",
"type": "main",
"index": 0
}
]
]
},
"78904589-f8b2-45ec-bdf5-b9dc6771b5c3": {
"main": [
[
{
"node": "cf2ed5e3-f96a-48d2-af22-360e3009bc3d",
"type": "main",
"index": 0
}
]
]
},
"2fd4f703-b974-44b0-9fb5-31de9107ff00": {
"main": [
[
{
"node": "eeb0a16e-d621-4a58-8231-d5812c69e9b1",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Génération de leads
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
SpaGreen Creative
@spagreenSpaGreen 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.
Partager ce workflow