Variables & Field Mapping
Use TypeFlow variables to automatically insert your Airtable or Softr data into your document templates.
Overview
TypeFlow uses variables (also called placeholders) to map your database fields to your document template. When a document is generated, each variable is replaced with the actual value from your record.
| Template | Generated Document |
|---|---|
Hello {{Name}}, | Hello John Smith, |
Total: {{Amount}} | Total: $1,500.00 |
How Variables Work
You have two options for mapping variables to your database fields:
Option 1: Use the Fields Panel (Recommended)
Copy variables from the Fields Panel and paste them into your template. TypeFlow automatically maps them to your database fields - no configuration needed.
Benefits:
- No typos in variable names
- Correct syntax generated automatically
- Auto-mapping - works immediately
- Copy-paste ready
Option 2: Write Your Own Variables
You can type any variable name you want (e.g., {{my_custom_name}}). However, you will need to manually map each variable to the corresponding database field in the Mapping tab.
When to use this:
- You prefer your own naming convention
- You're migrating from another tool
- You want full control over variable names
Using the Fields Panel
The Fields Panel is your central place to find and copy variables. It contains four sections, each serving a different purpose.
Opening the Panel
- Google Docs: Panel is on the left side
- HTML Builder: Panel is on the right side
- The panel auto-opens on your first visit with a tutorial
How to Use
- Find the field you need in the panel
- Click on it to copy to clipboard
- Paste (
Ctrl/Cmd + V) in your template - The variable is ready to use
Variable Types
The Fields Panel organizes variables into four sections:
1. Main Table
Direct fields from your main table. Use {{Field}} syntax.
| In your template | Generated output |
|---|---|
Dear {{First Name}} {{Last Name}}, | Dear John Smith, |
Email: {{Email}} | Email: john@example.com |
Phone: {{Phone}} | Phone: +1 555-123-4567 |
Status: {{Status}} | Status: Active |
2. Linked Records
Fields from linked tables. Expand in the Fields Panel to see all available syntaxes:
| Syntax | Description | Use Case |
|---|---|---|
{{LinkedTable}} | Primary field of linked record | Display linked record name |
{{LinkedTable.Field}} | Specific field from linked table (comma-joined) | Single values outside loops |
{{LinkedTable.LinkedField.Field}} | Multi-level linked access | Access fields 2-3 levels deep |
{{LinkedTable:Field}} | Field in loop context | Inside loop_0 or table_loop_0 |
{{Parent>Child:Field}} | Field in nested context | Inside nested_items_0 |
Separator Meanings
| Separator | Character | Purpose |
|---|---|---|
| Dot | . | Access linked field (outside loops) - returns comma-joined values |
| Colon | : | Access field in loop context - returns one value per row |
| Chevron | > | Navigate to nested linked record |
Dot Syntax Examples (Outside Loops)
| In your template | Generated output |
|---|---|
{{Product Choose}} | Product A, Product B |
{{Product Choose.Name}} | Product A, Product B |
{{Product Choose.Price w/o VAT}} | $100.00, $200.00 |
Multi-level access
| In your template | Generated output |
|---|---|
{{Product Choose.Company}} | Acme Corp, TechCo |
{{Product Choose.Company.Name}} | Acme Corp, TechCo |
{{Product Choose.Company.Phone}} | +1-555-0100, +1-555-0200 |
Colon Syntax Examples (Inside Loops)
Use when you have multiple linked records that need to repeat in a table row.
| In your template | Generated output (per row) |
|---|---|
{{Product Choose:Name}} | Widget A |
{{Product Choose:Price w/o VAT}} | $100.00 |
3. Loop Markers
Place these where you want repeating content.
| Marker | Purpose | Use Case |
|---|---|---|
{{loop_0}} | Line items - repeat row for each linked record | Invoice rows, order items |
{{table_loop_0}} | Table loop - repeat entire table for each record | Multi-page reports, certificates |
{{nested_0}} | Nested line items (Level 1) - mark parent linked record | Categories |
{{nested_items_0}} | Nested line items (Level 2) - repeat for each nested record | Products within categories |
Line Items (loop_0)
Place {{loop_0}} at the start of the row you want to repeat. TypeFlow repeats it for each linked record.
| What you write (1 row) | What you get (3 rows if 3 products) |
|---|---|
{{loop_0}} {{Product Choose:Name}} {{Product Choose:Price}} | Row 1: Widget A - $100.00 |
| Row 2: Widget B - $200.00 | |
| Row 3: Widget C - $150.00 |
Table Loop with Multiple Nested Items
You can combine {{table_loop_0}} with multiple nested item groups for complex reports.
| Marker | Purpose | Example |
|---|---|---|
{{table_loop_0}} | Repeat entire report for each parent record | One report per shift |
{{nested_items_0_fuel}} | Repeat row for each fuel entry | Fuel consumption rows |
{{nested_items_0_personnel}} | Repeat row for each person | Personnel list rows |
{{nested_items_0_materials}} | Repeat row for each material | Materials used rows |
4. TypeFlow Variables
Built-in variables for dynamic content.
| Variable | Description | Example Output |
|---|---|---|
{{Today}} | Today's date | 2026-02-03 |
{{page_number}} | Current page number | 1 |
{{total_pages}} | Total page count | 5 |
Manual Mapping
If you prefer to use your own variable names instead of the Fields Panel syntax, you can do so. You'll just need to map each variable yourself.
How It Works
- Write any variable name in your template (e.g.,
{{client_name}},{{total}},{{my_field}}) - Go to the Mapping tab in your flow
- Connect each variable to the corresponding field in your database
Example
| Your variable | Maps to (in Airtable/Softr) |
|---|---|
{{client_name}} | First Name |
{{client_email}} | |
{{invoice_total}} | Total Amount |
Variable Name Rules
| Rule | Example |
|---|---|
| Use double curly braces | {{Field}} not {Field} |
| No spaces at the start/end | {{Name}} not {{ Name }} |
| Any name works | {{x}}, {{my-field}}, {{Client Name}} |
Note: With manual mapping, you don't get auto-mapping - you must configure each variable in the Mapping tab.
FAQ
Do I have to use the Fields Panel?
No. The Fields Panel gives you auto-mapping (no configuration needed), but you can use your own variable names if you prefer. You'll just need to map each variable manually in the Mapping tab.
What happens if a field is empty?
The variable is replaced with an empty string. Your document won't show {{Field}} - it will simply be blank in that spot.
Are variable names case-sensitive?
Yes. {{Name}} and {{name}} are different. Use the exact case as shown in your database.
Can I format numbers and dates?
Yes, but formatting depends on your Airtable/Softr field configuration. TypeFlow uses the value as stored in your database.
What if I rename a field in my database?
You'll need to update the variable in your template to match the new name. The Fields Panel will show the updated name automatically.
Can I use variables in Google Slides?
Yes! The same syntax works in Google Slides templates.
Related Articles
- Line Items - Generate tables with dynamic rows from linked records
- Nested Line Items - Multi-level line items for complex documents
- Linked Records - Access any field from linked records
Need More Help?
- Email: support@typeflow.us
- Chat: Click the chat icon in the app