商务旅行AI助手 - AI驱动的旅行助理
高级
这是一个Other, AI领域的自动化工作流,包含 16 个节点。主要使用 Set, Switch, Telegram, Aggregate, HttpRequest 等节点,结合人工智能技术实现智能自动化。 旅行AI代理 - AI驱动的旅行规划器
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (16)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "91RLsVyJP2HuVnKK",
"meta": {
"instanceId": "4786bf0f18c0e8e92c361de5a158cabf4eb0bb3b9c113091b054ff26e359a029",
"templateCredsSetupCompleted": true
},
"name": "商务旅行 AI 助手 - AI 驱动的旅行助理",
"tags": [],
"nodes": [
{
"id": "e282caed-17f8-46a6-98e6-43174d503767",
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"notes": "## Telegram File Retrieval Node\nThis node retrieves the voice message file from Telegram servers for processing.\n\n**Input:** Voice message file ID from the Telegram trigger\n**Output:** Binary file data containing the voice recording\n\n**Note:** This node specifically handles voice messages. For text messages, this step would be bypassed.",
"position": [
80,
1140
],
"webhookId": "07268207-9fa0-44da-846c-983e3d92f57f",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "b22977cd-db3e-44cb-8ed9-40a1f9f5480c",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"notes": "## OpenAI Audio Transcription Node\nThis node uses OpenAI's speech-to-text capabilities to transcribe the voice message into text.\n\n**Input:** Binary voice file from Telegram\n**Output:** JSON object containing the transcribed text\n\n**Technical considerations:**\n- Requires OpenAI API credentials with access to audio transcription models\n- Handles various audio formats supported by OpenAI\n- Default language is auto-detected, but can be specified in options",
"position": [
280,
1140
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "e078357a-a492-4626-90ae-7708a076f5ae",
"name": "信息提取器",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"notes": "## Information Extractor Node\nThis node uses AI to parse the user's message and extract structured travel information.\n\n**Input:** Transcribed text from the voice message\n**Output:** Structured JSON with travel details (origin, destination, dates, accommodation needs)\n\n**Key extracted fields:**\n- origin: IATA airport code for departure location\n- destination: IATA airport code for arrival location\n- departure: ISO 8601 date format (YYYY-MM-DD)\n- return: ISO 8601 date format (YYYY-MM-DD)\n- flight_type: \"1\" for round-trip, \"2\" for one-way\n- accommodation: Boolean indicating if lodging is needed\n- nights: Integer number of nights for accommodation",
"position": [
780,
1040
],
"parameters": {},
"typeVersion": 1
},
{
"id": "645fe2b2-c159-4da6-9262-94383a2c892a",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"notes": "## OpenAI Chat Model Node\nThis node provides the AI language model capabilities to the Information Extractor.\n\n**Model:** GPT-4o\n**Purpose:** Powers the extraction of structured travel information from natural language\n\n**Technical considerations:**\n- Model selection affects accuracy and processing speed\n- API usage is charged based on token consumption\n- Can be replaced with other compatible LLM providers",
"position": [
720,
1240
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "287b6783-44d7-408d-9ccf-b8f71222b1c5",
"name": "搜索航班",
"type": "n8n-nodes-base.httpRequest",
"notes": "## Search Flights Node\nThis HTTP Request node queries the SerpAPI Google Flights integration to find available flights based on the extracted travel information.\n\n**Input:** Travel parameters from Information Extractor (origin, destination, dates)\n**Output:** Structured JSON containing flight options, prices, durations, and airlines\n\n**API parameters:**\n- engine: google_flights\n- departure_id/arrival_id: IATA airport codes\n- outbound_date/return_date: Travel dates\n- type: Flight type (1=round-trip, 2=one-way)\n- Additional parameters: adults, stops, language, currency",
"position": [
1140,
1040
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "712856af-4000-45a8-82c2-f11ecce33747",
"name": "搜索酒店",
"type": "n8n-nodes-base.httpRequest",
"notes": "## Search Hotels Node\nThis HTTP Request node queries the SerpAPI Google Hotels integration to find accommodations at the destination.\n\n**Input:** Destination and date information from the Information Extractor\n**Output:** Structured JSON containing hotel options, prices, ratings, and amenities\n\n**Technical details:**\n- Dynamic check-out date calculation based on number of nights\n- Filters for adults, language, and currency\n- Results include property types, nightly rates, and total costs\n\n**Note:** Only executes if accommodation is required (controlled by the Information Extractor output)",
"position": [
1360,
1040
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "a1f0a29a-57da-4a78-a62e-f93121cc2850",
"name": "窗口缓冲内存",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"notes": "## Window Buffer Memory Node\nThis node maintains conversation context by storing recent interactions between the user and the AI assistant.\n\n**Purpose:** Enables the AI to reference previous messages for more coherent conversations\n**Configuration:** Uses a fixed session key for demonstration purposes\n\n**Technical considerations:**\n- Memory window size affects context retention and token usage\n- In production, should use dynamic session keys based on user ID\n- Memory persistence affects privacy and data retention policies",
"position": [
1200,
1540
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "f7ee2b46-7784-4d97-8ffe-03c378182cbf",
"name": "响应",
"type": "n8n-nodes-base.telegram",
"notes": "## Telegram Response Node\nThis node sends the final travel recommendations back to the user via Telegram.\n\n**Input:** Formatted travel plan from the Business Travel Agent\n**Output:** Message delivered to the user's Telegram chat\n\n**Technical details:**\n- Uses the original chat ID from the Telegram Trigger\n- Supports Telegram's message formatting options\n- Message size limitations apply (4096 characters max per message)",
"position": [
1500,
1320
],
"webhookId": "9e570c8d-a0bd-41ad-9b59-584eb362b038",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "d79de847-7dcc-469b-865a-f5bc7b783aa1",
"name": "商务旅行代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"notes": "## Business Travel Agent Node\nThis agent node combines all the gathered travel information and generates a professional, well-structured travel recommendation.\n\n**Input:** Flight and hotel search results, user's original message\n**Output:** Formatted travel recommendation with flights and hotels sections\n\n**Technical details:**\n- Uses a structured prompt template to ensure consistent formatting\n- Leverages the Anthropic model for natural language generation\n- System message defines the agent's role, objectives, and output format\n\n**Optimization opportunities:**\n- Could be enhanced with price comparison and best value highlighting\n- Potential for adding transportation options between airport and hotels\n- Could incorporate user preferences from previous interactions",
"position": [
1120,
1320
],
"parameters": {},
"typeVersion": 1.7
},
{
"id": "6bdfef15-9adc-4f1e-9586-e21a6e108974",
"name": "DeepSeek 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
"position": [
980,
1520
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8a998006-7b84-4df8-9c0c-fa572a5c5534",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1440,
520
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "03f2d4b8-9a17-43d0-84a0-07f90f8fa976",
"name": "验证消息类型",
"type": "n8n-nodes-base.switch",
"position": [
-220,
1060
],
"parameters": {},
"typeVersion": 3.2,
"alwaysOutputData": false
},
{
"id": "82622840-2201-4aac-b672-e0a4f090324e",
"name": "不支持的消息类型",
"type": "n8n-nodes-base.telegram",
"position": [
60,
1440
],
"webhookId": "aa5edd53-47da-4b1f-b1f9-65c784034f46",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "032b3ce4-71d8-4416-a649-d00798fe49e6",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
200,
860
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "59dbda3d-931c-4724-ac2a-182824048259",
"name": "Telegram 触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-580,
1040
],
"webhookId": "65f501de-3c14-4089-9b9d-8956676bebf3",
"parameters": {},
"notesInFlow": false,
"typeVersion": 1.1
},
{
"id": "4019d069-94ef-451b-bd6a-5175b66756ff",
"name": "聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
520,
1040
],
"parameters": {},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "41f5a877-a6ff-4fd6-a713-9e42401621ea",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Telegram": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Information Extractor",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Search Hotels": {
"main": [
[
{
"node": "Business Travel Agent",
"type": "main",
"index": 0
}
]
]
},
"Search Flights": {
"main": [
[
{
"node": "Search Hotels",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Verify Message Type",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Information Extractor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"DeepSeek Chat Model": {
"ai_languageModel": [
[
{
"node": "Business Travel Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Verify Message Type": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram",
"type": "main",
"index": 0
}
],
[
{
"node": "Unsupported Message Type",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "Business Travel Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Business Travel Agent": {
"main": [
[
{
"node": "Response",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor": {
"main": [
[
{
"node": "Search Flights",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 其他, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
构建与销售AI自动化与智能体
构建与销售AI自动化与智能体
If
Set
Wait
+15
74 节点NICKYAI
其他
音乐生成工作流
使用 Suno API、Flux、Runway 和 Creatomate 生成 AI 歌曲和音乐视频
Set
Wait
Merge
+16
60 节点Joseph
其他
股市技术分析
使用 GPT-4o 和 TradingView 为 Telegram 提供股市技术分析
Set
Code
Telegram
+9
16 节点Badr
财务
基于 MCP 服务器的 AI Telegram 任务管理器
集成 MCP 服务器的 AI Telegram 任务管理系统
Set
Switch
Telegram
+9
21 节点Francis Njenga
其他
使用AI从Telegram创建社交媒体内容
使用AI从Telegram创建社交媒体内容
Set
Switch
Telegram
+9
16 节点Onur
其他
终极游戏AI代理
通过Telegram和GPT-4o Vision的实时游戏策略教练
Set
Code
Switch
+8
24 节点Don Jayamaha Jr
其他