Response data transformations

Data Fetcher transforms the response data from an API request to Airtable fields and records.

Data is mapped to the appropriate field type, e.g. numerical values are mapped to number fields.

JSON, XML & CSV API responses are currently supported. XML responses are first transformed to JSON using the xml2js npm package then follow the steps below.

There are two possible data transformations: Single Record or Expanded.

An example helps demonstrate the difference. If the API returns this response:

[
{
id: 'company1',
positions: [
{
id: 'position1',
},
{
id: 'position2',
},
],
},
{
id: 'company2',
positions: [
{
id: 'position3',
},
{
id: 'position4',
},
],
},
]
  1. Single Record - nested arrays are given their own fields, pre-fixed with a number. This ensures each parent entity is contained in a single record. The above response would be turned into:

.id .positions.1.id .positions.2.id
company1 position1 position2
company2 position3 position4
  1. Expanded - nested arrays create new records, sometimes duplicating the parent entity into multiple records. The response would be turned into:

.id .positions.id
company1 position1
company1 position2
company2 position3
company2 position4

Set the data transformation mode

  • Click to open the advanced options.

  • Under Data Transformation, select the data transformation from the options.