Variables in Google Docs

Learn all the variable types you can use to create dynamic documents with TypeFlow.


Overview

Google Docs templates use variables as placeholders that get replaced with your Airtable data. Variables are the key to personalizing each document.

TypeFlow supports seven variable types:

TypeSyntaxUse Case
Standard{{variable}}Text, numbers, dates
Image{{image_xxx}}Embed images
Link{{URL:text}}Add hyperlinks
Conditional{{section_xxx}}...{{/section_xxx}}Show/hide content
Line Items{{loop_x}}Table rows
Nested{{nested_x}} + {{nested_items_x}}Grouped rows
Product Cards{{table_loop_x}}Card layouts

Standard Variables

The most common variable type. Replaces text with your Airtable field values.

Syntax

{{FieldName}}

Examples

TemplateDataResult
Dear {{ClientName}},John SmithDear John Smith,
Invoice #{{InvoiceNumber}}1234Invoice #1234
Date: {{Date}}2024-01-15Date: 2024-01-15

Image Variables

Embed images from Airtable attachment fields.

Syntax

{{image_xxx}}

Where xxx is any identifier you choose.

Features

  • Width control: Set image width in TypeFlow
  • Multiple images: Choose how many to display from an attachment field
  • Auto-conversion: Images are converted to JPEG automatically

Supported formats: PNG, WEBP, TIFF, GIF, SVG, AVIF, HEIC/HEIF, PDF

Related: Dynamic Images


Add clickable hyperlinks to your documents.

Syntax

{{URL:display_text}}

Example

Visit our website: {{URL:Click here}}

Map URL to an Airtable field containing the URL, and "Click here" becomes the clickable text.


Conditional Sections

Show or hide entire sections based on your data.

Syntax

{{section_xxx}}
Content to show or hide
Multiple paragraphs allowed
{{/section_xxx}}

Use Cases

  • Premium content for certain customer types
  • Optional contract clauses
  • Role-specific instructions

Related: Conditional Sections


Line Items

Create dynamic table rows from linked records.

Syntax

{{loop_x}}

Place in a table cell. TypeFlow automatically duplicates the row for each linked record.

For Images in Line Items

{{loop_image_xxx}}

Features

  • Auto-adjusts table size
  • Supports all field types
  • Works with linked record fields

Related: Line Items


Nested Line Items

Group related rows together (e.g., orders grouped by category).

Syntax

Two variables required:

{{nested_x}}       - Main group row
{{nested_items_x}} - Items within each group

Related: Nested Line Items


Product Cards

Create card-style layouts in tables.

Syntax

{{table_loop_x}}

For images within product cards:

{{table_image_xxx}}

Related: Product Cards


Setting Up Your Template

Step 1: Create Your Layout

Design your document with static content and placeholder variables.

Dear {{ClientName}},

Thank you for your order #{{OrderNumber}}.

{{section_premium}}
As a premium customer, you receive free shipping.
{{/section_premium}}

Step 2: Identify Variable Locations

Mark where each piece of dynamic data should appear.

Step 3: Save with Descriptive Name

Use clear naming like "Invoice Template v2" or "Contract - Standard Terms".

Tip: Keep variable names consistent across templates for easier maintenance.


FAQ

What variable syntax does TypeFlow use?

TypeFlow uses double curly braces: {{variable_name}}. The variable name should match your Airtable field name.

Can I use multiple variable types in one template?

Yes. You can combine standard variables, images, links, conditional sections, and line items all in the same template.

Do variable names need to match exactly?

Variable names are mapped in TypeFlow, so they don't need to match your Airtable field names exactly. However, using consistent naming makes templates easier to maintain.



Need More Help?

Was this page helpful?