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
Create the Google Doc Template
Create a new Google Doc that will serve as your invoice template. Add placeholders using the
Line items table:Add a table row with line item placeholders:
{{placeholder}} syntax for fields that will be filled dynamically.Example template placeholders:| Section | Placeholder | Purpose |
|---|---|---|
| Header | {{company_name}} | Your company name |
| Header | {{image_company_logo}} | Company logo |
| Invoice details | {{invoice_number}} | Unique invoice ID |
| Invoice details | {{invoice_date}} | Date of invoice |
| Invoice details | {{due_date}} | Payment due date |
| Client info | {{client_name}} | Client’s name |
| Client info | {{client_email}} | Client’s email |
| Client info | {{client_address}} | Client’s address |
| Totals | {{subtotal}} | Sum before tax |
| Totals | {{tax}} | Tax amount |
| Totals | {{total}} | Final amount due |
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)
Create the Automation in DocsAutomator
- Click + 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
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.
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
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
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.)
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
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