# Generation Link

### Generation Link

The Generation Link integration uses a special URL to generate your document. This URL is created dynamically by a formula in either a Formula field or a Button field. When the link or button is clicked, Documint creates a document using the template ID and record ID provided in the URL.&#x20;

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FmXARJDXegj4WrCFdRzeW%2FScreenshot%202025-08-14%20at%2015.34.08.png?alt=media\&token=06680b6f-27b7-40d4-b9ef-40dd2572611c)

###

{% embed url="<https://youtu.be/dhBAEgOx77E>" %}

### Add your Airtable PAT key to Documint

First, add your Airtable PAT key to connect your Documint account to Airtable. Follow this short video to get that set up.

{% embed url="<https://www.youtube.com/watch?list=PLYXyDMkKKoW1sP-_jNuJZILL20YBnzuSH&v=2IQr70weNYg>" %}

### Create the formula for your Generation Link

With the [Airtable Connection](https://docs.documint.me/templates/working-with-dynamic-data/connections/airtable-connection) successfully established, you can now choose the specific base and table that you wish to work with. Once you've done that, just hop over to the Integrations page.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2F2nk8iBn4R5oisW2TAgAS%2FScreenshot%202025-08-14%20at%2015.49.36.png?alt=media&#x26;token=0f01f600-c49b-4c26-ad28-90dd49ac0778" alt=""><figcaption></figcaption></figure>

Head over to the Airtable option in the "Setup Instructions." When the pop-up appears, hop over to the Generation Link tab and select the Attachment Field (this will be mapped from your base).&#x20;

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FfLz6ZavBHtdUKEKSx4Zv%2FScreenshot%202025-08-14%20at%2017.48.49.png?alt=media&#x26;token=e6c4339e-390a-4548-ada9-bbd184df8ea2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FbO2Dnh9e99aFvAqwA8ZS%2FScreenshot%202025-08-14%20at%2018.11.45.png?alt=media&#x26;token=9779741c-8926-47b9-931a-a9cab68adbff" alt=""><figcaption></figcaption></figure>

*This is the field in Airtable where the auto-generated document will be located.* If you don’t already have a field for this, create it in Airtable by adding a new field with the field type ‘attachments.’

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fh2kWj3IY4J1YnAY7M9Il%2FScreenshot%202025-08-14%20at%2017.37.16.png?alt=media&#x26;token=6d3fccde-5c4c-4706-82a2-584ff8421090" alt=""><figcaption></figcaption></figure>

Then the link will be ready for you to copy. Copy the entire formula, this will be used in the next step.

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FFvm57ndTTOVHMX8dfKHZ%2FScreenshot%202025-08-14%20at%2018.12.08.png?alt=media&#x26;token=a627372c-807e-4495-9940-7825bd28b5ad" alt=""><figcaption></figcaption></figure>

<details>

<summary>Additional Options</summary>

#### **Overwrite Attachments**

When set, this will overwrite all existing attachments in the specified attachment field with the latest document.

#### **Expand Linked Records**

Linked Record fields in Airtable are sent from Airtable as record ids instead of the actual data of the linked records. If you want to use the data from linked records then you'll need to tell Documint to expand those records. By default, Documint will only expand linked records (with [Table\_Id fields](#joining-linked-records)) on the record that the document is generated from. If you want to expand linked records of linked records (and so on) then you'll have to set this value to the number of relationships that you want to expand.

Documint will only expand records of Linked Record fields that have an associated Table\_Id field. [Learn more.](#joining-linked-records)

#### **Mode**

Mode allows you to control how documents are created.&#x20;

There are 3 options:

1. **Default (Recommended)** - uses the Active status of the template
2. **Preview** - renders documents as inactive (meaning they won't count towards your quota) and they won't be saved back to Airtable. This is great when testing documents and acts as an alternative to using the Previewer in the Template Designer. [Learn more.](#preview-mode)
3. **Active** - renders documents as Active (meaning they will count towards your quota) whether your template status is Active or Inactive.

#### Watch / ignore data changes

Set which fields to either watch for changes or ignore changes to when [preventing duplicate document creation](#duplicate-document-prevention)

</details>

## Create Button Field

Then, in Airtable, create another button field with an ‘Open URL’ action to open this formula. Paste the formula copied in the previous step into the `URL formula` field and click "Create field".

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FhpjdIW8beDIYGRJepCT9%2FScreenshot%202025-08-14%20at%2018.20.50.png?alt=media&#x26;token=0edd8e75-8bdc-46e1-b01c-a7317e2d92c5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FXI9gz5KFkcQn4wjisnAx%2FScreenshot%202025-08-14%20at%2018.22.22.png?alt=media&#x26;token=f0f1bcaf-25a5-4909-a47c-33b4b6d6a138" alt="" width="375"><figcaption></figcaption></figure>

**That’s it!**  Now, whenever a user clicks the button, a document will be generated for that record. If a document already exists with the data from that record and the template has not been changed, then the existing document will be displayed. This prevents generating the same document multiple times.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.documint.me/integrations/airtable/generation-link.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
