Copy of Snippet "Airtable data extracter"

Fetch data from multiple Airtable tables

This snippet fetches specific data from a single record in an Airtable base.
You can build other snippets that, for example, fetch the same column data from multiple records (using a for loop).
Theoretically, it is possible to build on top of any data that you can extract from Airtable; see this page for examples on what data you can extract.

Currently, we ask for base value as form input and use it the API query. If you want to use a fixed base, you can change the url in the urlload command below. Currently, it is importing from\{=base\}/VWB/\{=recordid\}. In place of \{=base\} you can put in the exact base Id, for example,\{=recordid\}.

Note that this is a connected snippet! (documentation) You will be prompted to give special permissions for this folder, so you may want to keep a single separate folder for all your connected snippets in your Text Blaze Dashboard.

{note}{formtext: name=apikey} {formtext: name=base} {formtext: name=recordid}{endnote}
{if: apikey <> "" and recordid <> "" and base <> ""}{urlload:{=base}/VWB/{=recordid}; method=GET; done=(res) -> ["response"=catch(fromJSON(res), "???")]; headers=Authorization=Bearer {=apikey}}
Data received
All keys in response: {=keys(response)}
All keys in response.fields: {=keys(response.fields)}
Specific data from the given record
{agent=response.fields["Our Agent"][1]}
Our agent: {=agent}
Property Address: {=response.fields["Property Address"]}
TC: {=response.fields["TC"]}
Buyer Full Name: {=response.fields["Buyer Full Name"]}
Resolving Agent data with a second query
Our Agent name is actually a unique pointer into the Agents table. We need to use a second urlload query to grab the actual name.
{urlload:{=base}/Agents/{=agent}; method=GET; done=(res) -> ["agentresponse"=catch(fromJSON(res), "???")]; headers=Authorization=Bearer {=apikey}}
Fields received: {=keys(agentresponse.fields)}
Our agent (corrected): {=agentresponse.fields["Agent Name"]}
Enter apikey, base and recordid to proceed

To get the apikey, generate it on your Airtable account page (keep it a secret)

If you have the record URL as:, then base=appW0...Qc06, and recordid=rec...VtB.

For an interactive demo of Airtable's API, visit their API page and choose your base. On the left you should choose "VWB Table" and then "Fields", "List records" or "Retrieve a record". On the right you will see various outputs relevant to your base.


This is awesome @Gaurang_Tandon! Love the API integration. Never realized we could do this :star_struck:


Holy Wow!


Newer version by Gaurang here: Copy of Snippet "Airtable record lister"