What You’ll Build
By the end of this guide, you will have an automation that:- Generates a branded PDF invoice from an Airtable record
- Includes line items pulled from a linked table
- Saves the PDF back to your Airtable record
- Optionally emails the invoice to your client
Prerequisites
- A DocsAutomator account (sign up here)
- An Airtable account with a base containing your invoice data
- A Google account for creating the template
Step-by-Step Setup
1
Create the Google Doc Template
Create a new Google Doc that will serve as your invoice template. Add placeholders using the
{{placeholder}} syntax for fields that will be filled dynamically.Example template placeholders:Line items table:Add a table row with line item placeholders:
2
Prepare Your Airtable Base
Structure your Airtable base with two tables:Invoices table (primary):
- Invoice Number (formula using
RECORD_ID()or custom numbering) - Client Name (single line text or linked record)
- Client Email (email field)
- Client Address (long text)
- Invoice Date (date)
- Due Date (date)
- Subtotal, Tax, Total (formula/currency fields)
- PDF (attachment field for generated documents)
- Document Name (formula: e.g.,
"Invoice-" & {Invoice Number})
- Description (single line text)
- Quantity (number)
- Unit Price (currency)
- Amount (formula:
{Quantity} * {Unit Price}) - Invoice (linked record to Invoices table)
3
Create the Automation in DocsAutomator
- Click New, then New automation in your DocsAutomator dashboard
- Give it a name like “Client Invoices”
- Select Airtable as the data source
- Connect your Airtable account if not already connected
4
Configure the Template
Select your Google Doc invoice template, or choose one from the Template Gallery. DocsAutomator will scan the template and detect all placeholders automatically.
5
Select Base, Table, and Configure Output
- Choose your Airtable Base and Invoices table as the primary table
- Set the Document Name field (e.g., your “Document Name” formula field)
- Set the Attachment field to your “PDF” field where generated invoices will be saved
- Enable Overwrite attachment if you want regeneration to replace existing PDFs
6
Map Fields and Line Items
Primary field mapping:Map each template placeholder to its corresponding Airtable field. For example:Line item mapping:
{{invoice_number}}to the Invoice Number field{{client_name}}to the Client Name field{{total}}to the Total field
Use the AI Field Mapping button to automatically suggest mappings based on placeholder and field names.
- Select the linked field connecting to your Line Items table
- Choose the view that determines sort order
- Map line item placeholders to columns:
descriptionto Descriptionquantityto Quantityunit_priceto Unit Priceamountto Amount
7
Generate a Preview
Select an existing Airtable record and click Preview to generate a sample invoice. Verify that:
- All placeholders are replaced correctly
- Line items appear in the table
- Formatting looks correct (currency, dates, etc.)
8
Configure Output Actions
Set up post-generation actions:
- Save PDF to Airtable: Already configured via the attachment field
- Send Email (optional): Enable email sending, set the recipient to
{{client_email}}, customize the subject line (e.g.,Invoice #{{invoice_number}} from {{company_name}}), and write your email body with placeholders - Save to Google Drive (optional): Choose a Drive folder for archival
9
Set Up the Trigger
Choose how invoices are generated:
- Automation Script (Paid Plan)
Example Template Layout
Here is a simplified view of how your invoice template might look:Next Steps
Nested Line Items
Add sub-items within line items for detailed breakdowns
Grouping + Calculations
Group line items by category with subtotals
Conditional Content
Show or hide sections based on data values
E-Signatures
Add signature fields for client approval