Flow Studio
Input Mapping
How the parent workflow passes data to the child via inputMap — expression evaluation, the child's $json trigger object, and mapping best practices.
How inputMap Works
The inputMap is a dictionary where:
- Key = the field name in the child's trigger
$jsonobject - Value = an expression evaluated in the parent's context
The executor evaluates all expressions using the parent's $output, $json, and $context variables, then constructs the child's trigger JSON from the result.
Example
{
"inputMap": {
"employeeId": "$output.fetchEmployee.employeeId",
"requestAmount": "$output.parseRequest.amount",
"currency": "$output.parseRequest.currency",
"requestedBy": "$context.actorId",
"submittedAt": "new Date().toISOString()",
"notes": "$output.parseRequest.notes ?? ''"
}
}
This produces a child trigger payload like:
{
"employeeId": "emp-001",
"requestAmount": 2500.00,
"currency": "USD",
"requestedBy": "user-alice",
"submittedAt": "2026-05-25T10:00:00Z",
"notes": "Urgent travel expense"
}
Inside the child workflow, all these fields are accessible as $json.employeeId, $json.requestAmount, etc.
Expression Types in inputMap Values
| Expression | Result |
|---|---|
$output.nodeId.field | Field from parent node output |
$json.field | Field from parent's own trigger data |
$context.actorId | The user who triggered the parent |
"literal string" | Static string value |
42 | Static number |
$output.nodeId.list.map(x => x.id) | Transformed array |
Validation
If an inputMap expression references a node that has not yet executed (or was skipped), its value is null. This null propagates into the child's $json unless you provide a fallback:
// Null-safe with fallback
"$output.optionalStep?.result ?? 'default-value'"
Child contract: The child workflow should document its expected
$json fields (like a function signature). The inputMap in the parent is the caller's responsibility to satisfy this contract. Mismatched field names cause silent nulls in the child — not validation errors.