Response field mapping
Last updated
Last updated
The response field mapping is where you select which fields should be imported from an application and how they map to the Airtable fields in your output table.
You can map each response to a new or existing field in your output table.
When creating a request for the first time, click Save & Run and the Response Field Mapping modal will open. This will have a list of all the possible fields you can import from the application and a preview of the records.
For each response field:
Choose whether to select it or deselect it. Data in the selected fields will be imported when the request runs.
Map it to an existing field by selecting Existing field and choosing a field using the dropdown.
Map it to a new field by selecting New field, entering a field name and selecting a field type. Data Fetcher will automatically suggest field types based on the response data.
You can also search for fields using the Find field input.
Click Save & Run. Any new fields will be created, and the data will be imported.
After you have set up the field mappings once, you can open the response field mapping at any point by clicking Open field mapping.
When the API response changes, e.g. because you changed a parameter, you can refresh the fields available on the response field mapping. This will not use any of your monthly usage limits and your existing mapped fields will be preserved.
Click Open field mapping.
Click Refresh fields in the top right-hand corner.
Data Fetcher converts the API response to into tabular fields and records. You can view the raw JSON/ XML response from the API:
Click the open settings sidebar icon on the left-hand side.
Click Response preview to show the JSON or XML response.
For paginated and Run on Multiple Record requests, the response field mapping only the first request's response data.
You can copy the JSON response to your clipboard or download it. This can be useful when working out the necessary JMESPath for the JSON.
Click the open settings sidebar icon on the left-hand side.
Click Response preview.
Click Copy or Download.
If you need to transform a field's values before they reach the output table, you can do this by specifying a formula for the field. You should reference the value as value
, e.g. upper(value)
. A full list of formulas can be found here.
You can also test formulas quickly in our JavaScript Formula Playground.
Enter the Formula in the input.
Click Save.
Data Fetcher can create and update linked records when a request is run.
For example, you might have a request that fetches users and another that fetches tasks, where each task has a user assigned (by user id). You want to create the links between the tasks table and the users table when the request is run.
To use an existing linked field:
To create a new linked field:
When the request runs, Data Fetcher will create links to the linked table by looking for the response value in the linked table field. Anywhere it cannot find a record to link to, it will create a new record and link to that instead.
Data Fetcher can turn comma-separated values into multiple linked records. To enable this:
Under Allow multiple links, select Allow.
By default, Data Fetcher will create any missing records in the linked table. You can turn this behaviour on or off. It can be useful to turn this off when the linked table is read-only, e.g. because it's a read-only Synced table.
Under Create missing records, enable or disable Create.
By default, any existing attachments in a field will be overwritten when a request runs. You can add to existing attachments, rather than overwriting them:
Under Attachment write mode, enable the Add to existing setting.
Click Save.
Attachments will be written to the field's cell they are mapped to every time you run the request. You can change this behaviour so that they are only written if the cell is empty:
Under Write the attachment only if the cell is empty., enable the Only if empty setting.
Click Save.
Every time you change the Response data transformations, Response JMESPath or Max response records the response field mapping is refreshed.
Data Fetcher suggests data types by looking at the response data, but you can change these. For example, it might suggest Number
when in reality you want Currency
.
Be careful when changing the data type from the suggested one, as it can lead to errors if the values cannot be converted. For example, if the response returns "sdlf3421asd"
in a field that you specified as Number
Data Fetcher will fail when trying to update the field.
For a JSON response, you can click on any value in the response to toggle whether it is imported or not. You can also click on the next to a field name to navigate to that field in the response.
Click on to open the field's settings.
Select then choose a linked field in your output table with.
By default, Data Fetcher will use the primary field in the linked table to find the record to link to. To change this, clickthen select a different field under Linked table field.
Select , enter a field name inand change the field type to .
Clickto open the field settings, and select a table to link to under Linked table.
Clicknext to the field name to open the field settings.
Clicknext to the field name to open the field settings.
Data Fetcher can map a remote file URL (e.g. a PNG, SVG or PDF) to an Airtable attachment field. To do this, select Attachment ( )for the field type in the response field mapping.
For an attachment field, clicknext to the field name to open the field settings.
For an attachment field, clicknext to the field name to open the field settings.