使用 AI 和 n8n 表单筛选预约请求
高级
这是一个Sales, Product, AI领域的自动化工作流,包含 25 个节点。主要使用 If, Set, Form, Gmail, FormTrigger 等节点,结合人工智能技术实现智能自动化。 使用 AI 和 n8n 表单筛选预约请求
前置要求
- •Google 账号和 Gmail API 凭证
- •OpenAI API Key
使用的节点 (25)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
},
"nodes": [
{
"id": "76589d1c-45f3-4a89-906f-8ef300d34964",
"name": "n8n 表单触发器",
"type": "n8n-nodes-base.formTrigger",
"position": [
-2520,
-280
],
"webhookId": "5e7637dd-d222-4786-8cdc-7b66cebc1481",
"parameters": {
"path": "schedule_appointment",
"options": {
"ignoreBots": true,
"appendAttribution": true,
"useWorkflowTimezone": true
},
"formTitle": "Schedule an Appointment",
"formFields": {
"values": [
{
"fieldLabel": "Your Name",
"placeholder": "eg. Sam Smith",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email",
"placeholder": "eg. sam@example.com",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Enquiry",
"placeholder": "eg. I'm looking for...",
"requiredField": true
}
]
},
"formDescription": "Welcome to Jim's Appointment Form.\nBefore we set a date, please tell me a little about yourself and how I can help."
},
"typeVersion": 2.1
},
{
"id": "194b7073-fa33-4e75-85ed-c02724c8075c",
"name": "表单结束",
"type": "n8n-nodes-base.form",
"position": [
-420,
-260
],
"webhookId": "8fcc907b-bc2e-4fdf-a829-82c83e677724",
"parameters": {
"options": {
"formTitle": "Appointment Request Sent!"
},
"operation": "completion",
"completionTitle": "Appointment Request Sent!",
"completionMessage": "=Thank you for submitting an appointment request. A confirmation of this request will be sent to your inbox. I'll get back to you shortly with a confirmation of the appointment.\n\nHere is the summary of the appointment request.\n\nName: {{ $('Get Form Values').item.json.name }}\nDate & Time: {{ DateTime.fromISO($('Get Form Values').item.json.dateTime).format('EEE, dd MMM @ t') }}\nEnquiry: {{ $('Get Form Values').item.json.enquiry.trim() }}\n"
},
"typeVersion": 1
},
{
"id": "688ea2cc-b595-4b6f-9214-d5dfd3893172",
"name": "输入日期和时间",
"type": "n8n-nodes-base.form",
"position": [
-1260,
-320
],
"webhookId": "0cd03415-66f8-4c82-8069-5bfd8ea310bd",
"parameters": {
"options": {
"formTitle": "Enter a Date & Time",
"formDescription": "=Please select a date and time"
},
"defineForm": "json",
"jsonOutput": "={{\n[\n {\n \"fieldLabel\":\"Date\",\n \"requiredField\":true,\n \"fieldType\": \"dropdown\",\n \"fieldOptions\":\n Array(5).fill(0)\n .map((_,idx) => $now.plus(idx+1, 'day'))\n .filter(d => !d.isWeekend)\n .map(d => ({ option: d.format('EEE, d MMM') }))\n },\n {\n \"fieldLabel\": \"Time\",\n \"requiredField\": true,\n \"fieldType\": \"dropdown\",\n \"fieldOptions\": [\n { \"option\": \"9:00 am\" },\n { \"option\": \"10:00 am\" },\n { \"option\": \"11:00 am\" },\n { \"option\": \"12:00 pm\" },\n { \"option\": \"1:00 pm\" },\n { \"option\": \"2:00 pm\" },\n { \"option\": \"3:00 pm\" },\n { \"option\": \"4:00 pm\" },\n { \"option\": \"5:00 pm\" },\n { \"option\": \"6:00 pm\" }\n ]\n }\n]\n}}"
},
"typeVersion": 1
},
{
"id": "602c40f9-ab11-4908-aab3-1a199126e097",
"name": "获取表单值",
"type": "n8n-nodes-base.set",
"position": [
-900,
-260
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{\n{\n name: $('n8n Form Trigger').first().json['Your Name'],\n email: $('n8n Form Trigger').first().json.Email,\n enquiry: $('n8n Form Trigger').first().json.Enquiry,\n dateTime: DateTime.fromFormat(`${$json.Date} ${$json.Time}`, \"EEE, dd MMM t\"),\n submittedAt: $('n8n Form Trigger').first().json.submittedAt,\n}\n}}"
},
"typeVersion": 3.4
},
{
"id": "21f93645-5e27-4e9f-a72c-47a39e42a79c",
"name": "条款与条件",
"type": "n8n-nodes-base.form",
"position": [
-1680,
-240
],
"webhookId": "dcf32f99-8fb7-457a-8a58-ac1a018b1873",
"parameters": {
"options": {
"formTitle": "Before we continue...",
"formDescription": "=Terms and Conditions for Booking an Appointment\n\nNon-Binding Nature of Discussions:\nAny information shared, discussed, or agreed upon during the call is non-binding and provisional. No agreement, service, or commitment shall be considered confirmed unless explicitly documented and agreed to in writing.\n\nProhibition of Recording and Note-Taking Tools:\nBy proceeding with the appointment, the user agrees not to use AI assistants, note-taking applications, recording devices, or any other technology to record or transcribe the conversation, whether manually or automatically. This is to ensure confidentiality and respect for the integrity of the discussion.\n\nConfirmation of Understanding:\nBy booking this appointment, you acknowledge and accept these terms and conditions in full."
},
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Please select",
"multiselect": true,
"fieldOptions": {
"values": [
{
"option": "I accept the terms and conditions"
}
]
},
"requiredField": true
}
]
}
},
"typeVersion": 1
},
{
"id": "22e03fec-bd56-4fc3-864a-f1e81a864cb5",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2340,
-140
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "8b4e9bba-cd57-46af-8042-4b47e5ebcd82",
"name": "是否已接受?",
"type": "n8n-nodes-base.if",
"position": [
-1500,
-240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bc7c3e99-e610-4997-82a7-4851f2c04c19",
"operator": {
"type": "string",
"operation": "startsWith"
},
"leftValue": "={{ $json[\"Please select\"] }}",
"rightValue": "I accept"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "627a4c00-e831-4a77-8aad-f417f0f8e6dd",
"name": "发送收据",
"type": "n8n-nodes-base.gmail",
"position": [
-580,
-260
],
"webhookId": "5f590407-4ab9-4ae6-bb85-38dbe41d6dce",
"parameters": {
"sendTo": "={{ $('Get Form Values').first().json.email }}",
"message": "=<p>Dear {{ $('Get Form Values').first().json.name }},</p>\n<p>Thanks for requesting an appointment. We will review and get back to you shortly.</p>\n<p>Here is the summary of the request that was sent:</p>\n<p>\nName: {{ $('Get Form Values').first().json.name }}<br/>\nEmail: {{ $('Get Form Values').first().json.email }}<br/>\nEnquiry: {{ $('Get Form Values').first().json.enquiry }}<br/>\nSubmitted at: {{ $('Get Form Values').first().json.submittedAt }}\n</p>\n",
"options": {},
"subject": "=Appointment Request Received for {{ DateTime.fromISO($('Get Form Values').first().json.dateTime).format('EEE, dd MMM @ t') }}"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "91d3dd7d-53f8-4f8e-9af2-ec54cf7f42ad",
"name": "等待审批",
"type": "n8n-nodes-base.gmail",
"position": [
340,
-260
],
"webhookId": "ab9c6c5e-334d-44bb-a8fd-a58140bc680d",
"parameters": {
"sendTo": "=admin@example.com",
"message": "=<h2>A new appointment request was submitted!</h2>\n<p>\nRequesting appointment date is <strong>{{ DateTime.fromISO($('Execute Workflow Trigger').item.json.dateTime).format('EEE, dd MMM @ t') }}</strong>.\n</p>\n<p>\nName: {{ $('Execute Workflow Trigger').first().json.name }}<br/>\nEmail: {{ $('Execute Workflow Trigger').first().json.email }}<br/>\nEnquiry Summary: {{ $json.text }}<br/>\nSubmitted at: {{ $('Execute Workflow Trigger').first().json.submittedAt }}\n</p>",
"subject": "New Appointment Request!",
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double",
"approveLabel": "Confirm"
}
}
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "7a02b57b-b9b1-45b1-9b3d-aebb84259875",
"name": "是否已批准?",
"type": "n8n-nodes-base.if",
"position": [
520,
-260
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e5e37acb-9e9d-4a9e-bf59-a35dfc035886",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "96aab8be-4c5e-4e14-a6ea-6d2b743551be",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
0,
-120
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "6f2b5454-70a3-4391-b785-bb871c3e2081",
"name": "创建预约",
"type": "n8n-nodes-base.googleCalendar",
"position": [
720,
-340
],
"parameters": {
"end": "={{ DateTime.fromISO($('Execute Workflow Trigger').first().json.dateTime).plus(30, 'minute').toISO() }}",
"start": "={{ $('Execute Workflow Trigger').first().json.dateTime }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "c_5792bdf04bc395cbcbc6f7b754268245a33779d36640cc80a357711aa2f09a0a@group.calendar.google.com",
"cachedResultName": "n8n-events"
},
"additionalFields": {
"summary": "=Appointment Scheduled - {{ $('Execute Workflow Trigger').item.json.name }} & Jim",
"attendees": [
"={{ $('Execute Workflow Trigger').item.json.email }}"
],
"description": "={{ $('Summarise Enquiry').first().json.text }}\n\nOriginal message:\n> {{ $('Execute Workflow Trigger').item.json.enquiry }}",
"conferenceDataUi": {
"conferenceDataValues": {
"conferenceSolution": "hangoutsMeet"
}
}
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "kWMxmDbMDDJoYFVK",
"name": "Google Calendar account"
}
},
"typeVersion": 1.2
},
{
"id": "e6881867-5b3c-4b85-b06a-a0a3c01be227",
"name": "发送拒绝通知",
"type": "n8n-nodes-base.gmail",
"position": [
720,
-180
],
"webhookId": "5f590407-4ab9-4ae6-bb85-38dbe41d6dce",
"parameters": {
"sendTo": "={{ $('Execute Workflow Trigger').first().json.email }}",
"message": "=<p>Dear {{ $('Execute Workflow Trigger').first().json.name }},</p>\n<p>Unfortunately, we cannot schedule the requested appointment at the requested time.</p>\n<p>Kind regards</p>\n",
"options": {},
"subject": "=Appointment Request Rejected for {{ DateTime.fromISO($('Execute Workflow Trigger').first().json.dateTime).format('EEE, dd MMM @ t') }}"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "40785eca-943c-45f6-b4a9-0c95538621ed",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2580,
-555.2889298043726
],
"parameters": {
"color": 7,
"width": 763.0427617951669,
"height": 611.898918296892,
"content": "## 1. 使用 AI 筛选咨询请求"
},
"typeVersion": 1
},
{
"id": "985be8d1-e77a-475b-9ac2-dba163dbd950",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1800,
-549.8684464902185
],
"parameters": {
"color": 7,
"width": 781.472405063291,
"height": 606.0718987341766,
"content": "## 2. 拆分表单以提升用户体验"
},
"typeVersion": 1
},
{
"id": "9b0a3f0e-e15d-4d0e-b620-1acc78bf812c",
"name": "拒绝",
"type": "n8n-nodes-base.form",
"position": [
-2020,
-160
],
"webhookId": "4353eadb-b7a0-45f2-8dd8-5f6cd882d8d8",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "Send me a DM Instead!",
"completionMessage": "Thanks for your enquiry but it may not necessarily need an appointment. Please feel free to email me instead at jim@example.com."
},
"typeVersion": 1
},
{
"id": "fcd3eb7d-6389-4c07-97cc-275ae387c963",
"name": "拒绝1",
"type": "n8n-nodes-base.form",
"position": [
-1260,
-160
],
"webhookId": "4353eadb-b7a0-45f2-8dd8-5f6cd882d8d8",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "Send me a DM Instead!",
"completionMessage": "Thanks for your enquiry but it may not necessarily need an appointment. Please feel free to email me instead at jim@example.com."
},
"typeVersion": 1
},
{
"id": "d89427cb-fffb-4aa4-b55c-b315fa0e92be",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
-498.80432681242814
],
"parameters": {
"color": 7,
"width": 792.9401150747982,
"height": 497.4250863060987,
"content": "## 3. 向用户发送确认并启动审批流程"
},
"typeVersion": 1
},
{
"id": "041081e1-ee98-4b40-aa14-1980b23f4031",
"name": "GET 模型",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-620
],
"parameters": {
"color": 7,
"width": 609.4228768699652,
"height": 287.178089758343,
"content": "## 4. 批准或拒绝预约"
},
"typeVersion": 1
},
{
"id": "d6af0f50-234f-46ca-aa41-7f3891aff8a3",
"name": "触发审批流程",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
-740,
-260
],
"parameters": {
"mode": "each",
"options": {
"waitForSubWorkflow": false
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
}
},
"typeVersion": 1.1
},
{
"id": "e524d6df-9b6d-4d61-8e71-08a0d3a751d7",
"name": "执行工作流触发器",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-160,
-260
],
"parameters": {},
"typeVersion": 1
},
{
"id": "74dccbc1-7728-4336-a18a-2541007fd369",
"name": "总结咨询内容",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
0,
-260
],
"parameters": {
"text": "=The enquiry is as follows:\n{{ $('Execute Workflow Trigger').first().json.enquiry.substring(0, 500) }}",
"messages": {
"messageValues": [
{
"message": "Summarise the given enquiry"
}
]
},
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "b74f0f5a-39f0-4db3-beba-03caf981c5d2",
"name": "## 1. 创建新的自定义 OpenAI 凭据",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3080,
-640
],
"parameters": {
"width": 468.6766398158801,
"height": 690.6653164556957,
"content": "## 立即试用!"
},
"typeVersion": 1
},
{
"id": "d3c87dfa-d6e5-402a-89e5-6d8f93b824a6",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
299,
-280
],
"parameters": {
"width": 177.66444188722656,
"height": 257.56869965477557,
"content": ""
},
"typeVersion": 1
},
{
"id": "6351121d-6ebe-432d-b370-13296fd58e1a",
"name": "咨询分类器",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
-2340,
-280
],
"parameters": {
"options": {
"fallback": "other"
},
"inputText": "={{ $json.Enquiry }}",
"categories": {
"categories": [
{
"category": "relevant enquiry",
"description": "Enquire about AI, automation, digital products and product engineering."
}
]
}
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Send Receipt": {
"main": [
[
{
"node": "Form End",
"type": "main",
"index": 0
}
]
]
},
"Has Accepted?": {
"main": [
[
{
"node": "Enter Date & Time",
"type": "main",
"index": 0
}
],
[
{
"node": "Decline1",
"type": "main",
"index": 0
}
]
]
},
"Has Approval?": {
"main": [
[
{
"node": "Create Appointment",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Rejection",
"type": "main",
"index": 0
}
]
]
},
"Get Form Values": {
"main": [
[
{
"node": "Trigger Approval Process",
"type": "main",
"index": 0
}
]
]
},
"n8n Form Trigger": {
"main": [
[
{
"node": "Enquiry Classifier",
"type": "main",
"index": 0
}
]
]
},
"Enter Date & Time": {
"main": [
[
{
"node": "Get Form Values",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Enquiry Classifier",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Summarise Enquiry": {
"main": [
[
{
"node": "Wait for Approval",
"type": "main",
"index": 0
}
]
]
},
"Wait for Approval": {
"main": [
[
{
"node": "Has Approval?",
"type": "main",
"index": 0
}
]
]
},
"Enquiry Classifier": {
"main": [
[
{
"node": "Terms & Conditions",
"type": "main",
"index": 0
}
],
[
{
"node": "Decline",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Summarise Enquiry",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Terms & Conditions": {
"main": [
[
{
"node": "Has Accepted?",
"type": "main",
"index": 0
}
]
]
},
"Execute Workflow Trigger": {
"main": [
[
{
"node": "Summarise Enquiry",
"type": "main",
"index": 0
}
]
]
},
"Trigger Approval Process": {
"main": [
[
{
"node": "Send Receipt",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 销售, 产品, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用AI和APIFY自动化销售会议准备并发送至WhatsApp
使用AI和APIFY自动化销售会议准备并发送至WhatsApp
If
Set
Html
+15
61 节点Jimleuk
销售
使用 n8n、Apify 和 OpenAI o3 自托管 AI 深度研究代理
使用 n8n、Apify 和 OpenAI o3 自托管 AI 深度研究代理
If
Set
Code
+20
87 节点Jimleuk
人工智能
自动化 Discord 垃圾信息审核
结合 AI 和人机协作的自动化 Discord 垃圾信息审核
If
Set
Code
+14
30 节点Jimleuk
人工智能
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
实时Notion Todoist双向同步模板
使用Redis的Notion Todoist实时双向同步
If
Set
Code
+26
246 节点Mario
销售
YouTube RAG 搜索前端(使用 Apify、Qdrant 和 AI)
基于 Apify、Qdrant 和 AI 的 YouTube RAG 搜索前端
If
Set
Html
+23
62 节点Jimleuk
人工智能
工作流信息
难度等级
高级
节点数量25
分类3
节点类型12
作者
Jimleuk
@jimleukFreelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at hello@jimle.uk LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk
外部链接
在 n8n.io 查看 →
分享此工作流