🔴 On2Air Docs has been shutdown to focus on our On2Air Backups Airtable app Learn more about automated Airtable backups - on2air.com
You can automatically generate any type of document with your Airtable data using On2Air Docs and Google Docs. In this tutorial, you’ll learn how to create a Google Doc template and setup the On2Air Docs automation.
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
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
- Click here to view the Airtable base
- To the right of the base name, click “Copy Base” to make a copy in your own Airtable account.
🎥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.
Step 2 - Create Your On2Air Docs Automation
🎥How to Configure Your On2Air Docs Automation
This video will show you how to configure the automation in On2Air Docs. Before this step, you need to create your Google Docs template.
Step-By-Step Guide
- Click “Create New Function”
- Select “Google Docs Create/Export”
- Configure the function
- Click “Add Configuration”
- Source Connection
- Select your Airtable Connection
- Source Configuration
- Base - Select your Airtable base. In this case, it should be “Peak Commercials - Demo”
- Table - Select “Quotes”
- View - Select “Grid View”
- Trigger Mode
- Select “Checkbox”
- Mode Configuration
- Select Your Check Box Field - Select “Process Quote”
- Trigger On - Select Check
- Toggle Check Box On Trigger - Set to on. This should be green.
- More Options - You can skip this setting.
- Google Docs Function Configuration
- Google Connection - Select your Google Account
- Source File Mode - Select “Use a Single Template”
- Source File - Select the “Peak Commercials - Quote Template” document that you made a copy of earlier
- Destination Folder - Select “Save All Files in a Single Parent Folder”
- Destination Folder - Select the folder that you want your merged files to be saved in.
- Destination Folder URL Storage Field - Leave blank, skip for now.
- New File Title - Enter {{Quote Name}} into this field. That is the merged field that will name the document.
- Source File URL Storage Field - Leave blank, skip for now.
- Merge Field Output - Select “Always Merge Fields”
- Merge Output URL Storage Field - Select “Merged Google Doc URL”
- Delete Previous Merged File - Set to on. This should be green.
- Export File - Select “Export Merged File”
- Exported Format - Select “PDF”
- Exported File Storage Field - Select “Quote PDF”. This is where the actual PDF will be stored as an attachment
- Export Placement - Select “Remove all existing attachments then attach new one(s)
- Save Exported File In Google Drive - Set to on. This should be green.
- Save Exported File Storage Field - Select “PDF Url”. This will save a link to the PDF in Google Drive.
- Delete Previous Exported File - Set to on. This should be green.
- File Permission
- You can skip this for now.
- Advanced Settings
- You can also skip this for now.
- Click “Save Action Function Details”
Step 3 - Test and install your On2Air Docs automation function
- In your Peak Commercials Airtable base, go to the Quotes table. Check the box in the “Process Quote” field. This must be done prior to testing the function. The function will only run if one of the checkboxes is checked.
- Test the Function
- Go back to On2Air and click “Test Function” next to Configuration.
- Click the “Test Function” button.
- You should see a box titled “Function Results” with the content “Function ran successfully”
- If you do, woo! You have your first function almost set up. Continue to “Installation” to finish the set up process.
- If you don’t, double check you have one of the “Process Quote” checkboxes checked.
- Install the Function
- Click “Installation”
- Set “Enable” to on. This should be green.
- Scheduler Setup
- Run Scheduler - Set to on. This should be green.
- Frequency - Select “Instant”
- Click “Save Scheduler Settings”
- Celebrate!
- You have your first function set up!
- In your Airtable base, when you click the checkbox in “Process Quote”, the function will run and generate your merged documents.
Pre-Made Google Docs Templates
To help you get started you can copy one of our Google Docs pre-made templates.
You will need to replace the placeholders with your field and table names and then customize the document to fit your needs.