Response data transformations
When you run a request, the API response data (JSON/XML/CSV) is transformed into a tabular format (fields and records) and written to your output table. You set this mapping using the response field mapping.
There are different data transformations you can use: Single Record or Expanded. These handle nested arrays in slightly different ways.
Let's say our API returns this JSON response:
[
{
"id": "company1",
"positions": [
{
"id": "position1",
},
{
"id": "position2",
}
]
},
{
"id": "company2",
"positions": [
{
"id": "position3",
},
{
"id": "position4",
}
]
}
]

Single Record

Using the Single Record transformation, the nested position.id values are given their own fields, pre-fixed with a number. This ensures each parent entity (a company in this example) is contained within a single Airtable record.
The above response would be turned into these fields and records:
.id .positions.1.id .positions.2.id
company1 position1 position2
company2 position3 position4
Note that Single Record does not mean everything in the response is put into one record. Data Fetcher looks for the first array in the response and puts each item in that array into a single record.

Expanded

Using the Expanded transformation, nested position.id values create new records, duplicating the parent entity into multiple records.
The JSON response above would be turned into these fields and records:
.id .positions.id
company1 position1
company1 position2
company2 position3
company2 position4
We can see that every positions.id value is put into the same field, which might be more useful to us, depending on what we are doing with the data.

Set the data transformation mode

  • On the create request screen, click
    to open the advanced settings.
  • Under Data Transformation, select the transformation you want from the options.

Combine array items

When the data transformation is set to Single Record, arrays of text/ numberical values are combined into one comma-separated text value and mapped to a "Single line text" (or "Multiple select" field in Airtable.
For example, in this JSON response
[
{
"id": "company1",
"categories": [
"Fintech",
"Startup"
]
},
{
"id": "company2",
categories: [
"Healthtech",
"Public",
"Unicorn"
]
}
]
The text items in the categories arrays are combined into one field as comma-separated strings:
.id .categories
company1 Fintech,Startup
company2 Healthtech,Public,Unicorn
You disable this, so that each array item is put into a new field like this:
.id .categories.1 .categories.2 .categories.3
company1 Fintech Startup
company2 Healthtech Public Unicorn
To disable this behaviour:
  • On the create request screen, click
    to open the advanced settings.
  • Under Data Transformation, ensure the transformation is set to 'Single Record'.
  • Disable 'Combine arrays of text/numbers with separator:'.
You can also change the separator using the input on the right-hand side. For example, if your values have commas , in, you might want to use the pipe | symbol as the separator.
Copy link
On this page
Single Record
Expanded
Set the data transformation mode
Combine array items