Overview
Every Flow has Input and Output nodes that define its interface—what data it accepts and what it returns. These nodes are the contract between your Flow and the outside world.Input Nodes
The Input node is the entry point for data into your Flow.Structure
Green node on the left side of the Canvas with:- Name: Usually “Input” (can be customized)
- Schema: Defines expected data structure
- Output ports: Send data to downstream nodes
Defining the input schema
- Select the Input node
- Go to Properties → Input/Output
- Define fields:
- Field name
- Data type
- Required vs. optional
- Default value
- Description
Data types
Supported types:Type | Description | Example |
---|---|---|
string | Text | "Hello" |
number | Integer or float | 42 , 3.14 |
boolean | True or false | true , false |
array | List of items | [1, 2, 3] |
object | Nested structure | {"key": "value"} |
enum | Limited options | "small" from ["small", "medium", "large"] |
any | Any type | Flexible but less safe |
Required vs. optional fields
Required fields:- Must be present in input
- Execution fails if missing
- Use for essential data
- Can be omitted
- Can have default values
- Use for configuration or preferences
Default values
Set defaults for optional fields:- Simpler API for consumers
- Backward compatibility when adding new fields
- Clear default behavior
Validation rules
Add validation beyond just types: String validation:- Min/max length
- Regex pattern
- Format (email, URL, UUID, etc.)
- Min/max value
- Integer only
- Positive only
- Min/max items
- Unique items only
- Item type
Multiple Input nodes
Most Flows have one Input node, but you can have multiple for different entry points: Use cases:- Different trigger types (webhook, schedule, manual)
- Different input formats (JSON, form data, file upload)
- Different access levels (admin vs. user)
Output Nodes
The Output node is the exit point for data from your Flow.Structure
Orange node on the right side of the Canvas with:- Name: Usually “Output” (can be customized)
- Schema: Defines returned data structure
- Input ports: Receive data from upstream nodes
Defining the output schema
- Select the Output node
- Go to Properties → Input/Output
- Define fields (same process as Input)
Output mapping
Map internal data to output schema: Scenario:- Processing returns
{ "processed_data": [...], "count": 10 }
- Output expects
{ "result": object, "item_count": number }
- Click connection to Output node
- Properties → Field Mapping
- Map:
processed_data
→result
count
→item_count
Multiple Output nodes
Flows can have multiple outputs for different outcomes: Common pattern:- Type-safe error handling
- Clear success vs. failure contracts
- Easier debugging
Partial outputs
Some Flows stream or emit data progressively: Use case: Processing a large list- Enable “Allow partial outputs” in Output node settings
- Define partial output schema
- Connect processing node to Output with “partial” flag
I/O best practices
Be explicit — Clear schemas prevent integration errors
Validate early — Check input immediately after Input node
Document fields — Descriptions help users understand the API
Version schemas — When changing, maintain backward compatibility
Use specific types — Avoid any
unless truly necessary
Provide examples — Sample input/output helps users
Common I/O patterns
Pattern 1: Simple transformation
Input:Pattern 2: Batch processing
Input:Pattern 3: Configuration with data
Input:Pattern 4: Status + details
Output:Testing I/O
Test Input
- Select the Flow (or Input node)
- Go to Properties → Execute
- Provide test payload matching input schema
- Click Execute
- View output
Validate schema
Triform validates input against schema automatically: Valid input: Execution proceedsInvalid input: Execution fails with validation error Common validation errors:
- Missing required field
- Wrong type (string instead of number)
- Value out of range
- Invalid enum value
- Malformed email/URL
Edge case testing
Test with:- Empty input:
{}
or[]
- Minimal input: Only required fields
- Maximum input: All optional fields, large values
- Invalid input: Wrong types, missing fields
- Boundary values: Min/max numbers, empty strings
Documenting I/O
In Triform
- Add descriptions to each field
- Provide examples in the Input/Output panel
- Use clear, consistent naming
For external users
When exposing as API:- Generate docs from schema (Triform can do this)
- Include:
- Field descriptions
- Example request/response
- Error codes and meanings
- Rate limits and quotas