> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

Workflows enable you to build durable, multi-step automations that coordinate agents, APIs, integrations, human approvals, and business logic across systems. Use workflows to automate business processes that span multiple systems or require structured orchestration beyond a single agent conversation.

You can build deterministic workflows using structured workflow steps or create semi-autonomous workflows by adding Agent nodes that support AI-driven reasoning and decision-making during workflow execution.

Typical workflow use cases include:

* Order processing
* Leave approval workflows
* Claims and underwriting processes
* Human approval tasks

## Key features

* Durable multi-step workflow orchestration across agents, integrations, APIs, and human tasks.
* Visual workflow builder with configurable workflow nodes and execution paths.
* Human-in-the-loop execution using Human task nodes with Inbox-based task handling.
* Trigger-based execution using webhooks, schedules, and external application events.
* Workflow execution monitoring with execution history, flow logs, runtime metrics, and execution details inspection.

> [!NOTE]
>
> The platform maintains a one-to-one mapping between the visual configuration interface and the DSL/ABL definition. You can configure workflows and tools using either the visual interface or the DSL/ABL definition. Changes made in one view are automatically reflected in the other.

***

## Understand workflows versus agent flows

Use workflows and agent flows for different execution scenarios.

| Use case | Recommended capability |
| - | - |
| Interaction-level deterministic steps during a conversation | Agent Flow |
| Long-running orchestration outside the interaction boundary | Workflow |
| Human approvals or asynchronous waits | Workflow |
| Scheduled or event-driven execution | Workflow |
| Multi-system backend automation | Workflow |
| Agent-triggered orchestration | Workflow |
| Conversational interactions with deterministic execution steps | Agent Flow |

A workflow can also be exposed as a tool and invoked by an agent during runtime.

***

## Create a workflow

1. From the Workflows page, select **Create Workflow**.
2. In the creation dialog, enter **Name** and **Description** (optional).
3. Select **Create**.

After you create a workflow, the workflow opens in the **Overview** tab.

***

### Workflow overview page

The Overview page provides a summary of the workflow, including its structure, execution metrics, trigger configuration, version history, and dependencies. Use this page to quickly review the workflow status and access key information without opening the Flow editor.

| Section | Description |
| - | - |
| **Workflow visualization** | Displays a visual representation of the workflow, allowing you to review the workflow structure at a glance. |
| **Monitor** | Displays workflow execution metrics, including the total number of runs, in-progress workflows, response time, and failure rate. |
| **Triggers** | Displays the configured triggers for the workflow and their current status. |
| **Versions** | Lists the available workflow versions, publication information, and deployment status. |
| **Used by** | Lists the agents or tools that reference the workflow. |
| **Workflow details** | Displays workflow metadata, including the creation date and last modified date. |

![Workflow](https://mintcdn.com/koreai/LB1Wchm-3xKSCQyX/agent-platform/images/workflow-overview.png?fit=max\&auto=format\&n=LB1Wchm-3xKSCQyX\&q=85\&s=154a92c5b79b1a9f0327b41c71ea6d17)

***

### Flow builder

Use the **Flow** tab to build and configure workflow steps.

The workflow builder provides a visual canvas where you can add workflow nodes, configure execution logic, and define step relationships.

Every workflow starts with a **Start** step and ends with an **End** step. Add workflow steps between the Start and End steps to define workflow execution logic.

The workflow builder contains the following areas.

| Area | Description |
| - | - |
| Node panel | Displays available workflow nodes grouped by category. |
| Flow canvas | Add workflow structure and execution path. |
| Configuration panel | Displays configuration options for the selected workflow step. |

![Workflow](https://mintcdn.com/koreai/hflecHc-J8GkznKe/agent-platform/images/workflows.png?fit=max\&auto=format\&n=hflecHc-J8GkznKe\&q=85\&s=b5cb1c342ee279b8cec29f027e75ae49)

### Add workflow steps

To add a workflow step:

1. Open the **Flow** tab.
2. Select a node from the node panel. The node appears on the flow canvas.
3. Configure the node settings.
4. Connect the node to the workflow path.

### Configure workflow steps

Select a workflow step to open its configuration panel.

Configuration options vary by node type. Typical configuration options include:

* Step name
* Input parameters
* Output mappings
* Timeout settings
* Approval assignments
* Integration settings
* Conditional expressions

### Build workflow logic

Connect nodes visually on the canvas to define execution order.

Workflows support:

* Sequential execution: one node runs after another.
* Conditional branching: a [Condition node](#condition-node) routes to different next nodes.
* Concurrent execution: nodes connected from the same parent node run at the same time.

Nodes connected from the same parent node run concurrently. For example, two Tool nodes that both connect directly from the Start node start at the same time. A node with several incoming connections waits for all of them to finish before it runs.

```yaml theme={null}
Start ─┬─► Get_Profile ─────────────────-─────┐
       └─► Get_Orders ─► Get_Delivery_Status ─┴─► End
```

In this example, `Get_Profile` and `Get_Orders` both run as soon as the workflow starts. `Get_Delivery_Status` needs the order ID that `Get_Orders` returns, so it waits for `Get_Orders` and runs only after it finishes. `End` has two incoming connections (`Get_Profile` and `Get_Delivery_Status`), so it waits for both to finish before it runs.

Model independent calls as separate branches from the same parent node to run them concurrently. Model a dependent call as a node downstream of the call it needs. Use each node's Test Action to confirm the exact output path before wiring the next node to it.

A workflow's branches always run in the connections you draw, every run. This is different from a reasoning agent's own tool calls, where the model chooses what to request at each step. See [Concurrent tool execution](https://koreai.mintlify.site/agent-platform/abl/reference/tools.md#concurrent-tool-execution) for how that works and when to use it instead of a workflow.

### Use workflow variables

Each node exposes configurable inputs and outputs. Workflow data is passed through the workflow context object.

Use the following syntax patterns to reference workflow data between steps.

| Variable type | Syntax |
| - | - |
| Input variable | `context.steps.start.<variableName>` |
| Step output | `context.steps.<stepName>.output` |

### Use forms in workflows

You can use reusable forms to collect structured information during workflow execution. Create and manage forms under **Resources > Forms**, then use them in [Human task nodes](#human-task-node) or as [Intake form triggers](https://koreai.mintlify.site/agent-platform/workflows.md#intake-form-trigger).

For information about creating and configuring reusable forms, see [Forms](https://koreai.mintlify.site/agent-platform/forms).

***

## Node types

| Node type | Group | Description |
| - | - | - |
| [Agent](#agent-node) | Agent | Executes an agent within the workflow to handle part of the process. |
| [Tool](#tool-node) | Tools | Executes a configured tool within the workflow (HTTP call, code execution). |
| [Function](#function-node) | Actions | Executes custom JavaScript logic for data transformation or processing. |
| [Integration](#integration-node) | Actions | Executes actions using configured integrations and external services. |
| [Human task](#human-task-node) | Human-in-the-loop | Pauses workflow execution and assigns a task to users for human intervention before continuing execution. |
| [Condition](#condition-node) | Flow control | Routes workflow execution based on conditions. |
| [Loop](#loop-node) | Flow control | Repeats a set of workflow steps for each item in an input array using sequential or parallel execution. |
| [Delay](#delay-node) | Flow control | Pauses workflow execution for a configured duration. |
| [End](#end-node) | Flow control | Completes workflow execution and defines workflow outputs. |

***

### Start node

Use the Start node to define the workflow input parameters. These parameters define the data that is passed to the workflow when it starts. You can define input parameters using either the parameter form or the JSON editor.

| Field | Description |
| - | - |
| Parameter name | Variable name used in context |
| Data type | String, number, boolean, object, or array |
| Item type | Displayed when Data type is set to Array. Specifies the type of items in the array: Any (JSON), String, Number, and Boolean. |
| Required | Marks parameter as mandatory |
| Default value | Optional fallback value |

Example

```yaml theme={null}
{{context.steps.start.input.email_text}}
```

***

### Agent node

Use the Agent node to invoke an agent during workflow execution.

Agent nodes are typically used when workflow execution requires AI-driven reasoning, classification, decision-making, or conversational processing before continuing to the next workflow step.

| Field | Description |
| - | - |
| Agents | Selects the agent to execute during workflow execution. |
| Create an agent | Opens the Agents page to create a new agent if no suitable agent exists. |
| Input | Defines the input passed to the agent. You can reference workflow variables and trigger payloads. |
| Session ID (optional) | Defines the session identifier used during execution. Leave blank to create a new session. |
| Timeout (seconds) | Defines how long the workflow waits for the agent response before timing out. |
| Attachments (optional) | Add attachment URLs or IDs to provide files to the agent. You can enter a single attachment URL or ID, an array of attachment URLs or IDs, or add them individually. Up to 10 attachments are supported per invocation. |
| On failure | Defines the behavior when agent execution fails. |

***

### Tool node

Use the Tool node to execute a registered tool during workflow execution.

Tool nodes are typically used to invoke reusable capabilities such as workflow tools, APIs, integrations, or external operations defined in the project.

| Field | Description |
| - | - |
| Create a tool | Opens the Tools page to create a new tool if no suitable tool exists. |
| Parameters | Defines the input parameters passed to the tool. Parameters can use static values or workflow expressions. |
| Timeout (seconds) | Defines how long the workflow waits for tool execution before timing out. |
| On failure | Defines the behavior when tool execution fails. |

> [!NOTE]
>
> The timeout configured for a Tool node in a workflow overrides the timeout specified in the tool configuration.

***

### Function node

Use the Function node to execute custom JavaScript logic during workflow execution.

Function nodes are typically used for data transformation, validation, formatting, filtering, enrichment, and intermediate processing between workflow steps.

| Field | Description |
| - | - |
| Context object | Use the `context` object to read and write workflow data within Function nodes. |
| JavaScript | Defines the JavaScript logic executed during workflow execution. |
| Timeout (seconds) | Defines how long the workflow waits for script execution before timing out. |
| On failure | Defines the behavior when function execution fails. |

**Use Workflow Context in Function Nodes**

Use the `context` object to access workflow data.

| Usage | Syntax |
| - | - |
| Trigger payload | `context.trigger.payload` |
| Previous step output | `context.steps.<stepName>.output` |
| Write workflow values | `context.<variableName> = value` |

Values written to the context object can be referenced in downstream workflow steps.

***

### Integration node

Use the Integration node to execute integration connector actions during workflow execution.

Integration nodes allow workflows to execute actions using configured integrations such as Gmail, Slack, GitHub, Microsoft Teams, Salesforce, HubSpot, Twilio, OpenAI, and other available connectors. For a list of available integrations, see [Integrations](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md).

| Field | Description |
| - | - |
| Select Integration & Action | Opens the integration catalog and available actions for the selected connector. |
| Action Inputs | Configure the action-specific input fields. Available fields vary based on the selected integration action. |
| On failure | Defines the behavior when integration execution fails. |

For example, a Gmail integration may expose actions such as send or forward email, request approval in email, reply to email, and custom API calls.

Depending on the selected action, additional fields can include:

* Connection selection
* Recipient email addresses
* Subject and message content
* Approval request settings
* Search parameters
* API request details

If no integration connection exists, create an **auth profile** and **integration connection** before you configure the integration action.

***

### Human task node

The Human task node pauses workflow execution and assigns tasks to users for human intervention. The task can include a form that the assignee completes before the workflow continues.

Assigned users can open tasks in Inbox to review the task, provide the requested information, or complete the configured task action. For more information, see [Inbox](https://koreai.mintlify.site/agent-platform/inbox.md).

When a workflow reaches a Human task node:

* A pending task is created in the Inbox.
* Assigned users receive notifications.
* Workflow execution pauses until the task is completed.
* The workflow resumes after the task is completed.

The Human task node supports two ways to collect information from the assignee:

* **Forms** — Select a reusable form created under **Resources > Forms**. For information about creating and configuring forms, see [Forms](https://koreai.mintlify.site/agent-platform/forms).
* **Inline fields** — Define simple fields directly in the Human task node.

**Task**

Use the Task tab in the Human task node to define the task request, specify how the assignee provides information, and define the outcomes available for completing the task.

| **Setting** | **Description** |
| :- | :- |
| **Subject** | Specify the subject of the task request. |
| **Message** | Provide instructions or context for the assignee. |
| **Form** | Select a form for the assignee to complete. Forms are created and managed under **Resources > Forms**. The fields defined in the form are presented to the assignee as part of the task. Values submitted by the assignee are available to subsequent workflow steps. |
| **Inline fields** | Use inline fields when the task requires additional inputs that can be defined directly in the node instead of adding them to a form. For each field, specify the field name, type, label, whether the field is required, and an optional default value. |
| **Outcomes** | Define the options that the assignee can select to indicate how the task was completed. The selected outcome is available to subsequent workflow steps. |

**Assignees & SLA**

Use the Assignees & SLA tab to define who can work on the task, how responses from multiple assignees are handled, and what happens as the task approaches or exceeds its completion deadline.

| **Field** | **Description** |
| :- | :- |
| **Assignment** | Choose **Direct** to assign the task to a fixed list of people, or **Conditional** to assign the task based on rules. For conditional assignment, the first matching rule determines the assignee; **Default assignees** receive the task if no rule matches. |
| **Consensus** | When multiple assignees are assigned, choose how their responses resolve the task. Available resolution modes are: • **First response wins:** The first assignee to submit resolves the task. • **Everyone assigned must submit:** The task is resolved after all assigned users submit. • **N of the assignees must submit:** Specify the required number of responses (**N**) before the task is resolved. You can also specify how the task is resolved when the required consensus cannot be reached. |
| **Timeout** | Enable a timeout and specify the **Duration** and **Unit** to define the task completion deadline. |
| **Reminders** | Add reminders to notify assignees before the deadline. Each reminder is triggered at a specified percentage of the deadline. You can also configure a tool to run when the reminder threshold is reached. |
| **Escalation ladder** | Add escalation steps to take action as the task approaches or exceeds its deadline. For each step, specify when to escalate and choose whether to **Loop in a person/group** or **Go directly to a node**. Escalation steps run in the configured order. |
| **On timeout** | Specify what happens when the task reaches its deadline without being resolved. |

**Options**

Use the Options tab to configure additional behavior for the Human task node, including external notifications, error handling, and analytics tags.

| **Setting** | **Description** |
| :- | :- |
| **External notifications** | Enable **Send notifications outside the inbox** to notify assignees through external channels. You can add one or more notification channels and configure each channel separately. Available channel options include Kore Email, Gmail Send Email, and Notify via Tool. For **email** channels, specify the message format and optionally override the default task, reminder, and escalation messages. For **Notify via Tool**, select how the tool runs and configure the tools to use when the task is created, a reminder is triggered, or an escalation occurs. |
| **Error handling** | Enable **On failure** to specify the node to execute when the Human task node fails. |
| **Analytics tags** | Add custom key-value dimensions to workflow metric events emitted when the task completes or fails. Values can reference the workflow context. |

***

### Condition node

Use the Condition node to branch workflow execution based on conditional logic.

Condition nodes evaluate expressions and route execution through different workflow paths depending on the evaluation result.

The Condition node supports `if`, `else`, and `else if`.

| Field | Description |
| - | - |
| Field | Defines the workflow variable or step output to evaluate. |
| Operator | Defines the comparison operator used in the condition. |
| Value | Defines the comparison value for the condition. |

The **Else (default path)** executes when none of the configured conditions evaluate to true. Use **Add Else If** to configure additional conditional branches.

Condition expressions can reference workflow variables and outputs from previous workflow steps. For example, `{{context.steps.NodeName.output.field}}`.

Use Condition nodes to:

* Route workflows based on API responses
* Branch execution based on approval outcomes
* Evaluate workflow variables
* Handle success and failure scenarios
* Create decision-based workflow paths

***

### Loop node

The Loop node repeats a set of workflow steps for each item in a list. Use it to automate repetitive tasks such as processing records, calling APIs, or performing batch operations. The Loop node supports both Sequential (Loop) and Parallel (Batch) execution modes.

Configure the nodes inside the loop, choose how to handle errors, and collect the results in an output variable for use by downstream nodes.

| Field | Description |
| - | - |
| **Execution Mode** | Specifies how loop iterations are executed. Select either **Sequential (Loop)** to process one item at a time or **Parallel (Batch)** to process multiple items concurrently. |
| **Source** | The input array that the Loop node processes. |
| **Item Alias** | The variable that represents the current item during each iteration. |
| **Output Variable** | Stores the aggregated results returned after all iterations complete. |

#### Sequential execution

Processes one item at a time. Each iteration completes before the next iteration begins.

Use this mode when:

* Processing items that depend on one another or must be executed in order.
* Each iteration depends on the result of the previous iteration.
* External systems require sequential processing.

| Field | Description |
| - | - |
| **Max Iterations** | Maximum number of iterations to execute. |
| **On Error** | Specifies whether to **Continue** processing the remaining iterations or **Terminate** the workflow when an iteration fails. |

#### Parallel execution

Processes multiple items simultaneously. Results are collected after all iterations complete.

Some use cases of this mode are:

* Iterations are independent.
* Processing large collections of items.
* Calling APIs or integrations that can run concurrently.

| Field | Description |
| - | - |
| **Concurrency Limit** | Maximum number of iterations that execute simultaneously. |
| **Stagger (ms)** | Delay, in milliseconds, between starting consecutive iterations. |
| **On Error** | Specifies whether to **Continue** processing the remaining iterations or **Terminate** the workflow when an iteration fails. |
| **Preserve Item Order** | Returns results in the same order as the input array. |

> [!TIP]
>
> Use a lower **Concurrency Limit** when calling external systems that enforce rate limits or concurrent request limits.

**Configure Iteration Output**

Use Iteration Output to map values from nodes inside the loop to the loop output. After the loop completes, the mapped values from all iterations are collected into the configured Output Variable, making them available to subsequent nodes in the workflow.

**Example**

Suppose an Integration node returns a list of customer IDs. Configure the Loop node to iterate through the list. During each iteration, invoke an API node to retrieve customer details, then use **Iteration Output** to capture the required values. After all iterations are complete, the aggregated customer details are stored in the configured output variable and passed to the next node in the workflow.

***

### Delay node

Use the Delay node to pause workflow execution for a specified duration before continuing to the next workflow step.

Delay nodes support scheduled continuation, wait periods, retry delays, and time-based workflow orchestration.

| Field | Description |
| - | - |
| Duration | Defines the amount of time the workflow waits before resuming execution. |
| Unit | Defines the duration unit. |
| On failure | Defines the workflow step to execute if the delay step fails. |

The workflow engine accepts delays from 0 to 7 days. Studio’s 5-second to 24-hour validation advisory does not prevent saving or running delays outside that range.

Some use cases of Delay node are:

* Pause workflows before continuing execution
* Add retry wait periods
* Delay notifications or follow-up actions
* Coordinate scheduled workflow execution

***

### End node

Use the End node to complete workflow execution and define the workflow output structure. You can define output mappings using either the parameter form or the JSON editor.

The End node declares the workflow outputs returned after workflow execution completes.

| Field | Description |
| - | - |
| Output field | Defines the output field name exposed by the workflow. |
| Type | Defines the output data type. |
| Expression | Maps workflow variables or step outputs to the output field. |
| Description | Defines the output field description. |
| Add output mapping | Adds additional workflow output mappings. |

Output expressions can reference workflow variables and outputs from previous workflow steps. For example, `{{context.steps.NodeName.output}}`

The End node generates the final workflow response returned after workflow execution completes.

***

## Export and import workflows

You can export an individual workflow and import it into another project as an editable draft, making it easier to reuse or migrate workflows between projects.

### Export a workflow

1. Open the workflow you want to export.
2. Click **Export**.
3. The workflow is downloaded as a `.workflow.json` file.

The workflow export includes the workflow definition and references to dependent components, such as agents, tools, and auth profiles. These dependent components are not exported with the workflow.
Configuration variable references, including references to secret variables, are included as dependencies in the exported workflow. Configuration variable values are not exported. Hard-coded secret values in node configurations are not exported and can prevent the workflow from being exported.

> [!NOTE]
>
> Workflow trigger definitions are not included in workflow exports. You must configure triggers manually after importing the workflow.

### Import a workflow

1. From the Workflows page, click **Import**.
2. Click **Choose file** and select the workflow export file.
3. In the Import Workflow dialog, enter a name for the workflow, and click **Preview**.
4. Review the workflow details and dependencies. Missing dependencies are identified in the preview.
5. If dependencies are missing, resolve them or select **Import with unresolved dependencies unselected** to continue without resolving them.
6. Click **Import**.

The imported workflow is created as an editable draft. Unresolved dependencies must be manually relinked before you run or publish the workflow.

If a referenced configuration variable is missing from the target project, the import can still proceed. The missing configuration variable is flagged as an unresolved dependency and must be configured before you run or publish the workflow.

***

## Execute and inspect workflows

After configuring workflow nodes and triggers, run the workflow to validate workflow behavior and inspect execution details.

### Run a workflow

1. Open the workflow.
2. Go to the **Flow** tab.
3. Click **Run**.
4. In the Run Workflow dialog, review the **Config Variables Version** and select the **Environment Variables** environment. Enter the required request (string), then click **Run**.

During execution:

* Workflow execution status is displayed.
* Human workflow nodes pause execution until user action is completed.

### Execution details panel

When a workflow runs, the execution details panel opens on the right side of the canvas. It displays:

* Execution status
* Execution duration
* Flow log
* Node inputs and outputs
* Context data
* Final workflow output

Select nodes from the execution flow to inspect execution details for individual workflow steps.

***

## Configure triggers

Triggers define how workflows are started.

Open the **Triggers** tab from the workflow toolbar to create and manage workflow triggers.

The workflow builder currently supports the following trigger types:

| Trigger type | Description |
| - | - |
| **Webhook** | Starts workflows through external HTTP requests. |
| **Cron schedule** | Runs workflows automatically on a schedule. |
| **App triggers** | Starts workflows when an event occurs in a supported external application. |
| **Intake form** | Starts a workflow when a user submits a form. |
| **After session ends** | Starts a workflow when a user session ends, with optional session filters. |
| **After an unsuccessful call** | Starts a workflow when a campaign call is unsuccessful on the final attempt, with optional filters. |

### Webhook trigger

Use webhook triggers to invoke workflows from external systems, applications, or APIs.

When a webhook trigger is created:

* A webhook endpoint URL is automatically generated.
* You can generate an API key for secure access.
* Quick-start request examples are displayed for testing and integration.

**Webhook execution modes**

| Mode | Description |
| - | - |
| **Sync** | Waits for the workflow response. |
| **Async + Poll** | External system polls for results. |
| **Async Push** | Workflow returns results through a callback. |

**Configure request and response payloads**

You can customize the structure of webhook requests and responses. Select **Default** to use the standard webhook structure or **Custom** to define your own structure for either:

* **Request** — The payload received by the workflow.
* **Response** — The payload returned by the workflow.

### Cron schedule trigger

Use cron schedule triggers to automatically execute workflows on a defined schedule.

You can configure a schedule as **Daily**, **Weekly**, **Monthly**, **Once**, or **Custom cron**.

For custom cron schedules, you can specify a 5-field cron expression and timezone. You can also optionally limit when the schedule is active.

Typical use cases include: Daily processing jobs, Weekly reporting, Scheduled synchronization tasks, or Periodic maintenance workflows.

### App triggers

Use app triggers to start workflows when an event occurs in a supported external application.

To configure an app trigger:

1. Select **App triggers**.
2. Select an app from the list of supported applications.
3. Select the trigger event for the app.
4. Select an **Auth Profile**, if required.
5. Configure any additional fields or filters displayed for the selected trigger event.
6. Click **Create Trigger**.

The available configuration options depend on the selected app and trigger event.

### Intake form trigger

Use an Intake form trigger to start a workflow when a user submits a form.

| **Setting** | **Description** |
| :- | :- |
| **Trigger name** | Specify a name for the trigger. |
| **Form** | Select the form to use. |
| **Form version** | Select the form version to use. |
| **Who can submit** | Configure access by allowing anyone to submit the form or requiring Basic auth. When **Capture email** is enabled, the form collects the submitter's email address. |
| **Field mapping** | Submitted form values are available in the workflow as `{{context.trigger.form.<fieldName>}}`. |
| **Submit behavior** | Configure the submit button label and choose whether to display a message or redirect the user to a URL after submission. |
| **Link and publishing** | Configure the form path and environment aliases for development, staging, and production environments. The trigger provides a public URL for the form. |
| **Limit submissions** | Limit the number of submissions by specifying a submission cap. You can also specify when the form stops accepting submissions and the message displayed after the form closes. |

Each form submission starts a new workflow run.

### After session ends trigger

Use this trigger to start a workflow when a user session ends. You can optionally filter the sessions that trigger the workflow.

Configure the following options:

| Field | Description |
| - | - |
| **Agent** | Select one or more agents whose sessions can trigger the workflow. If no agents are selected, the trigger applies to sessions associated with any agent. |
| **Channel** | Selects the channel associated with the session. |
| **Terminal source** | Filters sessions based on the source that ended the session. |
| **Disposition** | Filters sessions based on the selected disposition. |
| **Verified users only** | Limits the trigger to sessions from verified users. |
| **Transcript window** | Specifies the transcript window to include when the workflow is triggered. |

### After an unsuccessful call trigger

Use this trigger to start a workflow when a campaign call is unsuccessful on the final attempt, such as when the call reaches voicemail or an answering machine.

You can optionally filter which calls trigger the workflow.

| **Field** | **Description** |
| :- | :- |
| **Campaign ID** | Filters calls based on the campaign ID. |
| **Dialer type** | Filters calls based on the dialer type, such as **Agentless**, **Preview**, **Progressive**, or **Predictive**. |
| **Disposition** | Filters calls based on the disposition, such as **Voicemail** or **Answering machine**. |

### Run a trigger manually

You can manually run a configured trigger from the **Triggers** page by clicking its **Run** icon. The options displayed depend on the trigger type. Enter any required input and click **Run now** to execute the trigger immediately.

***

## Monitor workflow execution

Use the **Monitor** tab to inspect workflow runs and troubleshoot execution.

The Monitor tab provides:

* **Run history** to review workflow executions and their outcomes.
* **Health metrics** to assess workflow performance and failures, including response time and failure rate.
* **Run details** to investigate an individual execution.

Select a run to view its details.

### Run details

The run details view provides a consolidated view of the execution, including its status, outcome, execution flow, and associated data.

| View | What you can inspect |
| - | - |
| **Summary** | Run metadata, workflow version, trigger, environment, status, and outcome. |
| **Flow log** | The execution flow and status of individual workflow steps, including their duration. |
| **Data** | Payloads, input, and output associated with the run. |

Use the **Summary** view to understand the overall result of a run, the **Flow log** to trace its execution, and the **Data** view to inspect the data processed by the workflow.

***

## Workflow versions

Workflows support version management through draft and published versions.

Each workflow starts with a draft version, which is used for editing and configuration changes.

When a workflow is published:

* A new workflow version is created.
* The published version becomes available for execution.
* The draft can continue to be updated independently.

Use the **Versions** tab to:

* View workflow versions.
* View version status and publishing details.
* Manage workflow versions.

The Versions view displays:

* Version number or draft state
* Workflow status
* Environment
* Publishing information
* Version actions

***

## Configure workflow settings

Use the **Settings** tab to manage workflow metadata, variable namespaces, and workflow deletion.

| Setting | Description |
| - | - |
| **Name** | The name of the workflow. |
| **Slug** | The unique identifier for the workflow. |
| **Description** | A description of the workflow. |
| **Variable namespaces** | Select the variable namespaces that the workflow can resolve in environment and configuration expressions. If no namespace is selected, the default namespace is used. |
| **Delete a workflow** | Permanently delete the workflow, including its versions and triggers. This action cannot be undone. |

***

## Attach workflows to agents

Workflows can be attached to agents as reusable tools. This allows agents to invoke durable workflows during runtime interactions.

Attached workflows allow agents to execute workflow logic during conversations and task execution.

### Register workflow as a tool

1. Go to **Tools > Workflow Tools.**
2. Click **Register Workflow**.
3. Configure the workflow tool settings.
4. Select the workflow and workflow version.
5. Select the trigger and execution mode (sync or async).
6. Click **Register Workflow**.

> [!NOTE]
>
> In `sync` mode, the agent waits for the workflow run to finish and gets the End node's output back as the tool result. In `async` mode, the tool call returns a handle right away and the workflow keeps running. See [Workflow binding properties](https://koreai.mintlify.site/agent-platform/abl/reference/tools.md#workflow-binding-properties) for the underlying `mode` and `timeout_ms` settings.

| Setting | Rule |
| - | - |
| Sync or async | Use sync when the user waits for the answer. Use async for long runs or a step done by a person. The runtime adds `check_workflow_status` for async tools. |
| Timeout | `timeout_ms` accepts up to 300,000. With no value, the runtime waits 60 seconds. Studio suggests 15,000. |
| Unknown outcome | Read the run in the workflow's **Monitor** tab before any retry. |
| Versions | A deployment runs the workflow version pinned at deploy time. After a change, publish the workflow again and redeploy. |
| Human steps | A Human Task waits in **Project** > **Operate** > **Inbox**. Call such workflows async. |

> [!NOTE]
>
> A normal business outcome, such as "not eligible", can reach an End node and complete without an error. The agent sees only the fields mapped under `output`. A failed, cancelled, or rejected run raises a tool error that the agent's `ON_ERROR` handler can catch. Branch on the mapped result for ordinary refusals. Use `ON_ERROR` for execution failures.

### Workflow tool definition

After a workflow is registered, it can be attached to agents as a workflow tool.

The platform automatically generates a DSL/ABL definition for the registered workflow tool. Workflow inputs are exposed as tool parameters in the generated definition.

The generated definition includes:

* Tool metadata
* Workflow and trigger identifiers
* Input parameters
* Tool description

Example:

```yaml theme={null}
TOOLS:
  sendemail(email_text: string) -> object
    description: "This tool will send an email using Google Gmail"
    type: workflow
```

The generated definition is available from the DSL editor and can be used together with visual agent configuration on the interface.

> [!NOTE]
>
> The platform maintains a one-to-one mapping between the visual configuration interface and the DSL/ABL definition. Changes made in one view are reflected in the other. The UI configuration is derived from the DSL definition. Changes made in the UI are reflected in the DSL, and changes made in the DSL are reflected in the UI.

### Attach workflow tools to agents

After registering the workflow tool:

1. Open the agent.
2. Go to **Capabilities** > **Tools**.
3. Attach the workflow tool.
4. Configure tool settings if required.
5. Configure required input collection under **Capabilities** > **Gather Fields**.
6. Save the agent.

The agent can now invoke the workflow during runtime.

### Understand gather and workflow inputs

Gather fields can be configured from: **Capabilities** > **Gather Fields**

Workflow tools can collect inputs using:

* Automatic parameter inference
* Gather fields

Automatic parameter inference allows the agent to infer required tool inputs from the conversation context.

Gather fields provide explicit input collection and validation for workflow tool parameters.

Use gather fields when you need:

* Structured prompting.
* Controlled input collection.
* Required field enforcement.
* Validation and extraction guidance.
* More deterministic workflow execution.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.