Page cover image

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:

Native DocsAutomator Integration in Glide

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

If you're adding DocsAutomator for the first time, you will need to add our credentials:

Your DocsAutomator API key can be found under settings in your DocsAutomator account.

5. Set Template / Automation ID and Filename

You will then be asked to add a template / automation id and specify the filename for generated documents (Pro Tip: Make the file name unique based on the row you're printing from by using a template column or similar). The template id you find in the URL bar of your automation.

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!

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:

  1. Rows (2nd level)

  2. Joined list of all rows that shall be added (1st level)

  3. Joined list turned into an array (1st level)

1. Row level (2nd level)

The row level / second level represents the rows you would like to print. In case of invoices, rows would be the line items. In Glide, we would have two tables in this case: Invoices and Line Items. In the line items table, we need to construct the data to then be joined one level up (invoice 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

How can I format numbers & dates?

If you prefer a video tutorial (3 minutes), please go here: https://youtu.be/SWx0F6umbf4?si=e25V-vWtYh-kfglG

For formatting dates: use a Format Date column

For formatting numbers: use a Template column referencing your number field (this turns your number field into a text which can then be mapped to placeholders)

How can I add images?

For images, you need to declare variables like so: {{image_someUniqueName}}. Please see the full image documentation here: Dynamic Images

You can then map image columns from your table.

The Multiple Images column is not supported at the moment.

Runs are failing. How can I get help?

Please have a look in your run history in your account: https://app.docsautomator.co/runhistory

If you're facing issues and don't find a solution, feel free to reach out to support anytime.

Last updated