8
n8n 中文网amn8n.com

通过Bright Data查找最便宜航班

中级

这是一个AI领域的自动化工作流,包含 9 个节点。主要使用 Html, HttpRequest, GoogleSheets, ManualTrigger 等节点,结合人工智能技术实现智能自动化。 使用Bright Data和n8n自动查找最便宜航班

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "YhwckWo4y8FNZ4v4",
  "meta": {
    "instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
    "templateCredsSetupCompleted": true
  },
  "name": "通过 Bright Data 查找最便宜航班",
  "tags": [],
  "nodes": [
    {
      "id": "6da8e17f-3448-4195-b812-43564470d376",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -480,
        2340
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6e92c67b-3e06-4de8-ac8f-f09d33bc6115",
      "name": "便签 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2460,
        500
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "ffb0ba94-e697-409d-9190-1e6f8656c775",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2460,
        840
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 2458,
        "content": "# 🧳 ✈️ **使用 Bright Data 从 Skiplagged 抓取航班价格**"
      },
      "typeVersion": 1
    },
    {
      "id": "3e3a26e0-eeed-4a0f-85bb-ac49e438eb43",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        20,
        2340
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Title",
              "cssSelector": "<span class=\"flights-landing__flight-logo-txt\" data-translate=\"false\">United</span>"
            },
            {
              "key": "Price",
              "cssSelector": "<div class=\"flights-landing__flight-price\">$114</div>"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4213760f-1d00-4d4c-b918-5b46728c78e8",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        240,
        2340
      ],
      "parameters": {
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "r2mDaisH6e9VkwHl",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "c1bda948-e9f0-4539-ba18-fa37ac431d91",
      "name": "通过 Bright Data 从 Skiplagged 获取航班详情",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -260,
        2340
      ],
      "parameters": {
        "url": "https://api.brightdata.com/request",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"zone\": \"n8n_unblocker\",\n  \"url\": \"https://skiplagged.com/flights/NYC/LAX/2024-07-01\",\n  \"country\": \"ie\",\n  \"format\": \"raw\",\n  \"headers\": {\n    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36\",\n    \"Accept-Language\": \"en-US,en;q=0.9\",\n    \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6f4009d4-bd47-4bda-a4b1-cd6bdfa59821",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        1340
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 1200,
        "content": "## 🔹 **第一部分:获取航班价格**"
      },
      "typeVersion": 1
    },
    {
      "id": "15115b20-c08a-4953-be0b-8e7a7f2a4030",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        1080
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 1460,
        "content": "## 🔹 **第二部分:提取和存储航班价格**"
      },
      "typeVersion": 1
    },
    {
      "id": "b151fc17-d628-4e38-a5e7-91b2555b8e1f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        1080
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## 如果您通过此链接加入 Bright Data,我将获得少量佣金 — 感谢您支持更多免费内容!"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d966578d-4e22-4067-b7b6-1b310276ba5a",
  "connections": {
    "HTML": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Fetch flight details from skiplegged via bright data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch flight details from skiplegged via bright data": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 人工智能

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量9
分类1
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Yaron Been

Yaron Been

@yaron-nofluff

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

外部链接
在 n8n.io 查看

分享此工作流