There are a number of ways to generate PDFs in Airtable. The most basic is to use the Airtable Page Designer extension (which is an official extension made by Airtable). However, the Page Designer comes with a number of pretty significant limitations:
- It cannot be automated in any way (you have to manually 'save' every PDF)
- You can only create 1-page documents
Thankfully, there are a number of apps that allow you to overcome these limitations and automate PDF generation in your Airtable table. In this article, we'll be showing how you can generate PDFs using an Airtable Automation and DocuPotion.
Structuring your Airtable table
The first step is to structure your Airtable table so that we can reference the relevant data. In this example we're going to be creating a PDF of a simple invoice. In the image below, we have a table called 'Invoices' that has the following columns:
- Customer Name (single line text)
- Address (single line text)
- Invoice Number (number)
- Grand Total (rollup)
- Line Items (linked records)
- PDF (attachment)
- Generate PDF (checkbox)

Airtable table structure for invoices
The linked record links the 'Invoices' table to the 'Line Items' records. The 'Line Items' table includes information on each product that's going to be included in our invoice:

Line items table structure
There are a couple of key things to note at this stage:
- The 'PDF' field in the 'Invoices' table is going to be the field that the output PDF is attached to - this must be an Attachment field
- The 'Generate PDF' checkbox field is going to be used to trigger the automation that creates the PDF. When the user checks the checkbox, we're going to run a script that calls the DocuPotion API and attaches the generated PDF to the 'PDF' field
Register for a DocuPotion account
We're going to design a PDF template in DocuPotion. Navigate to the DocuPotion homepage and click on the 'Register / Sign in' button.

DocuPotion homepage
You'll then be brought to through some onboarding steps. Once you've submitted some details, you'll be asked to describe what kind of template you want to create. Enter as much detail as you like - the more the better! Our document creation tool will generate a template to fit your needs (you will be able to edit this next).
If you've already signed up for DocuPotion and want to create a new template, check out the next section of this guide.
Designing a PDF template
Navigate to the 'Templates' tab and click on the 'Create New Template' button. Enter details of what kind of template you want to create. The DocuPotion template generator will take this information and use it to generate your template.
You can edit your template by adding prompts to the chat section.

DocuPotion PDF editor example
You can preview how your PDF will look in the Template and With data tabs.

Preview tab in DocuPotion editor
Mapping data to Airtable data
You can add custom data (i.e. data from your Airtable table) by including merge fields {{ }} in your template. You can instruct DocuPotion to include specific merge fields in the template by:
- Adding sample data when generating a template for the first time or
- Instructing the AI to include certain merge fields in the chat
For example, when generating an invoice template, we instructed the AI to include the below merge fields:
{{Customer Name}}{{Address}}{{Grand Total}}
When we're generating our PDF, these {{ }} variables are going to be replaced by the data in our Airtable table.
The names of the {{ }} variables in your DocuPotion template MUST exactly match the names of the fields in your Airtable table. For example, if one of your Airtable fields is called 'Name', the dynamic variable in your DocuPotion template must be called {{Name}} (with an uppercase 'N')
Setting up the Automation in Airtable
Click on the 'Automations' tab in your Airtable dashboard and 'Add a Trigger'. In our example, we're using the 'Generate PDF' checkbox field to trigger the automation. Whenever a user checks the checkbox, the automation is going to be run.

Setting up automation trigger in Airtable
Next, add a 'Run Script' action to the automation. This is where we're going to paste in the script that calls the DocuPotion API and uploads the output PDF to our Airtable table.
Generating the Airtable Automation script
Go back to your DocuPotion editor, navigate to the 'Integrations' tab and select the Airtable option. A popup will open:

Airtable integration popup in DocuPotion
Add the URL of your Airtable table to the 'Table URL' input and the name of the Attachment field you want your PDF to be uploaded to in the 'PDF Attachment Field' input. You can also choose whether you want newly generated PDFs to overwrite any existing PDFs.
Once you've provided this info, click on the 'Generate Script' button to get your Automation script:

Generating Airtable automation script
Copy this script into the code editor for the 'Run Script' action in your Airtable Automation.

Pasting script into Airtable automation
Next, link the automation to a specific record by adding an input variable called 'record_id'. Link this input variable to the 'Airtable record ID' that was the trigger in step 1.

Adding record_id input variable
Click on the 'Finish editing' button and turn the Automation on.
Running the automation
Navigate to your data tab and check one of the 'Generate PDF' checkboxes. After a few seconds, you should see a PDF appearing in your Attachment field.

Generated PDF in Airtable table
Debugging issues with the automation
If you're not seeing a PDF appear, you can check the 'Automations' tab for details on what caused the issue. Click on 'History' and take a look at the 'Run history' tab on the right-hand side:

Automation run history in Airtable
Click on the run instance that caused the problem and view the execution log to see what caused the issue. In the example below, we changed the name of the 'Price' column in our 'Line Items' table to 'Price of Product'.

Error details in automation history
Updating variables in DocuPotion template
If you change the names of any of the {{ }} variables in the DocuPotion template, you will need to re-generate the Automation script in DocuPotion and update the script in the Airtable Automation tab.
Beyond Airtable
DocuPotion isn't just for Airtable users. If you're evaluating tools for your wider workflow, take a look at our document automation software for an overview of how teams use DocuPotion to automate invoices, contracts, quotes and more.