Data Sources
Comprehensive guide to managing collections, linking Airtable bases, configuring primitive and relational schema fields, and previewing dynamic outputs.
The Data Sources panel (accessed via the database icon on the left sidebar) is where you define document schemas, manage preview records, and connect external data providers.
Creating & Connecting Collections
You can populate your workspace with data using two primary methods:
- Manual Collections (
+ Add): Create standalone schema tables and populate mock rows directly inside the editor table view. - Airtable Sync (
Connect to Airtable): Link directly to an external Airtable base to import existing tables and field structures. For full configuration details, see the Airtable Integration Guide.
Root Collection & Document Generation
The first collection created or connected in your project automatically acts as the Root Collection. You can also manually set this.
Key Rules & Capabilities
- 1 Record = 1 Document: Each row in the root collection represents an individual output document instance (e.g., a single invoice, employee badge, or customized report).
- Preview Column: The root collection includes a dedicated Preview column featuring a Generate button for every row, allowing you to instantly test and render PDF outputs for specific records.
- Preview Limits: You can store up to 10 records per collection to test dynamic logic, layout tables, and variables directly on the canvas surface.
Field Types & Schema Configuration
Click the + icon in the table header to open the Create Field modal and add custom columns to a collection.
Standard Field Types
- Text: Standard string entries.
- Number: Numeric values (integers, floats, currency).
- Boolean: True or false states.
- Date: ISO timestamps and date strings.
JSON Fields (Primitive Arrays & Complex Objects)
When selecting the JSON field type, you can define whether the column stores complex objects or validated scalar arrays:
- Not Primitive: Accepts standard nested JSON objects or unconstrained complex structures.
- Primitive Arrays: Restricts and formats array elements to uniform scalar data types:
String(e.g.,["express", "priority", "fragile"])Number(e.g.,[19.99, 5.50, 42.00])Boolean(e.g.,[true, false, true])Date(e.g.,["2026-01-01", "2026-06-01"])
Relation Fields (Linking Collections)
The Relation field type establishes relational foreign-key links between different collections or data sources.
Relation Settings
- Target Collection: Select the foreign collection to establish a connection with.
- Target Field: Choose the primary lookup field in the destination table.
- Cardinality: Determines how the linked data structure resolves during execution:
- To-One: Resolves to a single Object (
{ ... }). - To-Many: Resolves to an Array of Objects (
[{ ... }, { ... }]).
- To-One: Resolves to a single Object (
Schema & Payload Examples
Example 1: To-One Relation (Resolves to Object)
Linking a user record to a single company profile.
{
"id": "rec6607zl9YkWqUMI48",
"name": "Sarah Connor",
"company": {
"company_name": "Cyberdyne Systems",
"account_tier": "Enterprise"
}
}- Canvas Variable Usage:
{{name}}and{{company.company_name}}
Example 2: To-Many Relation (Resolves to Array of Objects)
Linking an invoice root collection to multiple items.
{
"invoice_number": "INV-2026-088",
"client": "Acme Corp",
"items": [
{ "sku": "ITEM-1", "description": "Consulting Hours", "amount": 150.00 },
{ "sku": "ITEM-2", "description": "Software License", "amount": 499.00 }
]
}- Canvas Variable Usage:
{{invoice_number}}at root level, and{{description}}/{{amount}}inside a Collection Block looping overitems.
Example 3: Primitive Array JSON Field
A product item storing tag labels as a scalar string array.
{
"product_name": "Ergonomic Desk Chair",
"price": 299.99,
"categories": ["Furniture", "Office", "In-Stock"]
}- Canvas Variable Usage: Iterate over
categoriesusing a Collection Block to output tag pills.