Google Sheets MCP - AI驱动的电子表格管理
中级
这是一个Document Extraction, AI Chatbot领域的自动化工作流,包含 15 个节点。主要使用 GoogleSheetsTool, McpTrigger 等节点。 Google Sheets MCP - AI驱动的电子表格管理系统
前置要求
- •Google Sheets API 凭证
使用的节点 (15)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "gNccaz3KI4Gcu7kK",
"meta": {
"instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
"templateCredsSetupCompleted": true
},
"name": "Google Sheets MCP - AI-Powered Spreadsheet Management",
"tags": [],
"nodes": [
{
"id": "85846eda-cf7f-49a1-a4da-b4bf36e81ae6",
"name": "MCP Server Trigger",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"notes": "🚀 MCP TRIGGER\n\nThis is the entry point for AI interactions with Google Sheets. The MCP (Model Context Protocol) trigger allows AI models to call any of the connected Google Sheets tools based on user requests.\n\nKey Features:\n• Enables natural language spreadsheet commands\n• Routes AI requests to appropriate Sheets operations\n• Provides context-aware data management\n• Supports complex multi-step data workflows\n• Handles dynamic sheet and document selection",
"position": [
1000,
420
],
"webhookId": "f0a1fd29-3717-4827-a4d8-ad975f43c401",
"parameters": {
"path": "f0a1fd29-3717-4827-a4d8-ad975f43c401"
},
"typeVersion": 1.1
},
{
"id": "8c2b82d3-f571-4af5-87ac-b26b46a2985c",
"name": "Google Sheets - Read Data",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "📊 READ SPREADSHEET DATA\n\nRetrieve and analyze data from Google Sheets. Perfect for AI to read, process, and extract insights from spreadsheet content.\n\nUse Cases:\n• \"Read data from the Sales sheet\"\n• \"Get all entries from A1:E100\"\n• \"Show me the data in the Budget spreadsheet\"\n• \"Extract customer information from the CRM sheet\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• Sheet_Name: Specific sheet tab name\n• Range: Cell range to read (optional)",
"position": [
680,
740
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sheet_Name', ``, 'string') }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "e606582e-2fea-4052-b8a4-875a0ae8f42e",
"name": "Google Sheets - Clear Data",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "🗑️ CLEAR SPREADSHEET DATA\n\nRemove data from specific ranges or entire sheets. Useful for resetting data, clearing temporary calculations, or preparing sheets for new data.\n\nUse Cases:\n• \"Clear all data from the temp sheet\"\n• \"Remove entries from A1:E100\"\n• \"Clean up the old data in column C\"\n• \"Reset the calculation area\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• Sheet_Name: Sheet to clear data from\n• Range: Specific range to clear\n\n⚠️ Use with caution - data will be permanently removed!",
"position": [
800,
960
],
"parameters": {
"operation": "clear",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sheet_Name', ``, 'string') }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "d73fb9da-e492-45bb-8c47-16a375ff48de",
"name": "Google Sheets - Add Data",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "➕ ADD NEW DATA\n\nAppend new rows of data to existing sheets. Perfect for adding records, logging events, or inserting new entries without affecting existing data.\n\nUse Cases:\n• \"Add a new customer to the CRM sheet\"\n• \"Log today's sales data\"\n• \"Insert a new project entry\"\n• \"Record the meeting notes\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• Sheet_Name: Sheet to add data to\n• Data_To_Add: Array/object of new data\n\nFeatures:\n• Automatically finds next empty row\n• Preserves existing data\n• Supports multiple columns",
"position": [
1240,
940
],
"parameters": {
"columns": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Data_To_Add', ``, 'object') }}",
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sheet_Name', ``, 'string') }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "485f44aa-ae5e-4baf-9a3b-6ca43a58d59e",
"name": "Google Sheets - Create Sheet",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "📋 CREATE NEW SHEET\n\nCreate new worksheet tabs within existing spreadsheets. Great for organizing data into categories or creating project-specific sheets.\n\nUse Cases:\n• \"Create a new sheet called 'Q4 Sales'\"\n• \"Add a Project Timeline sheet\"\n• \"Make a new Budget 2024 tab\"\n• \"Create a sheet for customer feedback\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• New_Sheet_Name: Name for the new sheet\n• Header_Row: Optional column headers\n\nBest Practices:\n• Use descriptive sheet names\n• Include header rows for data structure\n• Consider sheet organization strategy",
"position": [
1560,
960
],
"parameters": {
"options": {},
"operation": "create",
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "30dfee2a-fdf0-48e0-bb8d-08a574ced352",
"name": "Google Sheets - Update Data",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "✏️ UPDATE EXISTING DATA\n\nModify specific cells or ranges with new values. Perfect for updating records, correcting data, or maintaining current information.\n\nUse Cases:\n• \"Update the status in cell C5 to 'Complete'\"\n• \"Change the price in the product list\"\n• \"Modify the project deadline\"\n• \"Update customer contact information\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• Sheet_Name: Sheet containing data to update\n• Range: Specific cells to update (e.g., A1:B2)\n• New_Values: Array of new values\n\nTip: Use precise ranges to avoid overwriting unintended data",
"position": [
1700,
740
],
"parameters": {
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sheet_Name', ``, 'string') }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "acc210e5-0873-4da9-9e55-c59a0a413ce8",
"name": "Sticky Note - Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
140
],
"parameters": {
"color": 4,
"width": 420,
"height": 544,
"content": "## 🎯 WORKFLOW OVERVIEW\n\n**Google Sheets MCP - AI-Powered Spreadsheet Management**\n\nThis workflow provides a complete toolkit for intelligent spreadsheet management through AI interactions using the Model Context Protocol (MCP).\n\n**Core Capabilities:**\n• 📊 Read and analyze spreadsheet data\n• ➕ Add new records and entries\n• ✏️ Update existing information\n• 🗑️ Clear data and reset ranges\n• 📋 Create new worksheet tabs\n• 🤖 Natural language commands\n\n**Getting Started:**\n1. Ensure Google Sheets OAuth2 is configured\n2. Test each tool individually\n3. Use natural language with your AI\n4. Monitor workflow execution logs\n5. Start with simple read operations"
},
"typeVersion": 1
},
{
"id": "e906915d-868e-4491-8cb2-dcc7906a604a",
"name": "Sticky Note - MCP Trigger",
"type": "n8n-nodes-base.stickyNote",
"position": [
700,
260
],
"parameters": {
"color": 7,
"width": 600,
"height": 324,
"content": "## 🚀 Google Sheets MCP - AI-Powered Spreadsheet Management\n**What it does:**\nThis is the entry point for AI interactions with Google Sheets. The MCP trigger enables natural language spreadsheet commands.\n\n**Key Features:**\n• Enables conversational data management\n• Routes AI requests to appropriate operations\n• Supports dynamic sheet selection\n• Handles complex multi-step workflows\n• Provides context-aware responses\n\n**Example Commands:**\n\"Read data from the Sales sheet\"\n\"Add a new customer record\"\n\"Update the project status\"\n\"Create a new budget sheet\""
},
"typeVersion": 1
},
{
"id": "cf61c826-e464-4071-ad3d-011aef99e1c3",
"name": "Sticky Note - Read Data",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
700
],
"parameters": {
"width": 300,
"height": 264,
"content": "## 📊 READ DATA\n\n**Purpose:**\nRetrieve and analyze data from Google Sheets for AI processing and insights.\n\n**Use Cases:**\n• \"Show me all customer data\"\n• \"Read the sales figures from Q3\"\n• \"Get project status from column D\"\n• \"Extract budget information\"\n\n**AI Parameters:**\n• **Document_ID:** Spreadsheet identifier\n• **Sheet_Name:** Target worksheet tab\n• **Range:** Cell range (optional)\n\n**Returns:** Raw data for AI analysis"
},
"typeVersion": 1
},
{
"id": "5f72082c-1db4-4645-830e-24b1c773e7a0",
"name": "Sticky Note - Clear Data",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
1080
],
"parameters": {
"color": 3,
"width": 300,
"height": 264,
"content": "## 🗑️ CLEAR DATA\n\n**Purpose:**\nRemove data from specific ranges or entire sheets safely and efficiently.\n\n**Use Cases:**\n• \"Clear the temporary calculations\"\n• \"Remove old data from column C\"\n• \"Reset the input area\"\n• \"Clean up test entries\"\n\n**AI Parameters:**\n• **Document_ID:** Target spreadsheet\n• **Sheet_Name:** Sheet to clear\n• **Range:** Specific area to clear\n\n**⚠️ Warning:** Data removal is permanent"
},
"typeVersion": 1
},
{
"id": "96caf21f-d904-425a-ad34-2360dfadb512",
"name": "Sticky Note - Add Data",
"type": "n8n-nodes-base.stickyNote",
"position": [
1140,
1060
],
"parameters": {
"color": 7,
"width": 300,
"height": 264,
"content": "## ➕ ADD DATA\n\n**Purpose:**\nAppend new records to existing sheets without affecting current data.\n\n**Use Cases:**\n• \"Add new customer: John Doe, email@example.com\"\n• \"Log today's sales: $1,500\"\n• \"Insert project milestone\"\n• \"Record meeting attendance\"\n\n**AI Parameters:**\n• **Document_ID:** Target spreadsheet\n• **Sheet_Name:** Destination sheet\n• **Data_To_Add:** New row data\n\n**Feature:** Auto-finds next empty row"
},
"typeVersion": 1
},
{
"id": "619266af-fddc-4513-9d5d-dad87bec1372",
"name": "Sticky Note - Create Sheet",
"type": "n8n-nodes-base.stickyNote",
"position": [
1660,
1020
],
"parameters": {
"color": 5,
"width": 300,
"height": 264,
"content": "## 📋 CREATE SHEET\n\n**Purpose:**\nCreate new worksheet tabs for better data organization and project management.\n\n**Use Cases:**\n• \"Create 'Q4 Budget' sheet\"\n• \"Add new project tracking tab\"\n• \"Make customer feedback sheet\"\n• \"Create monthly report tab\"\n\n**AI Parameters:**\n• **Document_ID:** Target spreadsheet\n• **New_Sheet_Name:** Tab name\n• **Header_Row:** Column headers\n\n**Tip:** Use descriptive names"
},
"typeVersion": 1
},
{
"id": "00e466ab-52cf-4848-b830-49a324312c93",
"name": "Sticky Note - Update Data",
"type": "n8n-nodes-base.stickyNote",
"position": [
1820,
700
],
"parameters": {
"color": 3,
"width": 300,
"height": 264,
"content": "## ✏️ UPDATE DATA\n\n**Purpose:**\nModify specific cells with new values while preserving surrounding data.\n\n**Use Cases:**\n• \"Update status in C5 to 'Complete'\"\n• \"Change price in product list\"\n• \"Modify project deadline\"\n• \"Update contact information\"\n\n**AI Parameters:**\n• **Document_ID:** Target spreadsheet\n• **Sheet_Name:** Source sheet\n• **Range:** Cells to update (e.g., A1:B2)\n• **New_Values:** Replacement data\n\n**Tip:** Use precise cell references"
},
"typeVersion": 1
},
{
"id": "7a2db25c-df9b-4889-bbd7-978dc7752148",
"name": "Google Sheets - Delete Sheet",
"type": "n8n-nodes-base.googleSheetsTool",
"notes": "🗑️ DELETE SHEET\n\nRemove entire worksheet tabs when they're no longer needed. Use with caution as this permanently removes all data in the sheet.\n\nUse Cases:\n• \"Delete the old temp sheet\"\n• \"Remove the expired project tab\"\n• \"Clean up test worksheets\"\n• \"Delete duplicate sheets\"\n\nAI Parameters:\n• Document_ID: Target spreadsheet ID\n• Sheet_Name: Sheet tab to delete\n\n⚠️ PERMANENT ACTION - Cannot be undone!\nAlways backup important data first.",
"position": [
1640,
280
],
"parameters": {
"operation": "deleteSheet",
"documentId": {
"__rl": true,
"mode": "list",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Document_ID', ``, 'string') }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "jbsHmT1qCK9d35Ou",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.6
},
{
"id": "1e8ed3ca-c35a-4153-a094-4eed0d55609c",
"name": "Sticky Note - Delete Sheet",
"type": "n8n-nodes-base.stickyNote",
"position": [
1700,
340
],
"parameters": {
"color": 4,
"width": 300,
"height": 284,
"content": "## 🗑️ DELETE SHEET\n\n**Purpose:**\nPermanently remove entire worksheet tabs and all their contained data.\n\n**Use Cases:**\n• \"Delete the old testing sheet\"\n• \"Remove expired project tabs\"\n• \"Clean up temporary worksheets\"\n• \"Delete duplicate or unused sheets\"\n\n**AI Parameters:**\n• **Document_ID:** Target spreadsheet\n• **Sheet_Name:** Tab to remove\n\n**⚠️ CRITICAL WARNING:**\nThis permanently deletes ALL data in the sheet.\nOperation cannot be undone!\nAlways backup important data first."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c61bdb9c-ed39-42fe-8719-eac78ff012ef",
"connections": {
"Google Sheets - Add Data": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Sheets - Read Data": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Sheets - Clear Data": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Sheets - Update Data": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Sheets - Create Sheet": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Sheets - Delete Sheet": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 文档提取, AI 聊天机器人
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Airtable MCP
Airtable中的AI驱动联系人管理,支持自然语言命令
Airtable Tool
Mcp Trigger
10 节点David Olusola
客户关系管理
构建您的第一个带有备用模型的电子邮件代理
构建您的第一个自动化电子邮件支持代理(AI备用方案与日志记录)
Gmail
Gmail Trigger
Agent
+5
11 节点David Olusola
工单管理
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
Set
Gmail
Slack
+35
80 节点Paul
文档提取
基于 Gemini 2.0 Flash AI 和 Google Sheets 的对话式线索捕获
基于 Gemini 2.0 Flash AI 和 Google Sheets 的对话式线索捕获
Webhook
Agent
Google Sheets Tool
+4
10 节点David Olusola
潜在客户开发
Gmail MCP工作流 - AI驱动的邮件管理
Gmail MCP工作流 - AI驱动的邮件管理
Gmail Tool
Mcp Trigger
15 节点David Olusola
工单管理
AI 助手已更新
Stacey - 您的 Telegram AI 助手(基于 MCP、Gemini 和 Google 工具)
Set
Code
Switch
+15
32 节点David Olusola
其他
工作流信息
难度等级
中级
节点数量15
分类2
节点类型3
作者
David Olusola
@dae221AI automation consultant working with ambitious businesses on their most complex operational challenges. For project inquiries, reach me at david@daexai.com
外部链接
在 n8n.io 查看 →
分享此工作流