Select Page
Google Docs Function - Template Guide
Google Docs Function - Template Guide

Google Docs Function - Template Guide

🔴 On2Air Docs has been shutdown to focus on our On2Air Backups Airtable app Learn more about automated Airtable backups - on2air.com

The Google Docs Template Guide is used to setup the Google Docs Function. The Google Docs Function allows you to automatically create documents inside Google Docs using your Airtable data. You can generate single page and multi-page documents that display a single record or list of records from your Airtable base. It will also automatically upload the newly created PDF file back into your Airtable base in an Attachment file and the Google Doc URL into a URL or Text field. Use Cases: Invoices, Quotes, Contracts, Form Entries, Reports, and more

Features:

  • Automatically generate documents with your Airtable data
  • Create single or multi-page documents
  • Bulk create documents for multiple Airtable records or create documents per single record
  • Save as a PDF back to an Attachment field in your Airtable base
  • Save the Google Doc URL back to a URL or Text field in your Airtable base
  • Tables in your document automatically created to match the number of records needed
  • Add advanced formatting with specific in-document templates for tables, images, links, content, and grids.
  • For advanced documents, you can set up multiple document templates based on conditionals from your Airtable data and you can use the custom formatting templates inside your document for Tables, Text, Numbers, Dates, Images, Links, and Grids.

Table of Contents

Templates Overview

Basic Document Setup and Overview

To start using On2Air Docs, you’ll first need to create your template in Google Docs. You can use our tutorial below with templates to help you get started.

The Google Docs Function in On2Air Docs enables you to create documents that incorporate your Airtable data.

The Airtable data replaces merge fields in your Google Doc template. It’s conceptually similar to a mail merge, but much more powerful. The merge field is the fundamental way to add Airtable data to your document. Each merge field is replaced by the relevant Airtable data when it is merged.

The most basic version of a merge field is your Airtable field name wrapped in curly braces. These merge fields will be replaced with the content in that Airtable field.

Basic Example

Quote Created For: {{Client Name}}
Quote Created On {{Quote Date}}

This example will pull data from the “Client Name” and “Quote Date” Airtable fields to populate the document. The final result would look something like:

Quote Created For: Jane Doe
Quote Created On 4/18/2023

Advanced Example

In Airtable:

  • You have an Invoices table that you want to generate invoice documents from
  • You have a Linked Record field to the Companies table with the Company Name field and you have Lookup fields for the Address and Email.

In Google Docs:

  • You create a template file
  • You then add the merge fields for {{Company Name}}, {{Address}}, and {{Email}}
  • You position these merge fields exactly where you want the final data to be in the document

The final Google Doc Template could look like the below example. Each instance of curly braces is a merge field that will be replaced by data from the Airtable table.

image

Tutorials

Basic Merge Fields & Simple Table

The tutorial will walk you through:

  • Making a copy of the Peak Commercials - Quote Template document
  • Making a copy of our Peak Commercials - Demo Airtable base
  • Setting up the Google Docs function in On2Air
  • Using different merge fields in the document
  • Viewing the output from Airtable

For this tutorial we are the imaginary company Peak Commercials. We are creating a Google Doc template so we can more easily create quote estimates for our customers.

In this example we will walk through the following merge fields:

  • Basic merge field
  • Image merge field with placeholder image
  • Date merge field with formatting
  • Paragraph merge field
  • A simple table
  • Number merge field with formatting

The input and output for the tutorial look like the following:

Google Doc Template with Table template

Merged Document with Airtable Data

image
image

In example above, we’re bringing in Airtable data from 2 different tables - the Quotes table and the Items table. The Quotes table is the source for all of the merge fields except the table. The table uses the Budget Items field, which is a Linked Record that points to the Items table.

Step 1 - Create Your Google Template

Step-By-Step Guide

To begin the tutorial, make a copy of the Google template document and the Airtable base.

  • Peak Commercials - Quote Template document
    • Click here to view the document
    • Click “File” in the upper left hand corner.
    • Select “Make a copy” and copy the file to your own Google Drive
    • If “Make a Copy” is grayed out, it is likely because you are not logged in to your Google Account. Once you are logged in, you will be able to make a copy.
  • Peak Commercials - Demo Airtable base

🎥How to Create the Google Docs Quote Template

This video will show you how to create your Google Docs Template and show you how an Airtable base might be set up.