Skip to main content

Core Tasks

Control flow primitives for orchestrating workflow execution order.

core.print

Display Name: Print

Log a message to the workflow output. Useful for debugging templates and verifying data between steps.

Parameters

NameTypeRequiredDescription
messagestringYesThe message to print. Supports template expressions.

Output

NameTypeDescription
datastringThe printed message.

core.wait

Display Name: Wait

Pause workflow execution for a specified duration before continuing to the next task.

Parameters

NameTypeRequiredDescription
durationstringYesDuration to wait. Uses Go duration format: 10s, 5m, 1h, 2h30m.

Output

NameTypeDescription
messagestringConfirmation message.
durationstringThe duration that was waited.

core.approval

Display Name: Approval

Pause the workflow and wait for a human to approve or reject before continuing. Optionally sends a notification via Slack or email to prompt the approver.

Parameters

NameTypeRequiredDescription
messagestringYesThe message shown to the approver explaining what they are approving.
approval_typestringNoChannel to send the approval request. Options: instant_message, email.
im_providerstringNoIM provider (required when approval_type is instant_message). Options: slack.
im_channelstringNoChannel ID to send the approval request to (required when approval_type is instant_message).
im_team_idstringNoTeam ID (applicable for MS Teams).
approval_optionsarrayNoCustom approval button labels. Default: ["approve", "reject"].

Output

NameTypeDescription
statusstringApproval result — matches one of the approval_options values (e.g., approve, reject).
approverstringIdentifier of the person who responded.
commentsstringOptional comments left by the approver.

core.switch

Display Name: Switch

Conditional branching — evaluate a template expression and route execution to the matching case. Works like an if/else or switch statement.

Parameters

NameTypeRequiredDescription
expressionstringYesTemplate expression to evaluate. The result is matched against case values. Example: {{ Inputs.env }}
casesarrayNoList of cases, each with value (string to match) and next (task ID to execute).
default_nextstringNoTask ID to execute if no case matches.

Output

NameTypeDescription
selected_casestringThe matched case value, or "default" if no case matched.

core.foreach

Display Name: For Each

Iterate over a list and execute a set of tasks for each item. Supports parallel execution with configurable concurrency.

Parameters

NameTypeRequiredDescription
itemsanyYesList of items to iterate over. Can be a JSON array or template expression that resolves to an array.
tasksarrayYesList of task definitions to execute for each item in the loop.
itemstringNoVariable name for the current item inside the loop. Default: "item". Access via {{ Vars.item }}.
concurrencyintegerNoMax parallel iterations. 0 or 1 = sequential. >1 = run N iterations in parallel. Default: 1.
outputobjectNoMap of output names to extract from each iteration's result.

Output

NameTypeDescription
resultsarrayList of outputs from each iteration.

core.group

Display Name: Group

Execute multiple tasks together as a single logical step. Tasks within the group run as a child workflow.

Parameters

NameTypeRequiredDescription
tasksarrayYesList of task definitions to execute in the group.

Output

NameTypeDescription
workflow_idstringChild workflow ID.
run_idstringChild workflow run ID.

core.call-workflow

Display Name: Call Workflow

Execute another workflow by name as a child workflow and return its result. Useful for composing reusable workflow modules.

Parameters

NameTypeRequiredDescription
workflow_namestringYesName of the workflow to execute.
inputsobjectNoInput parameters to pass to the child workflow.

Output

NameTypeDescription
workflow_idstringID of the executed child workflow.
run_idstringRun ID of the child workflow execution.
outputobjectFinal output of the child workflow.