8
n8n 中文网amn8n.com

天气报告抓取器

中级

这是一个AI领域的自动化工作流,包含 9 个节点。主要使用 Html, HttpRequest, GoogleSheets, ManualTrigger 等节点,结合人工智能技术实现智能自动化。 使用Bright Data和n8n自动获取天气报告

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "2v8K3VanHj11PubB",
  "meta": {
    "instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
    "templateCredsSetupCompleted": true
  },
  "name": "Weather_Report_Scraper_via_Bright_Data",
  "tags": [],
  "nodes": [
    {
      "id": "d143f06d-3ea0-4feb-9157-62bc3d28b2aa",
      "name": "启动工作流",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -460,
        1720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "579b56bf-35e6-4114-947c-9e62814a2bff",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2180,
        1020
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "bd02001c-f390-4138-8013-d43f89802ab5",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2180,
        1360
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 1718,
        "content": "## 🌦️ **天气数据抓取自动化**"
      },
      "typeVersion": 1
    },
    {
      "id": "d22f87aa-4365-44f1-aab9-6e764af748f9",
      "name": "通过 Bright Data 请求/获取天气",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        1720
      ],
      "parameters": {
        "url": "https://api.brightdata.com/request",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "zone",
              "value": "n8n_unblocker"
            },
            {
              "name": "url",
              "value": "https://www.weather.com/weather/today/l/Paris,FR"
            },
            {
              "name": "country",
              "value": "fr"
            },
            {
              "name": "format",
              "value": "raw"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f28bf59a-1671-43af-9a98-0ce8cc9ca1e4",
      "name": "提取天气信息",
      "type": "n8n-nodes-base.html",
      "position": [
        20,
        1720
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Temperature",
              "cssSelector": "<span data-testid=\"TemperatureValue\" class=\"CurrentConditions--tempValue--zUBSz\" dir=\"ltr\">81<span class=\"CurrentConditions--degreeSymbol--tzLy9\">°</span><span></span></span>"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "76410c0c-560c-48c2-87cd-68114b5de9ad",
      "name": "记录到天气表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        240,
        1720
      ],
      "parameters": {
        "columns": {
          "value": {
            "City": "Paris",
            "Country": "France",
            "Temperature": "={{ $json.a }}"
          },
          "schema": [
            {
              "id": "Country",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "City",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "City",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Temperature",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Temperature",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mpIFtKgbtV_LgxFD2LTeXbHdaMu-Qca1S9RRSlFpZWQ/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1mpIFtKgbtV_LgxFD2LTeXbHdaMu-Qca1S9RRSlFpZWQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mpIFtKgbtV_LgxFD2LTeXbHdaMu-Qca1S9RRSlFpZWQ/edit?usp=drivesdk",
          "cachedResultName": "Weather report"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "r2mDaisH6e9VkwHl",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "fe209422-9127-407b-8ac8-bff7951c18ca",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        1040
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 900,
        "content": "### 🟢 **第一部分:启动并通过 Bright Data 获取天气**"
      },
      "typeVersion": 1
    },
    {
      "id": "23e7ddee-8409-4633-a7de-e29ea9face06",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        1020
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 920,
        "content": "### 🟠 **第二部分:提取和处理天气信息**"
      },
      "typeVersion": 1
    },
    {
      "id": "aabc6470-727f-4d60-b390-44b52114821a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        1020
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## 如果您通过此链接加入 Bright Data,我将获得少量佣金 — 感谢您为更多免费内容提供动力!"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4e7b1293-10f1-4bee-a389-42835314731d",
  "connections": {
    "Start Workflow": {
      "main": [
        [
          {
            "node": "RequestFetch Weather via Bright data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Weather Info": {
      "main": [
        [
          {
            "node": "Log to Weather Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RequestFetch Weather via Bright data": {
      "main": [
        [
          {
            "node": "Extract Weather Info",
            "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 查看

分享此工作流