通过Web表单保存到Google表格
中级
这是一个Lead Generation领域的自动化工作流,包含 11 个节点。主要使用 Code, Wait, Webhook, GoogleSheets, SplitInBatches 等节点。 自动化Web表单数据收集并存储到Google表格
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "SovVLaYsdGLMJPnS",
"meta": {
"instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
"templateCredsSetupCompleted": true
},
"name": "通过 Web 表单保存到 Google Sheets",
"tags": [],
"nodes": [
{
"id": "cf2ed5e3-f96a-48d2-af22-360e3009bc3d",
"name": "遍历项目",
"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": "在表格中存储数据",
"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": "清理响应数据",
"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": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-368
],
"parameters": {
"color": 4,
"width": 992,
"height": 1488,
"content": "# 通过 Web 表单保存到 Google Sheets"
},
"typeVersion": 1
},
{
"id": "3e600129-67b3-4b48-874b-91fb227dc62f",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
-368
],
"parameters": {
"color": 7,
"width": 400,
"height": 960,
"content": "## **Webhook 触发器**"
},
"typeVersion": 1
},
{
"id": "219a09fc-7e16-4630-b5c5-1f8c43d4d999",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
-368
],
"parameters": {
"width": 368,
"height": 960,
"content": "## **清理和构建传入数据**"
},
"typeVersion": 1
},
{
"id": "f37db36d-028a-4022-ab44-b4539f0cb22e",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1104,
-368
],
"parameters": {
"color": 5,
"width": 304,
"height": 960,
"content": "## **用于批处理的循环**"
},
"typeVersion": 1
},
{
"id": "2f47f2f7-433a-4557-b9e8-ffa86c2127da",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1424,
-368
],
"parameters": {
"color": 4,
"width": 368,
"height": 960,
"content": "## **将数据追加到 Google Sheets**"
},
"typeVersion": 1
},
{
"id": "1088b3f4-546c-40dc-9443-1ab617aeaa09",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1808,
-368
],
"parameters": {
"color": 3,
"width": 400,
"height": 960,
"content": "## **等待**"
},
"typeVersion": 1
},
{
"id": "eeb0a16e-d621-4a58-8231-d5812c69e9b1",
"name": "等待",
"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": "Clean response data",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Store Data in Sheet",
"type": "main",
"index": 0
}
]
]
},
"Clean response data": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Store Data in Sheet": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 潜在客户开发
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
通过Rapiwa API发送表单提交的WhatsApp确认
基于Rapiwa API和Google表格的WhatsApp号码验证与确认系统
If
Code
Wait
+5
17 节点SpaGreen Creative
潜在客户开发
通过非官方 API 批量验证 WhatsApp 号码
使用 Google Sheets 和 WasenderAPI 批量验证 WhatsApp 号码
If
Code
Wait
+6
11 节点SpaGreen Creative
潜在客户开发
使用Rapiwa API从Shopify发送自动WhatsApp订单确认
使用Rapiwa和Google Sheets从Shopify发送自动WhatsApp订单确认
If
Code
Wait
+5
18 节点SpaGreen Creative
内容创作
通过 Rapiwa API 发送 WooCommerce 新分类 WhatsApp 提醒
通过 Rapiwa API 和 Google Sheets 发送 WooCommerce 分类提醒到 WhatsApp
If
Code
Wait
+7
19 节点SpaGreen Creative
内容创作
Facebook页面评论管理机器人:回复、删除、封禁和通知
AI驱动的Facebook评论管理:自动回复、删除、封禁和通知
If
Set
Code
+18
59 节点SpaGreen Creative
社交媒体
Shopify自动发送WhatsApp感谢消息和忠诚度优惠券(使用Rapiwa API)
使用Rapiwa从Shopify自动发送WhatsApp感谢消息和忠诚度优惠券
If
Code
Wait
+5
17 节点SpaGreen Creative
内容创作
工作流信息
难度等级
中级
节点数量11
分类1
节点类型6
作者
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.
外部链接
在 n8n.io 查看 →
分享此工作流