Re: PDF Document Generation; Going Around the Barn One Less Time

2374 0
Showing results for 
Search instead for 
Did you mean: 

On a recent task I reached my limit for the annoying and time-consuming implementation of a PDF document generation process for Airtable. I just had to find a way to eliminate lots of steps.

Lacking the use of integrated tool sets the likes of which @kuovonne and On to Air has created, most of mine have embraced a process like this. As you can see in the list, the workflow involves a lot of steps that are dependent on services all working perfectly as expected. Not to mention that there is a significant amount of processing time involved with all of these steps combined.

Airtable → Automation → Script → Webhook → Google Apps Script → Airtable API → Google Document (template) → Google Drive → Google Apps Script → Airtable API → Airtable

I really want this:

Airtable → Script Action → Airtable

This seems impossible, but it’s not. I have perfected this approach and it requires no external document storage service to host the final PDF document from for upload into Airtable’s attachment fields. It’s a “data-direct-to-attachment” concept that few people (if any) have discovered.

HTML Chassis

The key concept here is to do everything in HTML as the common underlayment for the document and then use tools to convert the final rendering into a PDF. HTML is easy to work with and generated even in Airtable formulas.

PDF Conversion

I tend to lean on an external [paid] service for PDF conversion from HTML. This is an insignificant cost; $10/mo gives you a thousand documents and they’re only a cent per document thereafter. Is it worth a penny per document to avoid all the complexity? This cost is minimal considering the significant reduction in complexity and overall ownership of the process and reduced dependencies on other big tech platforms.


Most important is the performance when processing documents in Airtable scripts. If you use Google Apps Script and Google Drive the generation and upload process is typically north of 10 seconds per document. With this new approach, it’s about 1.6 seconds from the moment the Airtable action script is triggered to the final PDF document uploaded in your attachment field.


I know there are many services that allow you to generate PDFs from HTML but one thing I’m concerned with is the privacy of those documents which must be openly hosted to facilitate the attachment upload process into Airtable. This is not a complete list…

Whichever one you decide to go with, make sure you understand the disposition terms of the documents they generate for you.


Step 1 - Invoke the generation process; gather the data for the document.

Step 2 - Read the appropriate document template.

Step 3 - Merge the data into the template and generate the PDF.

Step 4 - Attach the final document to the Airtable record (optionally email as attachment, etc).

I’m exhausted from solving this the old ways; what’s your approach?

10 Replies 10

Thanks for sharing. I’ll look into it.

Yes, I don’t remember if it was a matter of hours or days.

By the way, we both know that “unlimited” isn’t really unlimited. And I have never come close to stressing the service. If I expected to have a significant number of conversions on a regular basis, I would pay for the service. But it is nice to not worry about a specific limit, especially when trying to get the code right and tweaking html and css templates.