Glide
Glide is a no-code software development platform that lets anyone create powerful apps and tools for business without any coding experience.
DocsAutomator seamlessly integrates with Glide via the native DocsAutomator integration.
New to DocsAutomator? The fastest way to get started with Glide is our quick start guide: Quickstart Guide
Overview
Generating PDFs from Glide is very thanks to the native DocsAutomator integration:
It allows for any kind of document to be generated from buttons or added to an action sequence in the Action Editor in Glide. It also allows for adding line items / dynamic data as shown below. Let's dive in!
Step by step guide
1. Create automation
The first step is to create a new automation in your DocsAutomator account.
2. Select Glide as your data source
Please select Glide as your data source.
3. Select your Google Doc template
Every automation in DocsAutomator needs a Google Doc template to create documents from. Please visit our Google Doc Template Guidefor all the options on how to get started. If you just want to test DocsAutomator, a good starting point is the Playground Template, which you can add in your automation.
4. In Glide, select "Generate document" with DocsAutomator
Your DocsAutomator API key can be found under settings in your DocsAutomator account.
5. Set Template / Automation ID and Filename
6. Map data
Now it's time to map some data. Here, you're building placeholder / value pairs. The placeholder needs to be exactly as given in your template, just without curly brackets. The value can be any value from your Glide data source or a custom value.
7. Specify file output
Please specify a field where you would like to store the generated PDF.
8. Start generating documents
Having mapped all fields and specified where to store the finished file, it's time to generate documents!
Use a "Web Embed" on your PDF field to display the document right after generation!
Adding line items
Many dynamic documents include lists of things (like line items on invoices, lists of staff / items, etc.). For this, DocsAutomator's line items feature can be used. Please see Google Doc Template Guide for the exact formatting in your template in order to declare a line items table.
Once declared, line items are passed with the line items key (line_items_1
for the first line items table, line_items_2
for the second, etc.).
The passed data / value (here above called "NEW ARR") needs to be constructed in three parts:
Rows (2nd level)
Joined list of all rows that shall be added (1st level)
Joined list turned into an array (1st level)
1. Row level (2nd level)
Constructing the data happens via a JSON Object
column. Example:
In this case, product, amount, unit and total were the variables used in the line item declaration in the template.
2. Joined list of all rows that shall be added (1st level)
Now, one level up, in the invoices table, we need to join all rows that we want to add. Line items are linked via a Relation
column in Glide:
We can then create a Joined List
column referencing the row data built under 1.
3. Joined list turned into an array (1st level)
Lastly, the data needs to be passed as an array (although to be more precise, it's just a text representation of an array). We use a Template
column for that:
FAQs
Last updated