通过OpenAI的GPT-4汇总Google Sheets表单反馈
中级
这是一个AI领域的自动化工作流,包含 10 个节点。主要使用 Gmail, OpenAi, Markdown, Aggregate, GoogleSheets 等节点,结合人工智能技术实现智能自动化。 通过OpenAI的GPT-4汇总Google Sheets表单反馈
前置要求
- •Google 账号和 Gmail API 凭证
- •OpenAI API Key
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "Lwvu2jjMU2irTyAY",
"meta": {
"instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a"
},
"name": "通过 OpenAI 的 GPT-4 汇总 Google Sheets 表单反馈",
"tags": [
{
"id": "y9tvM3hISJKT2jeo",
"name": "Ted's Tech Talks",
"createdAt": "2023-08-15T22:12:34.260Z",
"updatedAt": "2023-08-15T22:12:34.260Z"
}
],
"nodes": [
{
"id": "cd80cd2f-a6e1-48eb-ba05-0f8f1a0875e5",
"name": "点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
680,
320
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9f03f1c4-c47e-4eda-bc0a-a598c21e4616",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
130
],
"parameters": {
"width": 369.1031874662338,
"height": 349,
"content": "### 1. 创建 Google Sheets 文档"
},
"typeVersion": 1
},
{
"id": "1e478f81-76e7-4fc3-a147-11a92d3f9998",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
160
],
"parameters": {
"width": 394,
"height": 319,
"content": "### 2. 将所有回答合并到数组中"
},
"typeVersion": 1
},
{
"id": "1ab06b51-3b9e-4a4c-afba-c98e529a636c",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
160
],
"parameters": {
"width": 432,
"height": 319,
"content": "### 3. 生成摘要报告"
},
"typeVersion": 1
},
{
"id": "ce0118a3-4eaf-4d60-adf0-5bde5d41328a",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1940,
160
],
"parameters": {
"width": 359.1031874662346,
"height": 319,
"content": "### 4. 转换为 HTML 并发送电子邮件"
},
"typeVersion": 1
},
{
"id": "37bc8ab5-328c-4f50-bbda-f7482bf36522",
"name": "获取 Google Sheets 记录",
"type": "n8n-nodes-base.googleSheets",
"position": [
860,
320
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 2035968519,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Kcr1oF_RrfNQJczmJDpwClOSYpvSnwbeX-_pdUo91-I/edit#gid=2035968519",
"cachedResultName": "Form Responses 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1Kcr1oF_RrfNQJczmJDpwClOSYpvSnwbeX-_pdUo91-I",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Kcr1oF_RrfNQJczmJDpwClOSYpvSnwbeX-_pdUo91-I/edit?usp=drivesdk",
"cachedResultName": "Event feedback form (Responses)"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "RtRiRezoxiWkzZQt",
"name": "Ted's Tech Talks Google account"
}
},
"typeVersion": 4.2
},
{
"id": "d75b11b1-2cce-40c2-ab5a-d18fdf7f5283",
"name": "将响应聚合到数组中",
"type": "n8n-nodes-base.aggregate",
"position": [
1200,
320
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "['What went great?']"
},
{
"fieldToAggregate": "['How can we improve?']"
},
{
"fieldToAggregate": "['What is the chance of recommending our event?']"
}
]
}
},
"typeVersion": 1
},
{
"id": "a90f83fe-809b-42db-b65d-43fb11b2979a",
"name": "通过 GPT 模型汇总",
"type": "n8n-nodes-base.openAi",
"position": [
1620,
320
],
"parameters": {
"prompt": {
"messages": [
{
"role": "system",
"content": "Your task is to summarize event feedback form responses. You will receive answers on three questions:\n1. What went great?\n2. How can we improve?\n3. What is the chance of recommending our event?\n\nEach questions has several answers separated by | character.\nAnalyze each question and prepare a summary report. It should contain an overall sentiment regarding the event, followed by the constructive ideas of what to improve.\n\nReply in Markdown formatting"
},
{
"content": "=1. What went great: ```{{ $json['What went great?'].join(' | ') }}```\n2. How can we improve: ```{{ $json['How can we improve?'].join(' | ') }}```\n3. What is the chance of recommending our event: ```{{ $json['What is the chance of recommending our event?'].join(' | ') }}```"
}
]
},
"options": {
"temperature": 0.3
},
"resource": "chat",
"chatModel": "gpt-4-turbo-preview"
},
"credentials": {
"openAiApi": {
"id": "rveqdSfp7pCRON1T",
"name": "Ted's Tech Talks OpenAi"
}
},
"typeVersion": 1.1
},
{
"id": "2c8d4e46-9d3e-4655-952b-37d04f673914",
"name": "从 Markdown 转换为 HTML",
"type": "n8n-nodes-base.markdown",
"position": [
1980,
320
],
"parameters": {
"mode": "markdownToHtml",
"options": {
"completeHTMLDocument": false
},
"markdown": "={{ $json.message.content }}"
},
"typeVersion": 1
},
{
"id": "a27d8664-dc87-4458-9f12-970b88ab6515",
"name": "通过 Gmail 发送",
"type": "n8n-nodes-base.gmail",
"position": [
2160,
320
],
"parameters": {
"sendTo": "teds.tech.talks@gmail.com",
"message": "={{ $json.data }}",
"options": {
"appendAttribution": false
},
"subject": "Feedback form response"
},
"credentials": {
"gmailOAuth2": {
"id": "UllrXlZsDnkdA3tT",
"name": "Gmail account"
}
},
"typeVersion": 2.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "756cdd85-49dd-4f0f-acc7-58f834a3512f",
"connections": {
"Summarize via GPT model": {
"main": [
[
{
"node": "Convet from Markdown to HTML",
"type": "main",
"index": 0
}
]
]
},
"Get Google Sheets records": {
"main": [
[
{
"node": "Aggregate responses into arrays",
"type": "main",
"index": 0
}
]
]
},
"Convet from Markdown to HTML": {
"main": [
[
{
"node": "Send via Gmail",
"type": "main",
"index": 0
}
]
]
},
"When clicking \"Test workflow\"": {
"main": [
[
{
"node": "Get Google Sheets records",
"type": "main",
"index": 0
}
]
]
},
"Aggregate responses into arrays": {
"main": [
[
{
"node": "Summarize via GPT model",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动化博客撰写与社交媒体推广代理
使用GPT-4、Perplexity和WordPress自动化SEO博客创建+社交媒体
Set
Code
Gmail
+21
79 节点LukaszB
设计
#️⃣Nostr #damus AI驱动报告 + Gmail + Telegram
Nostr #damus AI 驱动报告 + Gmail + Telegram
Gmail
Merge
Markdown
+8
24 节点Joseph LePage
人工智能
使用Gmail、OpenAI和Google表格自动化敏捷细化准备
使用Gmail、OpenAI和Google表格自动化敏捷细化准备
If
Set
Gmail
+14
51 节点Willemijn
产品
博客WordPress复制销售
使用GPT-4、Perplexity AI和WordPress自动化SEO博客内容创建
Set
Code
Notion
+16
39 节点LukaszB
人工智能
在Braze中更新现有邮件模板
使用AI为Instagram、Facebook、LinkedIn和X自动化社交媒体内容
Set
Gmail
Merge
+22
73 节点LukaszB
设计
敏捷团队冲刺规划自动化
使用OpenAI、Google日历和Gmail为敏捷团队自动化冲刺规划
If
Set
Code
+17
52 节点Willemijn
产品