在 Google Sheets 中拥有数据存储
高级
这是一个Personal Productivity、Multimodal AI领域的自动化工作流,包含 24 个节点。主要使用 If、Filter、Markdown、Telegram、HttpRequest 等节点。 个人知识助手:通过 Telegram 和 Google Sheets 提取和检索摘要
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •Google Gemini API Key
使用的节点 (24 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "EmfC3k9BlwxWhpVL",
"meta": {
"instanceId": "c4f1db98ecd74178a70f7f17c9b35261941324e33fdfcec8910ff8cb10d8482d",
"templateCredsSetupCompleted": true
},
"name": "在 Google Sheets 中拥有数据存储",
"tags": [],
"nodes": [
{
"id": "482f66af-0622-4af8-acee-0e48a07f3f96",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
-64,
192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "46ee98fc-c32a-4a49-bba8-c8d331f64071",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": "youtu.be"
},
{
"id": "8711d4b1-3512-445e-8415-aa1bf2394a62",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": "youtube.com"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "17ba2dbc-9e23-46ce-bded-ecfe17b5233b",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
144,
48
],
"parameters": {
"url": "=Apify Actor - YouTube Transcript Ninja EndPoint URL",
"method": "POST",
"options": {},
"jsonBody": "={\n \"includeTimestamps\": \"No\",\n \"language\": \"English\",\n \"startUrls\": [\n \"{{ $json['URL '] }}\"\n ]\n}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "85da4c7f-ba57-4928-b6ec-0504666799b2",
"name": "Google Gemini 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
672,
400
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "GiIu80nc6smpNhlo",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "f3e1374e-a910-4320-997b-6d45067e3cc7",
"name": "HTTP请求1",
"type": "n8n-nodes-base.httpRequest",
"position": [
144,
288
],
"parameters": {
"url": "={{ $json['URL '] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "63773875-8a87-455b-8919-070126ca879b",
"name": "Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
352,
288
],
"parameters": {
"html": "={{ $json.data }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "aaf6e1d7-6834-4c37-bece-e23f37f3299f",
"name": "信息提取器",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
560,
288
],
"parameters": {
"text": "=Article: {{ $json.data }}",
"options": {},
"attributes": {
"attributes": [
{
"name": "Title",
"required": true,
"description": "a title for this article"
},
{
"name": "Article Refined Data",
"required": true,
"description": "a detailed summary from the article to add that in my Supabase. Don't start with this article or this thing."
}
]
}
},
"typeVersion": 1.2
},
{
"id": "b470fda2-69f2-49c7-b158-65cb3448941f",
"name": "Google Gemini聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
464,
160
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "GiIu80nc6smpNhlo",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "e3ab773c-ef99-4335-b1e6-c30ae2c6fa0d",
"name": "信息提取器1",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
352,
48
],
"parameters": {
"text": "=YouTube Video Transcript: {{ $json.transcript }}",
"options": {},
"attributes": {
"attributes": [
{
"name": "Title",
"required": true,
"description": "a title for this video"
},
{
"name": "Article Refined Data",
"required": true,
"description": "a detailed summary from the transcript to add that in my Supabase. Don't start with this video or like this thing."
}
]
}
},
"typeVersion": 1.2
},
{
"id": "8609fbb2-2fe4-4e25-bb0f-8ba6ad31fb29",
"name": "Telegram触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-576,
-480
],
"webhookId": "14bb747d-e6e1-46a6-b704-f138ba2fab52",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "g5nSKwTdMzgLF6dL",
"name": "Telegram account 2"
}
},
"typeVersion": 1.2
},
{
"id": "1ec9c1f4-6da1-46fd-8cdc-46d847b07c70",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-368,
-480
],
"parameters": {
"text": "=User Request: {{ $json.message.text }}",
"options": {
"systemMessage": "when user asks something give the answer from the given google sheet and after searching the google sheet if you don't found then politely apologies to the user."
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "f1892eab-e3f3-40aa-a131-a5b5b1efde69",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-368,
-320
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "GiIu80nc6smpNhlo",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "c017c9b2-adc7-43fa-8d1e-1b9d8d377179",
"name": "发送短信",
"type": "n8n-nodes-base.telegram",
"position": [
-16,
-480
],
"webhookId": "3b9181ff-c6cc-4fa1-8471-14d08eba5fea",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "g5nSKwTdMzgLF6dL",
"name": "Telegram account 2"
}
},
"typeVersion": 1.2
},
{
"id": "964d23b1-d113-4932-a40b-b06549ece0e7",
"name": "在 Google Sheets 中获取行数据",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
-176,
-320
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja9l041N41e8rfxC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "86e55dcc-5938-402e-b57d-e1fc059007bd",
"name": "在表格中添加行",
"type": "n8n-nodes-base.googleSheets",
"position": [
736,
48
],
"parameters": {
"columns": {
"value": {
"Data": "={{ $json.output['Article Refined Data'] }}",
"Title": "={{ $json.output.Title }}"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data",
"type": "string",
"display": true,
"required": false,
"displayName": "Data",
"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/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja9l041N41e8rfxC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "c5b9b48e-3866-4c8c-88c1-b4b7eb3e4124",
"name": "在表格1中追加行",
"type": "n8n-nodes-base.googleSheets",
"position": [
928,
288
],
"parameters": {
"columns": {
"value": {
"Data": "={{ $json.output['Article Refined Data'] }}",
"Title": "={{ $json.output.Title }}"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data",
"type": "string",
"display": true,
"required": false,
"displayName": "Data",
"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/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja9l041N41e8rfxC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "99a38def-5b64-4507-94d8-5cf47ccb7ce2",
"name": "在表格中追加或更新行",
"type": "n8n-nodes-base.googleSheets",
"position": [
1136,
288
],
"parameters": {
"columns": {
"value": {
"URL ": "={{ $('Google Sheets Trigger').item.json['URL '] }}",
"Stored": "✅"
},
"schema": [
{
"id": "URL ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "URL ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Stored",
"type": "string",
"display": true,
"required": false,
"displayName": "Stored",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"URL "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja9l041N41e8rfxC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "ab850a10-f51f-4ab7-a498-f8c8ad0f29ba",
"name": "Google Sheets 触发器",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-496,
192
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "AoSDhSGRa5HeSzzp",
"name": "Google Sheets Trigger account"
}
},
"typeVersion": 1
},
{
"id": "2a200cc4-797d-41af-9b7a-141932ba3adc",
"name": "筛选",
"type": "n8n-nodes-base.filter",
"position": [
-288,
192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a8608350-5169-4bb1-b918-0a1f5cc13b49",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": ""
},
{
"id": "f2ebc482-feb4-49fa-975b-c68db3cb7a37",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.Stored }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7d1bcee5-48e5-48d2-8c39-f0e34911d637",
"name": "在 sheet2 中追加或更新行",
"type": "n8n-nodes-base.googleSheets",
"position": [
944,
48
],
"parameters": {
"columns": {
"value": {
"URL ": "={{ $('Google Sheets Trigger').item.json['URL '] }}",
"Stored": "✅"
},
"schema": [
{
"id": "URL ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "URL ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Stored",
"type": "string",
"display": true,
"required": false,
"displayName": "Stored",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"URL "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja9l041N41e8rfxC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "a347917e-bacd-418c-861b-ad6149739922",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-576
],
"parameters": {
"color": 6,
"width": 896,
"height": 432,
"content": "# 请求数据"
},
"typeVersion": 1
},
{
"id": "7962782e-1a0b-47d1-b282-f6ff248de89d",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-32
],
"parameters": {
"color": 6,
"width": 2080,
"height": 592,
"content": "# 通过 YouTube 视频 URL / 文章链接存储数据"
},
"typeVersion": 1
},
{
"id": "6a44be32-f815-4211-ae78-512c790c7060",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
80
],
"parameters": {
"color": 6,
"width": 1184,
"height": 480,
"content": "---"
},
"typeVersion": 1
},
{
"id": "28025c13-a495-4642-95e7-9553270eae82",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
-672
],
"parameters": {
"color": 6,
"width": 464,
"height": 208,
"content": ""
},
"typeVersion": 1
},
{
"id": "d64e3424-3c87-4847-85a1-adb924c1cde2",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
-352
],
"parameters": {
"color": 6,
"width": 544,
"height": 320,
"content": "# 2️⃣ 使用方法"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "64e8f139-a1ad-49de-8218-23eb6fd3ddbe",
"connections": {
"If": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Markdown": {
"main": [
[
{
"node": "Information Extractor",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Information Extractor1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Markdown",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Append or update row in sheet2",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet1": {
"main": [
[
{
"node": "Append or update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor": {
"main": [
[
{
"node": "Append row in sheet1",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor1": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Information Extractor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model2": {
"ai_languageModel": [
[
{
"node": "Information Extractor1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get row(s) in sheet in Google Sheets": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Personal Productivity、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI潜在客户挖掘智能体
使用Apify、AI和Gmail的自动化潜在客户生成与冷邮件发送
If
Set
Wait
+11
20 节点Rakin Jakaria
Lead Generation
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
Other
求职申请代理
求职申请自动化代理
If
Form
Markdown
+9
15 节点Rakin Jakaria
Multimodal AI
一体化智能体
个人AI智能体
If
Gmail
Telegram
+13
30 节点Rakin Jakaria
AI Chatbot
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
Content Creation
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
Content Creation