Select Page
Add Multiple Records to a Document or Creating Multi-Page Documents
Add Multiple Records to a Document or Creating Multi-Page Documents

Add Multiple Records to a Document or Creating Multi-Page Documents

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

Add Multiple Records (Line Items) to a Document or Creating Multi-Page Documents

Useful for multiple records on one document and for multi-page documents

You can create a table in Google Docs that is dynamically generated based on the exact size you need to fit your Airtable data.

This is useful when you have multiple Airtable records that need to be added to a single document, like an invoice with multiple line items, a quote, or a report.

You can also send data into a document from multiple Airtable tables!

Google Doc Template with Table template

Merged Document with Airtable Data

image
image

In the Quote example above, we’re bringing in Airtable data from 2 different tables - the Quotes table and the Budget Items table. The Quotes table links to the Budget Items table. We’ve added multiple Budget Items to the Quote for the ‘Sunlight Acoustics’ company.

Add the Google Docs Quote Template to your Google Workspace to see how it’s set up

You can add the Project Budget Airtable demo base to your workspace to see how it’s set up.

Quotes Table

image

Budget Items Table

image

The setup in On2Air uses the Quotes table as the main table to add {{My Field Name Placeholders}} and then uses the {{table source}} template to bring in data from the Budget Items table.

How You Can Set It Up with a Linked Record Field

  1. Copy our Project Demo Airtable base - It has a Quotes table with a Linked record field to the Budget Items table. The Budget Items are a list of items you need on a Quote. The Quotes table is what you use to set up the On2Air document automation and the Budget Items will be added to your document.
  2. Use our Quote Template Google Docs file or add the following table template syntax to a Google Docs file

{{table header=“Item|Hourly Rate|Units Price|Fixed Cost|Category” source=“Budget Items" fields="Item Name|Hours*Rate|Units*Price|Fixed Cost|Category"}}

  • table header - labels the headers in the first row of the table
  • source - Budget Items is the secondary table from a Linked record field in the Quotes table
  • fields - field names from the Budget Items table
  • In the Budget Items table in the Airtable base, there are fields for Item Name (Single text), Hours*Rate (formula), Units*Price (formula), Fixed Cost (Currency), and Category (Single Select)

  • Quotes is the main table in the On2Air function setup
image
  1. In the Quotes table, create a single record and add multiple records from the Budget Items table in your Budget Items linked record field
  2. Set up your On2Air function as described here
  3. Click the checkbox to Process Quote
image

To see all Formatting options you can use in your Document - See all the options in the

3 Ways to Set Up Tables

Tables in your document can be created with data from your Airtable record(s) in a few different ways:

  • Linked Record Field (common use case for multiple records and this one displayed in this tutorial) - Use a Linked Record field (to another Airtable Table), along with field names of the linked record table.
    • This is useful for generating documents where you want to include a list of multiple records as a list in a single document, such as on an Invoice or a Quote
    • Format: {{table source="Linked Table Name (from Linked Record)" field="Field Name in Linked Table"}}
  • Lookup/Rollup Field Values - Use source with Lookup/Rollup values to display in table For multiple columns, list these in separate cells next to each other:
    • ex: {{table source="Lookup Field 1"}} | {{table source="Lookup Field 2"}} note: For rollup values, the formula should be: ARRAYJOIN(values,"|")

  • MultiSelect Field Values - Create a list of the values from a multiselect selection ex: {{table source="MultiSelect Field"}} - Should be used alone and not combined with other source values Note: This will be a single column table