Airtable Data Source
Overview
When a data source powers your app, you can continuously update your app contents without having to republish it. It allows you to build a dynamic app that can create, read, update, and delete data. This doc covers connecting your app to Airtable as the data source.
Effective February 1, 2024, Airtable no longer supports connecting via API key. You must connect your Thunkable project to Airtable via OAuth.
Connect Your App to Airtable by OAuth
Click Connect to Airtable.
In Thunkable, click the data icon in the left side panel to access your data source library.
Click the plus sign at the top of the panel.
You can select from previously added data sources or add a new data source. Click Create New.
Select Airtable.
Click the OAuth tab.
An Airtable authorization screen opens.
Click + Add a base.
Select the bases you want to authorize access to.
Select all the bases you want your Thunkable projects to have access to. This includes any bases you've previously connected by API key, as well as any new bases you want to connect to Thunkable.
Click Grant access.
If you are connecting by OAuth for the sole purpose of migrating your connection from API Key and are not creating a new data source, you are done. The following steps only apply when creating a new data source.
Select the correct base from the dropdown menu.
Indicate if you'd like to use a custom view. Learn more here: Use a Custom View.
Click Create.
Refresh your page to ensure the data is reflected in web preview or via the Thunkable Live app.
Once you've connected your Airtable account to your Thunkable account via OAuth, API keys are no longer used.
Use a Custom View
In Airtable, a table is similar to a sheet in a spreadsheet. You can have multiple tables within your Airtable base, and each table can have multiple views. A view indicates how the data is presented within the table. For example, you can use views to show only specific fields or records and apply other configurations to manage the information in that view. The initial default view for an Airtable table is the grid view.
When connecting an Airtable base as your Thunkable project’s data source, you can select a custom view instead of the default grid view. This will apply only to the first table in your base. For subsequent tables, Thunkable will use the default grid view. If you have a base with two tables and the second table has a custom view, you can reorder the tables within the base in Airtable so that the custom view is applied to the correct table.
Authorization Header For Block
This block is only necessary for Creators who use web API blocks to communicate with Airtable.
If your app uses web API blocks to communicate with Airtable, you must also incorporate the "authorization header for" block into your app. This block retrieves a valid token that can be used as the authorization header in web API blocks.
To use the "authorization header for" block:
Ensure your project is connected to an Airtable data source by OAuth.
Navigate to your project's blocks tab.
Under the App Features heading, click Data Sources.
Drag and drop the "authorization header for" block into your workspace.
Use the block's dropdown menu to ensure the correct data source is selected.
If you're transitioning from connecting via API keys to OAuth, you must do the following to ensure the changes take effect:
Do a hard refresh on your browser. You can learn more here: Hard Refresh Your Browser.
Re-download or re-publish your app.
Display the Data in Your App
Once you've connected a data source, you can display the data in your app with a data viewer component. Learn more about data viewer components here:
Data Viewer ComponentsReset Thunkable - Airtable Connection
If hard-refreshing doesn't work or you want to add more Tables, you'll need to reset the Airtable connection.
Reset from Airtable
Connect to Airtable
Click the Account icon and then Integrations
Click Third-party integrations and then Thunkable
Click Revoke access
Return to Thunkable, re-connect to your Airtable account and give access to all the bases you need.
You can add specific bases but to avoid the above steps in the future in case you need to add some more you can select the second option and allow current and future all bases.
Have feedback on this doc? Please take a moment to share your feedback here: Thunkable Docs Feedback. Your valuable insights will help us improve and better serve you in the future.
Last updated