Links

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

  1. 1.
    Click Connect to Airtable.
  2. 2.
    In Thunkable, click the data icon in the left side panel to access your data source library.
  3. 3.
    Click the plus sign at the top of the panel.
  4. 4.
    You can select from previously added data sources or add a new data source. Click Create New.
  5. 5.
    Select Airtable.
  6. 6.
    Click the OAuth tab.
  7. 7.
    An Airtable authorization screen opens.
  8. 8.
    Click + Add a base.
  9. 9.
    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.
  10. 10.
    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.
  11. 11.
    Select the correct base from the dropdown menu.
  12. 12.
    Indicate if you'd like to use a custom view. Learn more here: Use a Custom View.
  13. 13.
    Click Create.
  14. 14.
    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:
  1. 1.
    Ensure your project is connected to an Airtable data source by OAuth.
  2. 2.
    Navigate to your project's blocks tab.
  3. 3.
    Under the App Features heading, click Data Sources.
  4. 4.
    Drag and drop the "authorization header for" block into your workspace.
  5. 5.
    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:

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:

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.