Reading Data from an Airtable

Summary

Use an HTTP GET request to read data from an Airtable base.

Snippet

+ get first person
$ GET https://api.airtable.com/v0/YOUR_APP_ID/Employee%20Directory {"headers": {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}}
- The first person is: ${{records.0.fields.Name}}
 
+ get person from department *
$ GET https://api.airtable.com/v0/YOUR_APP_ID/Employee%20Directory?filterByFormla=IF({Department}='<formal>',TRUE(),FALSE()) {"headers": {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}}
- The first person is: ${{records.0.fields.Name}}

Explanation

Couldn't quite figure out how to adapt your Onboarding Bot to read from your base? Use the examples above as a guide to reading data from Airtable.

The first example simply grabs the value found in the "Name" column of the first record in the Airtable. If you're copy-pasting this snippet, be sure to fill in the correct values for your App ID and API key—you can find these in Airtable's documentation.

The second example takes an input from the user, capitalizes it with <formal> (since the departments in our Airtable are capitalized), and passes it into a filter formula.