Using the scripting extension to collect base schema
  • 06 Jan 2023
  • 2 Minutes to read
  • Dark

Using the scripting extension to collect base schema

  • Dark

Article Summary

In the article below, learn how to surface a base's schema into a single table within that base using Airtable's Scripting extension and a script from the Marketplace.

Organizing the names of tables and fields into a tabular format can be incredibly helpful for users who want to understand the types of information captured in the base without needing to check each table individually.


How can I create a single base with my metadata?

Information about your base can be programmatically accessed via Airtable’s scripting extension or Airtable's Web API. In this guide, we'll customize a scripting extension in an example base to create an interface, aggregate base schema information, and write it to a standalone table for reference.

The script will also update existing records (i.e. when a field name or description changes), allowing users to run the script over time.

What you will need

An Airtable base you'd like to extract metadata from. We're using this example base from Airtable Universe.

A link to the Extracting Base Metadata Marketplace Script

Access to the Scripting extension.
If you don't have access to the scripting extension as an enterprise user, please contact your enterprise administrator to adjust your permissions.

Step by step instructions

1. Create base schema table
In your base, create a table where you want to store your metadata. Add the following fields to your table:
Field NameField DescriptionField IDField Type
Field OptionsTable NameTable ID 

To ensure each record has a unique name, we recommend making the table's primary field a formula that concatenates the Table Name and Field Name into a single identifier. You could use something like this: {Table Name} &": " & {Field Name}

2. Add Marketplace script

Click on the link to the Extracting Base Metadata Marketplace Script. Click the "Add Script" button in the top right corner, and choose the base where you added your base schema table.

3. Configure script settings

After installing the marketplace script, you'll be asked to configure the settings that are unique to your base. In the settings menu, select:

  • The name of the table to write data to
  • The names of each field in the base to write data to

Once your settings are entered, you can press run, and within a few seconds, your new table will be populated with all of your base schema information.

What next?

This is a great start for extracting a base's schema from Airtable. For users that would like to use Airtable base schema information to build a custom integration, we recommend consulting our Web API reference and guides.

Would love to see how you and your team approach this integration and what specifically you’re trying to leverage Airtable for. Feel free to post your integration on our Community Page.

Was this article helpful?