8
n8n 中文网amn8n.com

自动化每日天气数据获取和存储

初级

这是一个Other领域的自动化工作流,包含 5 个节点。主要使用 Airtable, HttpRequest, ScheduleTrigger 等节点。 获取每日天气数据并保存到 Airtable

前置要求
  • Airtable API Key
  • 可能需要目标 API 的认证凭证

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "PHp3gKoyYfSztbTB",
  "meta": {
    "instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa",
    "templateCredsSetupCompleted": true
  },
  "name": "自动化每日天气数据获取和存储",
  "tags": [
    {
      "id": "uScnF9NzR3PLIyvU",
      "name": "Published",
      "createdAt": "2025-03-21T07:22:28.491Z",
      "updatedAt": "2025-03-21T07:22:28.491Z"
    }
  ],
  "nodes": [
    {
      "id": "871fd9fd-de44-4c9f-aef4-0c731c5685f1",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        40,
        100
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0b721c2a-6301-4a08-9602-990598d0f7a3",
      "name": "存储天气数据",
      "type": "n8n-nodes-base.airtable",
      "notes": "Store weather data in table\n",
      "position": [
        480,
        100
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appKtypfMptBIKStp",
          "cachedResultUrl": "",
          "cachedResultName": "WeatherData"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblfb3sJ84eQUlYJd",
          "cachedResultUrl": "",
          "cachedResultName": "Data"
        },
        "columns": {
          "value": {
            "Temp": "={{ $json.main.temp }}",
            "Humidity": "={{ $json.main.humidity }}",
            "Location": "={{ $json.name }}",
            "Timezone": "={{ $json.timezone }}",
            "Wind Speed": "={{ $json.wind.speed }}"
          },
          "schema": [
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Timezone",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Timezone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Temp",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Temp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Wind Speed",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Wind Speed",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Humidity",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Humidity",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": []
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 2.1
    },
    {
      "id": "052a47c1-d167-432c-93f2-117a1c129c51",
      "name": "获取天气数据",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Fetching the weather data",
      "position": [
        260,
        100
      ],
      "parameters": {
        "url": "https://api.openweathermap.org/data/2.5/weather?lat=23.0059&lon=72.5547",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "units",
              "value": "metric"
            }
          ]
        }
      },
      "credentials": {
        "httpBasicAuth": {
          "id": "zowZrB19NtOy4lxp",
          "name": "OpenWeatherAPi"
        },
        "httpQueryAuth": {
          "id": "OVXHUjaqzUxECHEG",
          "name": "OpenWeatherMap Query Auth"
        },
        "httpHeaderAuth": {
          "id": "glJ33a6G5lqhm1CW",
          "name": "Shopify GraphQL Cred"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "525f3e92-c620-47f2-b97e-53cb98d63406",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 680,
        "height": 320,
        "content": "自动化每日天气数据获取和存储"
      },
      "typeVersion": 1
    },
    {
      "id": "cff8dbb0-3639-45a6-a06d-9ab63b2dfce8",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        340
      ],
      "parameters": {
        "color": 6,
        "width": 680,
        "height": 120,
        "content": "此工作流使用 OpenWeatherMap API 每日获取天气数据,并将天气信息存储在 Airtable 中。数据可包括当前温度、湿度、风速和其他相关天气详情。此自动化确保天气数据每天更新并存储以供将来参考,提供易于访问的天气模式历史记录。"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ef874403-4189-4b92-a963-a02fc585cb77",
  "connections": {
    "Get Weather Data": {
      "main": [
        [
          {
            "node": "Store Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

初级 - 其他

需要付费吗?

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

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

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
WeblineIndia

WeblineIndia

@weblineindia

A Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.

外部链接
在 n8n.io 查看

分享此工作流