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. By default it waits for an approval in the execution view; it can also send the request to Slack, Microsoft Teams or email.

The wait counts against the step's timeout, like any other step. An Approval step has no separate approval timeout: it uses the step's Task Timeout, else the Automation Timeout (5 minutes by default), else 10 minutes. If nobody answers in that time, the step fails. The Automation Timeout also limits the whole run, so when approvers need more time, raise both the step's Task Timeout and the workflow's Automation Timeout.

Parameters​

NameTypeRequiredDescription
messagestringYesThe message shown to the approver explaining what they are approving.
approval_typestringNoWhere to send the request. in_app (default) sends nothing and waits for an approval in the execution view; instant_message; or email.
im_providerstringNoslack or ms_teams (required when approval_type is instant_message). Webhook-only chat integrations can't carry approvals.
im_channelstringNoChannel ID to send the approval request to (required when approval_type is instant_message).
im_team_idstringNoMicrosoft Teams team the channel is in (required for ms_teams).
message_thread_idstringNoPost the prompt into an existing thread, for example {{ Tasks['notify'].output.message_id }} from an earlier Send IM step. Empty posts top-level.
email_recipientsarrayNoEmail addresses (required when approval_type is email). Pick NudgeBee users or type any address. The email links to an approval page in NudgeBee.
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.
im_provider, im_channel, im_message_id, im_team_idstringWhere the chat prompt was posted (chat approvals only).

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 {{ LoopItem.item }}, or {{ LoopItem.<name> }} when you set a custom name.
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 inline, as part of the same workflow run.

Parameters​

NameTypeRequiredDescription
tasksarrayYesList of task definitions to execute in the group.

Output​

core.group runs its tasks inline and has no output of its own; read results from the tasks inside the group.


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.
workflow_versionintegerNoPin the call to a version number of the target workflow. Empty (or 0) always runs its current Live version.

Output​

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