工作流 1:合并数据#
¥Workflow 1: Merging data
Nathan 的公司将其客户数据存储在 Airtable 中。此数据包含客户的 ID、国家/地区、电子邮件和加入日期等信息,但缺少其所在地区和子地区的数据。你需要填写最后两个字段才能创建区域销售报告。
¥Nathan's company stores its customer data in Airtable. This data contains information about the customers' ID, country, email, and join date, but lacks data about their respective region and subregion. You need to fill in these last two fields in order to create the reports for regional sales.
要完成此任务,你首先需要在你的 Airtable 账户中复制此表:
¥To accomplish this task, you first need to make a copy of this table in your Airtable account:
设置 Airtable 时,请确保将 customerSince 列配置为日期类型字段,并启用“包含时间”选项。如果没有此设置,你在更新表时可能会在步骤 4 中遇到错误。
¥When setting up your Airtable, ensure that the customerSince column is configured as a Date type field with the Include time option enabled. Without this setting, you may encounter errors in step 4 when updating the table.
接下来,构建一个小型工作流,合并来自 Airtable 和 REST Countries API 的数据:
¥Next, build a small workflow that merges data from Airtable and a REST Countries API:
- 使用 Airtable 节点 列出 Airtable 表中名为
customers的数据。
¥Use the Airtable node to list the data in the Airtable table named customers.
2. 使用 HTTP 请求节点 从 REST Countries API 获取数据:https://restcountries.com/v3.1/all,并发送查询参数名称 fields 和值 name,region,subregion。此操作会返回世界各国的数据,并将其拆分为单独的条目。
¥Use the HTTP Request node to get data from the REST Countries API: https://restcountries.com/v3.1/all, and send the query parameter name fields with the value name,region,subregion. This will return data about world countries, split out into separate items.
3. 使用 合并节点 按国家/地区名称合并来自 Airtable 和 Countries API 的数据,在 Airtable 中分别表示为 customerCountry,在 Countries API 中表示为 name.common。
¥Use the Merge node to merge data from Airtable and the Countries API by country name, represented as customerCountry in Airtable and name.common in the Countries API, respectively.
4. 使用另一个 Airtable 节点,使用来自 Countries API 的数据更新 Airtable 中的 region 和 subregion 字段。
¥Use another Airtable node to update the fields region and subregion in Airtable with the data from the Countries API.
工作流应如下所示:
¥The workflow should look like this:

Quiz questions
- “HTTP 请求”节点返回多少项?
¥How many items does the HTTP Request node return?
- “合并”节点返回多少项?
¥How many items does the Merge node return?
- 客户表中分配了多少个唯一区域?
¥How many unique regions are assigned in the customers table?
- 分配给客户 ID 10 的子区域是什么?
¥What's the subregion assigned to the customerID 10?