使用 DeepSeek AI 和 Google Flights API 搜索和比较航班
初级
这是一个Support Chatbot, Multimodal AI领域的自动化工作流,包含 5 个节点。主要使用 SerpApiTool, Agent, ChatTrigger, LmChatDeepSeek, MemoryBufferWindow 等节点。 使用 DeepSeek AI 和 Google Flights API 搜索和比较航班
前置要求
- •无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "b84ff0741c0d2bc729fbab41e8a2ec15ad0f7453b3fc5307d9c4462f33b67653",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c96208f6-6159-4a2d-bda6-8e45964a1b37",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
280,
0
],
"parameters": {
"options": {
"systemMessage": "=You are a helpful and intelligent AI travel assistant. Your job is to guide users through booking flights by collecting essential travel details step-by-step, and then using the attached SerpAPI Tool to search for real-time flight options.\n\nCurrent Date Time is: {{ $now }}\n\nBefore using the tool, you must collect the following:\n- `departure_id`: IATA code for departure airport (e.g., ISB)\n- `arrival_id`: IATA code for arrival airport (e.g., DXB)\n- `outbound_date`: Date of departure in YYYY-MM-DD format\n- `type`: Either \"one-way\" or \"round-trip\"\n- `return_date`: Only required if the trip is \"round-trip\"\n\nIf any of these fields are missing, ask the user politely and clearly to provide the missing information. Do not proceed to search until all required fields are available.\n\nOnce all fields are collected:\n1. Call the attached **SerpAPI Tool** to search for available flights.\n2. Summarize the top 3 options in the following format:\n\n---\n✈️ *Flights from ISB to DXB on 2025-07-25*\n\n1. Emirates – $420 – 3h 40m – Nonstop \n2. Qatar Airways – $390 – 6h – 1 stop (via Doha) \n3. FlyDubai – $350 – 4h 20m – Nonstop \n\nWould you like to book one of these?\n---\n\nIf the user provided a return date, add:\n🛬 *Return on 2025-08-01*\n\nIf no flights are found, say:\n> “Sorry, I couldn’t find any flights for that route and date. Try a different date or nearby airport?”\n\nIf the user selects a specific flight (e.g., \"book the second one\" or \"I want FlyDubai\"), respond with the corresponding **booking link** from the tool results.\n\nBe conversational, clear, and concise. Never assume — always confirm missing information before searching. Your tone should be helpful, friendly, and professional."
}
},
"typeVersion": 2
},
{
"id": "a9171c94-e59e-4120-9de9-7c98f1bf20c2",
"name": "DeepSeek 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
"position": [
160,
224
],
"parameters": {
"options": {}
},
"credentials": {
"deepSeekApi": {
"id": "DMWTbntaimlAJyC6",
"name": "DeepSeek Live"
}
},
"typeVersion": 1
},
{
"id": "eab49a45-bd0d-4073-ad37-0ccde982aab9",
"name": "SerpApi 中的 Google_flights 搜索",
"type": "n8n-nodes-serpapi.serpApiTool",
"position": [
592,
208
],
"parameters": {
"operation": "google_flights",
"arrival_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Arrival_airport_code___location_kgmid__arrival_id_', ``, 'string') }}",
"return_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_Date__return_date_', ``, 'string') }}",
"departure_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Departure_airport_code___location_kgmid__departure_id_', ``, 'string') }}",
"outbound_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Outbound_Date__outbound_date_', ``, 'string') }}",
"requestOptions": {},
"descriptionType": "manual",
"toolDescription": "Search for live flights from one city to another using Google Flights data",
"additionalFields": {}
},
"credentials": {
"serpApi": {
"id": "QXFL9xfk9xhVTsFt",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "7f867f93-235a-46ba-8c9c-13c52e0c5945",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
368,
224
],
"parameters": {
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "299b9f43-ba5f-4bd0-9fb6-e16e64a40e76",
"name": "聊天",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "79805958-a20e-486c-b5c3-6ed1f8264500",
"parameters": {
"mode": "webhook",
"public": true,
"options": {}
},
"typeVersion": 1.1
}
],
"pinData": {},
"connections": {
"Chat": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"DeepSeek Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google_flights search in SerpApi": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
初级 - 客服机器人, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
餐厅桌位预订
餐厅预订管理,使用OpenAI GPT和Google Sheets
Agent
Google Sheets Tool
Chat Trigger
+4
15 节点Fakhar Khan
客服机器人
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
Set
Xml
Code
+20
35 节点Zain Khan
客服机器人
N8N 可定制品牌聊天框
部署基于 DeepSeek 的 AI 网站聊天机器人,支持自定义品牌
Webhook
Agent
Respond To Webhook
+3
7 节点Muhammad Omer Fayyaz
客服机器人
客户支持
AI驱动的电商客户支持聊天机器人,集成GPT-4和Supabase
Code
Switch
Webhook
+8
27 节点Sehar Nazeer
客服机器人
牙科诊所接待员
使用 Google Calendar、AI 助手和邮件通知自动化牙科预约
If
Code
Gmail
+7
14 节点Md Sabirul Islam
客服机器人
GPT-5 RAG客户支持代理
使用GPT-5、Telegram和Pinecone构建客户支持RAG代理
Telegram
Agent
Telegram Trigger
+5
11 节点Automate With Marc
客服机器人
工作流信息
难度等级
初级
节点数量5
分类2
节点类型5
作者
Fakhar Khan
@fakharkhanAutomation expert specialized in n8n. I design and build AI-powered workflows that streamline operations, automate lead generation, and enhance customer engagement. Passionate about low-code automation and integrating tools like OpenAI, WhatsApp, Slack, and CRMs. Organizer of n8n events in Pakistan, helping businesses scale with smart, efficient automation systems.
外部链接
在 n8n.io 查看 →
分享此工作流