Use table values in requests

1. Make a single API request using a value from a cell You can use values from your tables in your requests, e.g. in a request URL or header.
There are two different ways to use table values in requests:
  1. 1.
    Reference a single cell value: e.g. use an Airtable formula field to create a date string and reference this in a request URL. This means the URL will be dynamic - it will always use the latest date from the formula cell.
  2. 2.
    Run on Multiple Records: e.g. use a table of stock tickers and run the request on each record to look up the price for each ticker.

1. Make a single API request using a value from a cell

  • Click the "+" button on the right-hand side of the input. Any input with a "+" button can reference table values.
  • Select the Table.
  • Select the Field.
  • Select the individual Record which contains the cell want to reference.
  • Click "Confirm".
  • The input will now have a reference to the cell, which is in the format ***TABLE_NAME*FIELD_NAME*RECORD_ID***. When the request runs, the reference will be replaced by the cell value in that record cell.

2. Make multiple API requests, using the values from each record

  • Click the "+" button on the right-hand side of the input. Any input with a "+" button can reference table values.
  • Select the Table.
  • Select the Field.
  • Select the Run on every record in view or leave it as the default (the currently active view).
  • Click "Confirm".
  • The input will now have a reference to the table and field, which looks like: ***TABLE_NAME*FIELD_NAME***.
The Run on Multiple Records table and view will automatically be set to the table you selected, but if you want to confirm or change this:
  • Click
    to open the advanced options.
  • Under Run on Multiple Records, select the table and the view to use. The table must be the same as the one referenced in your input.
  • When the request runs, a separate request will run for each record, and the field reference will be replaced with the value for that record. Each record will use one run in your monthly usage.
When you are running on multiple records, you should usually keep the Update based on field set to "None". The output record's position in the Run on Multiple Records table/view will then be used to update it.

Ignore errors when running on multiple records

  • Turn on the "If one of these records causes an error, run the next request anyway." switch if you want Data Fetcher to ignore errors and move on to the next record when the requests run.
You still need to run the request on a record which does not cause an error initially, in order to set up the response field mapping.
When scheduling requests with this option enabled, if there are errors for 500 consecutive runs, the request will be paused.

Reference dynamic values using Airtable formula fields

If you need to reference dynamic values, you can use an Airtable formula field to get these values, then reference them using the single-cell value method described above.
For example, if we need the current date and time in this format 2023-03-22 12:00:00.000 in our request URL parameters:
  • Create a table in Airtable called "Config".
  • Delete all the records apart from one.
  • Add a formula field called "Date today" with the formula DATETIME_FORMAT(NOW(), 'YYYY-MM-DD HH:mm:ss.sss'). This step will be different depending on the exact dynamic value you need.
  • The cell will now have a dynamic value in it:

Encode URL table references

When referencing a table/cell in the URL, you might need to encode the values. Data Fetcher has the option to do this automatically. On the table reference modal, use the Encode URL table references option at the bottom to turn this behaviour on or off: