> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Integrate with Airtable

[Airtable](https://airtable.com/) is a platform that makes it easy to build powerful, custom applications. These tools can streamline just about any process, workflow, or project—and best of all, you can build them without ever learning to write a single line of code. 

You can use PDF Generator API Airtable Extension to quickly generate PDF documents using the data you already have in Airtable (e.g. store orders, database records etc.).

* [PDF Generator API Airtable Extension](https://airtable.com/marketplace/blkVfvKHYITm7m8JL/pdf-generator-api)
* [View example documents](https://pdfgeneratorapi.com/templates/free-templates)
* [Download Scripting example from Github](https://github.com/pdfgeneratorapi/airtable-scripting/blob/main/index.js)

${youtube}[PDF Generator API Airtable Extension Introduction](gsLxQR82wpw)

### Setup

To use PDF Generator API Airtable Extension, you need a PDF Generator API account. You can create a [free Sandbox Account](https://us1.pdfgeneratorapi.com/signup) and use it for **14 days** to evaluate and integrate the API, with **up to 50 credits** available during the trial period.

| For more information on how credit usage is calculated, see this [article](https://support.pdfgeneratorapi.com/en/article/how-credit-usage-is-calculated-5820vc/).

### Extension Settings

In the Extension Settings, you need to specify API Key, API Secret, and Workspace Identifier. You can find your API key and API secret from the **Account Settings** view. The Workspace Identifier specifies the request context. Your default workspace identifier is the email you used to sign up for PDF Generator API. 

![PDF Generator API Airtable Extension Settings](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2022-03-3114-26-18_d1mtay.png)

### Usage

The Extension has two main views - **Generate** to generate documents and **Templates** to manage your document templates.

### Generate

In the Generate view, you can generate PDF documents using the data from your Airtable database. Select the records you want to use as the data source for your document to get started. Then select a template and click Generate.

**Options**

* **Wrap records to an Object?** - When you have multiple records selected, each record is treated as a source for one document. When you enable this option, you can use all the selected records in a single document context, for example, create a list of items or show them in a table.
* **Template** - Select a template or click the add button (plus icon) to create a new template. Click the edit button (pencil icon) to edit the selected template. The data from the selected record is available in the editor.
* **View (optional)** - You can specify table view to optimize record loading.
* **Save to table field** - This allows you to specify which field of the selected table you want to use to save the generated document. It can be Attachment, Text or URL field. If you choose a Text or URL field, then a public URL to file is saved, and it is valid for 30 days.
* **Name (optional)** - You can specify generated file name.
* **Format** - You can generate PDF or HTML documents using this Extension.
* **Output** - You can specify different output types; a URL is returned from the API by default. You can also produce a raw or base64 encoded file to save to a Text field.

![PDF Generator API Airtable Extension Generate](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2022-04-0612-25-05_ltgmsu.png)

### Templates

In the Templates view, you can create and manage your document templates. When you create or edit a template from this view, the currently selected records are taken as the data source for the document in the editor view.

![PDF Generator API Airtable Extension Templates](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2022-03-3114-57-01_uycchr.png)

![PDF Generator API Airtable Extension Templates](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2022-04-0413-51-54_zlx5mu.png)

### Scripting

You can also use PDF Generator API with Airtable Scripting Extension and Automation. You can use the same API credentials as for the Extension. We have prepared an example code to demonstrate how it works. In the example implementation, we want to generate a PDF invoice for the order and store the result back in the Airtable database. We use two linked tables - Orders and LineItems. You can find the example implementation from our GitHub repository [here](https://github.com/pdfgeneratorapi/airtable-scripting/blob/main/index.js).

![Example tables in Airtable](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2022-04-0413-33-21_bq06vz.png)
---
### Related articles you may find helpful

* [Functions](/en/article/functions-srekaa/)
* [How to use the editor?](/en/article/how-to-use-the-editor-1a194yy/)
* [What is a Sandbox account?](/en/article/what-is-a-sandbox-account-81ouha/)
