航班价格下降指示器
初级
这是一个Personal Productivity领域的自动化工作流,包含 5 个节点。主要使用 If, Cron, Gmail, Function, HttpRequest 等节点。 监控航班价格下降并通过SerpAPI和Gmail发送邮件提醒
前置要求
- •Google 账号和 Gmail API 凭证
- •可能需要目标 API 的认证凭证
使用的节点 (5)
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "s2ucjAukkvRz8P1W",
"meta": {
"instanceId": "321893e66e29566d2dc224295f17b402e8c39ace8a5702398bdb6adc518e9626",
"templateCredsSetupCompleted": true
},
"name": "航班价格下降指示器",
"tags": [],
"nodes": [
{
"id": "758fdc37-1f36-4d00-b402-d9731f1efce8",
"name": "定时任务",
"type": "n8n-nodes-base.cron",
"position": [
-400,
-96
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 8
}
]
}
},
"typeVersion": 1
},
{
"id": "f12725fa-a814-452c-bfda-44dfa72f8a52",
"name": "获取价格 - SerpAPI",
"type": "n8n-nodes-base.httpRequest",
"position": [
-176,
-96
],
"parameters": {
"url": "https://serpapi.com/search?engine=google_flights",
"options": {},
"authentication": "predefinedCredentialType",
"queryParametersUi": {
"parameter": [
{
"name": "departure_id",
"value": "BLR"
},
{
"name": "arrival_id",
"value": "DEL"
},
{
"name": "outbound_date",
"value": "2025-09-06"
},
{
"name": "currency",
"value": "INR"
},
{
"name": "type",
"value": "2"
}
]
},
"nodeCredentialType": "serpApi"
},
"credentials": {
"serpApi": {
"id": "r6DlikH84CvIRQG1",
"name": "SerpAPI account"
}
},
"typeVersion": 2
},
{
"id": "9a29e1f9-e22f-4a3c-8e60-73ddaa661f6e",
"name": "检查价格下降",
"type": "n8n-nodes-base.function",
"position": [
48,
-96
],
"parameters": {
"functionCode": "const result = items[0].json;\nlet price = null;\n\ntry {\n price = result.best_flights[0].price;\n} catch (e) {\n price = 999999; // fallback if no price found\n}\n\nconst threshold = 4000; // you can update this\n\nreturn [{\n json: {\n priceDrop: price < threshold,\n currentPrice: price\n }\n}];"
},
"typeVersion": 1
},
{
"id": "2240c223-c9c9-428d-85cd-d56ad11eb728",
"name": "价格是否下降?",
"type": "n8n-nodes-base.if",
"position": [
272,
-96
],
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json[\"priceDrop\"] }}",
"value2": true
}
]
}
},
"typeVersion": 1
},
{
"id": "65fb8b03-8fab-45a4-b24a-21b3c692ea7a",
"name": "发送消息",
"type": "n8n-nodes-base.gmail",
"position": [
480,
-96
],
"webhookId": "b13712ed-aeb0-4b7c-bb10-be2a99c1f4c2",
"parameters": {
"sendTo": "x22yashc@iima.ac.in",
"message": "=Hi Yash,\n\nThe Flight price to Delhi dropped to {{ $json.currentPrice }}.\n\nYou can book the flight now\n\nRegards\nTeam Yash Choudhary",
"options": {},
"subject": "Hi Yashi! Flight price to Delhi Dropped",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "H3TyD6TZqsyZNtVi",
"name": "Gmail account"
}
},
"typeVersion": 2.1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2d3fa3e6-8ddf-4f7a-b92f-0d08af430239",
"connections": {
"Cron": {
"main": [
[
{
"node": "Fetch Price - SerpAPI",
"type": "main",
"index": 0
}
]
]
},
"Check Price Drop": {
"main": [
[
{
"node": "IF Price Dropped?",
"type": "main",
"index": 0
}
]
]
},
"IF Price Dropped?": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Fetch Price - SerpAPI": {
"main": [
[
{
"node": "Check Price Drop",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
初级 - 个人效率
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动化多平台游戏优惠追踪
使用 Deku Deals 和 Gmail 提醒自动追踪多平台游戏优惠
If
Cron
Gmail
+5
11 节点Piotr Sobolewski
个人效率
工作日日志记录
AI工时表生成器 - 集成Gmail、日历和GitHub到Google表格
If
Set
Code
+11
31 节点Luka Zivkovic
个人效率
从 Excel 申请工作并跟踪申请状态
基于 LinkedIn、Indeed 和 Google Sheets 的自动化职位申请与状态追踪
If
Set
Cron
+7
24 节点VipinW
个人效率
使用OpenAI和Gmail的每日积极新闻摘要
使用OpenAI和Gmail的每日积极新闻摘要
If
Cron
Gmail
+3
9 节点Piotr Sobolewski
个人效率
实时航班票价追踪器 – 通过短信和电子邮件发送即时降价提醒
实时航班票价追踪器(Aviation Stack API)– 通过Gmail和Telegram发送提醒
If
Code
Cron
+6
14 节点Oneclick AI Squad
杂项
德国公寓查找器和自动申请(带便签功能)
自动德国公寓搜索与申请,集成Immobilienscout24和Google服务
Set
Cron
Function
+6
22 节点Abbas Ali
个人效率