Use table values in requests

You can use values from your tables in requests. You do this by creating table references, which are replaced with the actual table data when the request runs.

There are two different ways to do this:

  1. Run on multiple records: this will run a separate request for each record in a table. For example:

  • Lookup the stock price for every record in a view table on its Ticker field.

  • Fetch more info about each course in a table, based on its Course ID field.

  1. Use the value in a single cell: this will run one API request, with the reference replaced by the value in a single Airtable cell. For example:

  • Use an Airtable formula field to create a date string for yesterday, and use this string in a request URL.

  • Store an access token in an Airtable cell (assuming your base is private) and use this in an authorization header.

Run on Multiple Records

  1. Click the + button in any input to open the table reference modal.

  1. On the modal that opens, select the Table and Field you want to reference.

  1. Under Run for every record in view, select the view you want to run it for. Do not select an individual record.

  1. Click Confirm. The input will now contain a reference to the table and field.

When the request runs, a separate request will run for each record, and the reference will be replaced with the value for each record in that field. Each record will use one run in your monthly usage.

The Run on Multiple Records table and view will automatically be set to the table and view you selected, but if you want to confirm or change this:

  1. Click ▼ Advanced settings to open the advanced settings.

  2. 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 you are running on multiple records, you should usually keep the Update based on field(s) 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.

When scheduling requests with this option enabled, if there are errors for 100 consecutive scheduled runs, the request will be paused. You will be notified after this happens, so that you can fix the request.

Use the value in a single cell

  1. Click the + button in an input to open the table reference modal.

  1. On the modal that opens, select the Table and Field you want to reference.

  1. Select the individual record with the single cell's value you want to use.

  1. Click Confirm.

The input will now have a reference to the cell.

When the request runs, the reference will be replaced by the cell value in that cell.

You can edit a table reference at any time by clicking it to re-open the table reference modal.

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 value method described above.

Let's say we need the current date and time in this format 2023-03-22 12:00:00.000 in our request's parameters:

  1. Create a table in Airtable called "Config". Creating a new table keeps things cleaner.

  2. Delete all the records apart from one.

  3. Create an Airtable formula field called "Date today" with this formula:

DATETIME_FORMAT(NOW(), 'YYYY-MM-DD HH:mm:ss.sss')

The cell will now have a dynamic value in it:

  1. Create a single value reference to this cell.

Your parameter will now have a reference to the formula field. When the request runs, it will be replaced by the latest date value in that cell. This works for both manual and scheduled/ automatic Data Fetcher runs.

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:

Last updated