Add hierarchical data to your documents with up to 3 levels of nesting - perfect for invoices with services and tasks, bills of materials, or any parent-child-grandchild data structure.
Currently available for Airtable or via DocsAutomator's API
Overview
Nested line items allow you to display hierarchical data from linked tables in your documents. Instead of a flat list, you can show:
Supported levels:
Level 1 (Parent): Main items from your line items table
Level 2 (Child): Items from a linked table within Level 1
Level 3 (Grandchild): Items from a linked table within Level 2
Prerequisites
Before using nested line items, ensure your data source has linked tables set up:
Data Source
Requirement
Airtable
Linked record fields connecting your tables
Placeholder Format
Each nesting level uses a specific placeholder prefix:
Level
Prefix
Example
Level 1 (Parent)
{{line_items_N}}
{{line_items_1}}{{product_name}}
Level 2 (Child)
{{line_items_N_1}}
{{line_items_1_1}}{{component}}
Level 3 (Grandchild)
{{line_items_N_2}}
{{line_items_1_2}}{{specification}}
Where N is the line item table number (1, 2, 3, etc.).
Example Template Structure
Setting Up Nested Line Items
Step 1: Configure Your Data Source
For Airtable
Navigate to your automation settings
Under Line Items, select your primary linked field (Level 1)
Click "+ Add Level 2" to select a linked field from your Level 1 table
Click "+ Add Level 3" to select a linked field from your Level 2 table
The UI shows a hierarchical view of your linked tables:
Step 2: Create Your Template
Using the Template Editor
Open your Google Doc template in DocsAutomator
Click "Add Line Items" in the sidebar
Configure Level 1 (Parent) columns:
Add column names and headers
Example: service_name, description, price
Click "+ Add Nested Level" for Level 2
Configure Level 2 (Child) columns:
Example: task_name, hours
Click "+ Add Nested Level" for Level 3 (optional)
Click "Add Line Items" to insert the table
Manual Template Creation
You can also create the template table manually in Google Docs:
Insert a table with your desired columns
Add header row (optional)
Add one row per nesting level with the appropriate placeholders
Different Column Counts Per Level
Each nesting level can have a different number of columns. DocsAutomator automatically handles this by merging cells when a nested row has fewer columns than its parent.