# Airtable Connection

### Introduction to Airtable Integration

One of the most powerful features of the new Template Designer is the ability to connect directly to your Airtable bases. This integration automatically imports your field structure and allows you to preview your templates with live data from your Airtable tables.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fyd1IRHkb3ebdZq53snea%2FAirtable%20connection.png?alt=media&#x26;token=e02cb829-3509-4141-89b2-00b413c4be95" alt=""><figcaption><p>The Airtable connection imports your Airtable field structure directly into the Documint template builder!</p></figcaption></figure>

### Setting Up the Airtable Connection

#### Connecting to Airtable

1. In the Data Panel, click the "Airtable" button.\
   ![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fyse6gnG56HHjkyRSxs7J%2Fimage.png?alt=media\&token=60d30f43-57a8-4fc9-9c24-2f30773290e7)
2. The Integration Setup popup will open.\ <img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2F7R7nDTcijpYNJzZUx1Ey%2Fimage.png?alt=media&#x26;token=0b78e640-9157-4156-ae42-d3a7c54de063" alt="" data-size="original">

#### Authentication Options

In the Integration Setup modal, you have two options:

1. **Select an existing connection**: If you've previously connected Documint to Airtable, you can choose from your saved connections.<br>

   <div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FyCax6MKels8K8YsiB7UX%2Fimage.png?alt=media&#x26;token=024839de-2289-4a88-8a5d-0d5ec994eec7" alt="" width="370"><figcaption></figcaption></figure></div>
2. **Create a new connection**: If this is your first time connecting your Airtable account.

   <div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FwMqpPFdPB3MhLBTGBRNB%2Fimage.png?alt=media&#x26;token=b7d66516-c130-4105-ae64-f4a77066a0dc" alt="" width="370"><figcaption></figcaption></figure></div>

### Creating a New Airtable Connection

To create a new connection, you'll need to first [generate an Airtable Personal Access Token](https://docs.documint.me/integrations/airtable/add-your-airtable-personal-access-token).

{% stepper %}
{% step %}

### Click "Create connection"

In the Integration Setup Popup, click the "Create connection" button.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FwMqpPFdPB3MhLBTGBRNB%2Fimage.png?alt=media&#x26;token=b7d66516-c130-4105-ae64-f4a77066a0dc" alt="" width="370"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Add PAT Details

By default the name of the connection will be "airtable". You can leave it as is or change it to whatever you'd like.&#x20;

Paste your PAT created in the earlier step in to the "Personal Access Token" field.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Flj5jbuABt0hXbmeYOzO0%2Fimage.png?alt=media&#x26;token=fdd083f5-41e0-4c26-8ade-d8341e9d905f" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Save Connection

Click the "Save" button in the bottom right.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FZkXoBdyobT9jwp0giyUH%2Fimage.png?alt=media&#x26;token=43120438-c62b-4325-ac27-f385d3ff0dbe" alt="" width="358"><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

Once your PAT is added and the connection is established, you'll see the connection appear in the "Connection" field.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FCPSXkdnLCnwq8PLdq0Uv%2Fimage.png?alt=media&#x26;token=e9384926-5be7-40a7-97ff-9338ee0c6be2" alt="" width="375"><figcaption></figcaption></figure></div>

### Selecting Your Base and Table

Once connected to Airtable, you'll need to select which data to use:

1. From the dropdown, select the Airtable base you want to use.
2. Then select the specific table within that base.
3. Documint will automatically analyze the table structure.

<div align="left" data-full-width="false"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fkh0ilMTtbQ2FdEDBrlqE%2Fimage.png?alt=media&#x26;token=d846b493-dbc5-4c2f-9218-fa7f4d2385fd" alt="" width="375"><figcaption></figcaption></figure></div>

### Configuring Linked Records

Airtable's linked records are powerful but require special handling:

1. After selecting your table, Documint will display a list of any linked record fields in that table.
2. By default, Airtable only provides the IDs of linked records, not their content.
3. Toggle ON any linked record fields that you want to expand and include in your template.
4. For each enabled linked record, Documint will fetch the related data and make it available in your template.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FvKr5lhq1fa30yHNbKKGh%2Fimage.png?alt=media&#x26;token=fe07c0d2-e972-489f-b45e-36b831eeeb85" alt="" width="375"><figcaption></figcaption></figure></div>

### Saving Your Configuration

Once you've selected your base, table, and configured any linked records:

1. Click "Save" to confirm your configuration.
2. Documint will import all fields from your selected table and any expanded linked records.
3. These fields will appear as tokens in your Data Panel, ready to use in your template.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2F0qh77yb4t3JxUUCXr1Rg%2Fimage.png?alt=media&#x26;token=46ef8818-dff6-4c9d-a54c-33ba83e85735" alt="" width="375"><figcaption></figcaption></figure></div>

### Working with Airtable Data

#### Using Airtable Fields as Tokens

All fields from your Airtable table are automatically available as tokens:

1. Navigate to the Tokens list in the Data Panel.
2. Find the field you want to use.
3. Drag and drop it into your template.
4. The token will be inserted and will display data from your Airtable table when the document is generated.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FgFz9Q8GtuBHhxrlQq2Kz%2Fimage.png?alt=media&#x26;token=b575ec29-fd92-4415-8ff1-c7e86db210f5" alt=""><figcaption></figcaption></figure>

#### Previewing with Airtable Data

One of the biggest advantages of connecting to Airtable is the ability to preview your template with real data:

1. Navigate to the Preview tab.
2. Your template will display with actual data from your Airtable table.
3. Use this to verify that your template looks correct with real-world data.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FXg8pFAmvZPnUjgPymPJ2%2Fimage.png?alt=media&#x26;token=1897a157-41ec-4dd4-912b-a27a1d2eeb5c" alt=""><figcaption></figcaption></figure>

### Syncing Changes from Airtable

If you make changes to your Airtable structure, you can easily update your template:

1. If you add fields, change field types, or modify your table structure in Airtable.
2. Return to Documint and click the "Sync" button in the Data Panel.
3. Documint will update your template's field structure to match the current Airtable configuration.
4. Any new fields will be available as tokens, and removed fields will be flagged if used in the template.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fgs8UrxgvlgEzEDXphQKo%2Fimage.png?alt=media&#x26;token=1088858e-74dc-40c2-be14-50835dc63525" alt="" width="375"><figcaption></figcaption></figure></div>

### Disconnecting from Airtable

You can disconnect your template from Airtable if needed:

1. In the Data Panel, click the "Disconnect" button.
2. Documint will convert your template to use a custom data source.
3. The current field structure will be preserved as a custom schema.
4. You can now modify the field structure manually using the Fields Editor.

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FYF9Dqgrt4SKRa8qHI6CD%2Fimage.png?alt=media\&token=e37df8ce-1609-4f51-b9b0-bc27d181a0bd)           ![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fj0ldIl3BlQfRSVY7feGd%2Fimage.png?alt=media\&token=ea4e51ff-df60-4314-8ec0-e6763044d85e)

### Reconnecting to Airtable

If you've disconnected a template from Airtable, you can reconnect it later:

1. In the Data Panel, click the "Airtable" button again.
2. Go through the connection process as before.
3. Select your base and table.
4. Documint will update your field structure to match the selected Airtable table.
5. Note that any manual changes made to the field structure while disconnected will be overridden.

<div align="left"><figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FKoQCIQOu3e7YRgWDXTzY%2Fimage.png?alt=media&#x26;token=697ff67c-6f79-40a7-801d-6acd75c4442e" alt="" width="375"><figcaption></figcaption></figure></div>

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FWNXQJJNTKFJmH5i5Gkz0%2Fimage.png?alt=media&#x26;token=9744179c-f014-4a4f-b18a-57b866f36c8e" alt=""><figcaption></figcaption></figure>

### Benefits of Airtable Integration

Connecting your templates to Airtable offers several advantages:

* **Automatic field structure**: No need to manually define fields.
* **Real data preview**: Test your templates with actual content.
* **Always in sync**: Keep your templates updated with your latest Airtable structure.
* **Linked record support**: Access related data across tables.
* **Seamless workflow**: Move from data management to document generation without manual steps.

### Troubleshooting Airtable Connections

If you encounter issues with your Airtable connection:

* **Connection fails**: Verify your Personal Access Token has the required permissions.
* **Missing tables**: Ensure you've granted access to the specific base you want to use when creating. your Airtable PAT.
* **Missing fields**: Check that field names in Airtable haven't changed.
* **Linked record issues**: Verify that the linked records still exist and relationship is configured correctly.
* **Sync errors**: Try disconnecting and reconnecting to refresh the connection.
