Airtable

Airtable is a tool that provides a collaborative, user-friendly, intuitive online workspace for easy management of databases, creation of forms, and tables. Refer to Airtable website to get more details and features.

How does extension work

Pdfless extension retrieves data records from each row and transfers it to PDF template to generate document. Each row is automatically converted to JSON and is sent to Pdfless API. The generated document is saved into an attachment field. Metadata

Metadata

Prerequisites

Get started

After creating an Airtable view, design your model adding fields, then fill it with data.

Metadata

Add Pdfless extension and configure it :

  • API Key. Refer to the documentation to get more details.
  • Document template to use for the generating file.
  • Destination attachment field, where the document will be saved.

Metadata

We're ready now to generate document, clicking on "Start generating documents" button. Each row will be parse one by one to generate document.

Metadata

How to use a list of items

If you are dealing with a list of items in your document, displaying through a table for example, Airtable offers a great way to link a row to another records. Let's take the following bloc code as model :

For each syntax

<table>
  <thead>
    <tr>
      <th>Description</th>
      <th>Price</th>
      <th>Quantity</th>
      <th>Amount</th>
    </tr>
  </thead>
  <tbody>
      {{#each Articles}}
            <tr>
                <td>{{Description}}</td>
                <td>{{Price}}€</td>
                <td>{{Quantity}}</td>
                <td>{{Amount}}€</td>
            </tr>
        {{/each}}
  </tbody>
</table>

First of all, let's create a new view that will map to your model, and fill it with data.

Metadata

Select your main view, then add a new field typed as "Link to another record".

Metadata

It's done, all we need is to fill items for each row.

Metadata

For the first record of my main view, here is the result :

Metadata

Column data types

The base columns are rendered as strings, with the exception of certain columns.

Airtable type Example Pdfless type Result
Duration 1:20 string 80 sec
Percent 100 string 100%
Single line text My text value string My text value
Long text My very long text value string My very long text value
Single select Selected value string Selected value
Url https://pdfless.com string https://pdfless.com
Checkbox Check boolean true false

For these following columns, data are transformed to an object collection :

Attachment

{{#each ColumnName}}
    <div>
        <img src="{{url}}" />
    </div>
{{/each}}
Airtable type Pdfless type Result
Attachment

Attachment

"ColumnName": [{ 
  "url": string,
  "fileName": string,
  "type": string,
  "width": int,
  "height": int
}]
Multiple select

Record collection

"ColumnName": [{ 
 "val1", 
 "val2",
 etc...
}]

Multiple select

<ul>
  {{#each ColumnName}}
    <li>{{ this }}</li>
  {{/each}}
</ul>
Link to another record

Record collection

"ColumnName": [{ 
  "record_col1" : record_col1_type, 
  "record_col2" : record_col2_type,
  etc...
}]

Lookup field

<ul>
  {{#each ColumnName}}
    <li>{{record_col1}}</li>
  {{/each}}
</ul>