logo
Documents & Forms
Microsoft 365 & SharePoint Tools
Classic SharePoint Tools
Documents
Aug 31, 2023

How to create PDF file from multiple Airtable records with image attachments

Internet Marketer

The introduction of various extensions and integrations for databases has significantly expanded their capabilities. Databases now serve not only as information repositories but also actively facilitate the automatic creation of documents. The Airtable database creation service, like other market participants, has incorporated these achievements. This prompted users to search for information about new features for working with the Airtable database. A frequently asked topic was the management and use of multiple database records with attached images to automatically create documents: catalogs, presentations, photo reports, etc.

I am working with Airtable/Stacker, Zapier and Plumsail documents. My users upload images to Airtable/Stacker, which I would like to display in a plumsail document. Is it possible to have the plumsail document display more than one image if there is more than one?
Plumsail Community
I’m currently using Airtable to manage a catalog of items. Each record is a single item, with fields like SKU, description, dimensions, and so on. The client has asked me to figure out a way to export this catalog information from Airtable into a powerpoint document that can be downloaded and edited. What do you recommend? Is there an integration I could use?
Airtable Community

We wrote this article to help you understand how to automatically create documents from a database. You'll learn to create professional PDFs from Airtable multiple records with image attachments using Plumsail Documents.

We'll show you two ways:

  1. Use the Plumsail Documents extension in Airtable.
  2. Use Make (formerly Integromat) to extract data from Airtable and send it to the Plumsail Documents template.

The main difference is that the first method directly uses the Plumsail Documents extension in Airtable, while the second method uses Make to extract and manipulate data as a connector.  

Further in the article:

  1. Overview of the Airtable Database
  2. Create and set up a process in Plumsail Documents
  3. Way one: Create document using the Plumsail Documents extension for Airtable
  4. Way two: Create document from Airtable using Make and Plumsail Documents
  5. Conclusion
  6. Get started

 

1. Overview of the Airtable Database

Let's take a closer look at our database in Airtable. We have created a database with multiple records. The primary data we will work with is the name of the object, description, rental price per month, and attached photos of the object.

data base prev  

We need to pay attention to the field of object availability and the panel with views. We duplicated the All view as the base and created a new view, Available Objects, by setting a filter on the Object Availability column so that only objects available for rent are displayed. This view will come in handy later.

data base view  

2. Create and set up a process in Plumsail Documents

Our next step is to set up the start-generation process for the document with multiple line items using Plumsail Documents. The first thing we need to do is make a template. We took a ready-made Property List template in Word DOCX format from our library.

real estate template  

The template uses nested tokens with a dot operator inside a table to indicate that properties refer to the same collection of the object: {{object.Name}},{{object.Price}},{{object.Description}}. The templating engine is intelligent enough to recognize which content needs to be duplicated. It will iterate through all of the objects in the array to render them and automatically add rows.

template doc  

The table also has settings for displaying the inside horizontal border, and when a new row appears, the border between them will be displayed.

It also uses a picture formatter {{object.url}:picture(210,170)} to handle photos from columns with attached photos of objects from Airtable. The numbers in the brackets of the token indicate the width and height of the image. Specifying two sizes allows you to use images with different resolutions, since, in the finished document, it will be stretched to these values.

We launch Plumsail Documents, click the Add Process button, and select the Start From Template item. In the list of templates, select Property List. Enter the name of the process, go to template settings, check it, and click the Save & Next button.

plumsail set template  

The next step is setting up the output file that we will receive after generating the document. The main lines to fill will be Output filename and Output type. Depending on your needs, you can choose one of two formats for the final document: PDF or Word DOCX. Select PDF format and click the Save & Next button.

plumsail out  

After completing the configuration of the output file, we go to the tab to choose the delivery method. It can be your mailbox, Slack, SharePoint, etc. We set to save our generated document to Google Drive. Alternatively, if the needed delivery option is missing, you can manipulate the resulting file in Make and send it to any app.

We also add the @date token to the file name. When a document is generated, it will have the creation date in its title. Click the Save & Next button and go to the settings Start process.

plumsail deliv  

In this section, we do not need to do anything. Returning to Airtable

3. Way one: Create document using the Plumsail Documents extension for Airtable

Let's start by adding the Plumsail Documents extension to the database. Click on the Extensions button, then click Add an extension, and in the pop-up window, enter Plumsail Documents in the search bar. Find the application and click Add.

airtable add  

You can read more about adding the Plumsail Documents extension to the Airtable database in the documentation Getting started --> Use Airtable --> Working with Documents extension

After we have logged into our Plumsail Documents account, the Add document generation button window pops up where we need to make settings. In the Process to start field, select our template in Plumsail Documents. In our case, it is the Property list. The Button title was generated automatically. Also we must choose option how to generate a document if several records are selected from our Airtable database. Click One aggregated document. The Download result document switch is already automatically turned on. Click on the Add.

airtable button setting  

The next step is to set up tokens. Airtable automatically generates tokens according to the database we work with. Therefore, we will need to copy the tokens from Airtable and replace the tokens in the Plumsail Documents template with them.

airtable plumsail tokens  

Click on Show template tokens.

airtable show tokens  

After clicking, we will see a list of database columns. Clicking on any of them causes the field token to be copied to the clipboard.

airtable templates tokens  

Now we need to go back to Plumsail Documents. In editing the Property list process. And stay in Configure template stage in the Editor section.

airtable plumsail editor  

We return to Airtable, click on the name of field, copy the token to the clipboard, and paste it into the appropriate place in our template, replacing the old token with the new one. Save the changes made.

plumsail editor airtable  

Particular attention should be paid to the use of tokens for images. The token for images will be located in attachments --> thumbnails --> full --> url.

airtable image token  

Click on url and copy the {{Attachments.thumbnails.full.url}} token to the clipboard. We paste the copied token into the template instead of the {{object.url}:picture(210,170)} token and supplement it with a picture formatter {{Attachments.thumbnails.full.url}:picture(210,170)}.

After all settings are completed, close the window with extensions. Turn on the filter Available Objects and select all remaining objects with one click. On the panel with Plumsail Documents extensions, click on the button Property list.

airtable final setting  

The list of real estate objects will be downloaded to your computer automatically. It is important to mention that with Plumsail Documents, you can not only download files but also choose any convenient delivery method. For instance, the document can be automatically sent by email or saved in the cloud.

final doc  

4. Way two: Create document from Airtable using Make and Plumsail Documents

Now let's look at the second way to get data from Airtable using Make. We will start this flow settings from the moment after we set up document generation process. We move on to creating a new flow in Make. Here's what it will look like in the end:

make prev  

Trigger  

The first thing we need to do is set the Trigger. In our case, we used the module Search Records in the Airtable database and performed the following steps:

  1. Connect Airtable and Make accounts.
  2. Select a database Real estate database.
  3. Specify the Main table where we will take the data.
  4. Choose the Available objects view that we created earlier.
  5. Set the Output Fields.

make airtable  

Iterators  

After creating the search module, we will add modules with Iterators. An Iterator is a special type of module that converts an array into a series of bundles. Each array item will be outputted as a separate bundle. In each iterator, we write one array. As a result, we get an Iterator with an array of names, an Iterator with an array of descriptions, and so on. The number of Iterators corresponds to the number of fields to fill in our template.

make iterators  

For an array of attachments with photos of objects, select the source URL.

make iterators url  

Arrays Aggregator  

Next, we add the module Array Aggregator. An Aggregator is a type of module designed to merge several bundles of data into a single bundle. It accumulates all the bundles it receives and outputs a single bundle with an array containing one item per accumulated bundle. The content of the array's items depends on the particular Aggregator module and its setup.

NOTE: Before setting up Aggregator, add the Plumsail Documents module and synchronize it with Make. Select a process and go back to the Aggregator setup.

Having opened the settings of the Aggregator, we indicate the Source module is the Airtable - Search Records. Then we select the Target structure type, the Plumsail Documents, and merge the fields of the document template with the resulting arrays from Iterators.

make aggregator  

Plumsail Documents - Start Documents Generation Process  

The next step is adding and configuring the Plumsail Documents module. We made the connection and process selection earlier, before setting up the Aggregator. We make the Map switch in the object field active and select the resulting array from the Aggregator.

make plumsail  

Our last step is to set up the launch of the scenario. We click on the time, select the launch scenario Every day, and specify the time as 8:40. Click OK and switch SCHEDULING to the active position.

make run  

All settings are ready. Now every morning, Make will query Airtable for all records from the database. It will process the received data according to our settings and transfer it to Plumsail Documents to generate a PDF document from the template and save it on Google Drive.

5. Conclusion

In summary, creating PDFs from Airtable multiple records with image attachments can be done through two methods, each of which has its own advantages:

Using Plumsail Documents extension for Airtable:

  • Ease of use: Direct integration into Airtable ensures simplicity in setup and usage.
  • Efficiency: Allows direct document creation from Airtable data without the need for additional tools.

Using Make (formerly Integromat) as a connector:

  • Flexibility: Make provides flexible capabilities to extract data from Airtable and transfer it to various templates.
  • Advanced functionality: Enables integration and automation of processes across different applications, expanding functionality.

The choice between methods depends on specific needs and user preferences: if simplicity is crucial, the first method is preferable; if greater flexibility and integration with other applications are required, the second method may be more suitable. It's up to you to choose.

6. Get started

Register an account and get a free trial for one month.

If you have any questions or comments about the material, feel free to leave them in our community portal.

Connect your applications and start generating documents automatically right now!