在Google Sheets电子表格中追加、查找、更新和读取数据
中级
这是一个Building Blocks领域的自动化工作流,包含 7 个节点。主要使用 Set, GoogleSheets, ManualTrigger 等节点。 在Google Sheets中转换数据
前置要求
- •Google Sheets API 凭证
使用的节点 (7)
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "5",
"name": "在 Google Sheets 电子表格中追加、查找、更新和读取数据",
"nodes": [
{
"name": "点击“执行”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
450,
450
],
"parameters": {},
"typeVersion": 1
},
{
"name": "Google Sheets2",
"type": "n8n-nodes-base.googleSheets",
"position": [
1450,
450
],
"parameters": {
"key": "ID",
"range": "A:D",
"options": {
"valueInputMode": "USER_ENTERED",
"valueRenderMode": "UNFORMATTED_VALUE"
},
"sheetId": "1remFwo--5ehUgIU7UUndKldPI0Xm93e1T3DldD9GOg0",
"operation": "update",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": "google-sheet"
},
"typeVersion": 1
},
{
"name": "集合1",
"type": "n8n-nodes-base.set",
"position": [
1250,
450
],
"parameters": {
"values": {
"number": [
{
"name": "Rent",
"value": "={{$node[\"Google Sheets1\"].json[\"Rent\"]+100}}"
},
{
"name": "ID",
"value": "={{$node[\"Google Sheets1\"].json[\"ID\"]}}"
}
],
"string": [
{
"name": "Name",
"value": "={{$node[\"Google Sheets1\"].json[\"Name\"]}}"
},
{
"name": "City",
"value": "={{$node[\"Google Sheets1\"].json[\"City\"]}}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1050,
450
],
"parameters": {
"range": "A:D",
"options": {
"valueRenderMode": "UNFORMATTED_VALUE",
"returnAllMatches": true
},
"sheetId": "1remFwo--5ehUgIU7UUndKldPI0Xm93e1T3DldD9GOg0",
"operation": "lookup",
"lookupValue": "Berlin",
"lookupColumn": "City",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": "google-sheet"
},
"typeVersion": 1
},
{
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
850,
450
],
"parameters": {
"range": "A:D",
"options": {
"valueInputMode": "USER_ENTERED"
},
"sheetId": "1remFwo--5ehUgIU7UUndKldPI0Xm93e1T3DldD9GOg0",
"operation": "append",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": "google-sheet"
},
"typeVersion": 1
},
{
"name": "Google Sheets3",
"type": "n8n-nodes-base.googleSheets",
"position": [
1650,
450
],
"parameters": {
"range": "A:D",
"options": {
"valueRenderMode": "FORMATTED_VALUE"
},
"sheetId": "1remFwo--5ehUgIU7UUndKldPI0Xm93e1T3DldD9GOg0",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": "google-sheet"
},
"typeVersion": 1
},
{
"name": "设置",
"type": "n8n-nodes-base.set",
"position": [
650,
450
],
"parameters": {
"values": {
"number": [
{
"name": "ID",
"value": "={{Math.floor(Math.random()*1000)}}"
}
],
"string": [
{
"name": "Name",
"value": "John's Place"
},
{
"name": "Rent",
"value": "$1,000"
},
{
"name": "City",
"value": "Berlin"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
}
],
"active": false,
"settings": {},
"connections": {
"Set": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Google Sheets2",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets1": {
"main": [
[
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets2": {
"main": [
[
{
"node": "Google Sheets3",
"type": "main",
"index": 0
}
]
]
},
"On clicking 'execute'": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 构建模块
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
检查链接预览
检查链接预览
If
Peekalink
Manual Trigger
+1
5 节点ghagrawal17
构建模块
创建频道、添加成员并向频道发布消息
在 Mattermost 中创建频道、添加成员并向频道发布消息
Mattermost
Manual Trigger
4 节点ghagrawal17
构建模块
在Strava中创建、更新和获取活动
在Strava中创建、更新和获取活动
Strava
Manual Trigger
4 节点ghagrawal17
构建模块
在Webflow中创建、更新和获取项目
在Webflow中创建、更新和获取项目
Webflow
Manual Trigger
4 节点ghagrawal17
构建模块
Twitter Webhook验证处理
Twitter Webhook验证处理
Set
Crypto
Webhook
3 节点ghagrawal17
构建模块
上传文件并获取存储桶文件列表
在S3中管理文件
S3
Http Request
Manual Trigger
4 节点ghagrawal17
构建模块