Help

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

122 0
cancel
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.

Performance

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.

Security

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.

image

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?

12 Replies 12

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.

typeflow
5 - Automation Enthusiast
5 - Automation Enthusiast

A bit late, but if you're looking for a solution, Typeflow can help you quickly generate PDFs from Airtable data using Google Docs templates. It's straightforward and efficient.

Feel free to give it a try, and I'd love to hear your feedback! I'm also offering a lifetime plan for early users at just $100. Ping me if you're interested or have any questions.

With pdfShift how do you get your document back into Airtable? I find many of the HTML to PDF API's only provide binary data as the output.

Specifically within Make.com there is no way to get the binary data hosted at a URL without using yet another service.

I use pdf.co for a few projects, but I feel like there are too many outages.

 

Thanks!