---
title: Workflow as Tool
description: Expose another workflow as a callable tool.
---

Turn one of your workflows into a tool an AI agent can call, so the agent can hand off a sub-task you already built.

## What it does

Workflow as Tool is a tool for an agent, not a step in the flow. It has no output port: you connect it to the **Tools** slot of a [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/).

The agent sees a tool with your **Tool Name** and **Tool Description**. When it calls it, it passes values to the selected **Workflow**, which runs in the background, and what the workflow produces goes back to the model as text:

* **Version 2** (new steps): list up to 10 **Arguments**, each with a name, a type (text, number, yes/no or JSON), a description the model reads, and whether it's required. The agent passes them by name; the workflow receives them as its starting data, for example `{ "email": "…", "limit": 5 }`.
* **Steps saved before 0.9** pass one text value, `input`: the workflow starts with `{ input: "..." }`. **Update** in the step's header moves to typed arguments.

The run then works like this:

* A [reusable workflow](/nodes/builtin/lambda/lambdaworkflow/) returns what its [Return to caller](/nodes/builtin/lambda/lambdaoutput/) step produced.
* A workflow that starts with a trigger returns the output of its last steps (the ones that feed nothing else). With several last steps, their outputs are grouped by node label.
* If a step fails, the agent is told which step and why.
* A workflow that pauses for an approval or a wait can't finish inside a tool call: the pause is dropped and the agent is told.
* **Stop** stops the called workflow too: it stops between steps, its running step is cancelled, and its run is recorded as canceled.

**Ask before running** decides when you are asked before the workflow runs: **When it can send, delete or pay** (only if the workflow, or one it calls, sends messages, deletes data or makes payments), **Always** or **Never**. Without a choice, interactive runs ask when it can send, delete or pay. The setting is cleared when you publish the workflow.

The three choices are cards. The recommended one says why for the workflow you picked (*Recommended. Asks here, because Send invoice sends messages and pays.*, or *… doesn't send, delete or pay, so it runs without asking.*). Under them, **What Send invoice can do** lists what AWFlow found in the workflow, including the workflows it calls (*Sends messages · Gmail*, *Pays · Stripe*). **Never** on a workflow that can act shows an amber note: it runs without asking, and the run log notes every call made this way. On a schedule or a background trigger nobody can answer live: a call that needs your ok waits in [Runs](/app/workflows/run-history/#runs-that-need-you) until you answer. When the agent asks, the approval card says why (*Asked because of "Always"*).

## When to use it

* You already have a workflow that does one job well (look up a customer, format a report, save a note) and want an agent to use it when needed.
* The job needs several fixed steps that would be unreliable to leave to the model.
* You want to give an agent many abilities, each as its own small workflow, connected as separate tools.

## Inputs and settings

* **Workflow**: the picker allows several, but only the first one is used.
* **Tool Name**: short, with underscores, saying what it does, for example `lookup_customer`. Give each Workflow as Tool node on the same agent a different name.
* **Tool Description**: the model decides when to call the tool from this text, so say what it does and what to pass as `input`, for example "Looks up a customer by email address. Pass the email as input."
* In a lambda workflow, add a field named `input` to its [Lambda Input](/nodes/builtin/lambda/lambdainput/) node to receive the value.

## Outputs

This node has no output port. It plugs into a slot on another node instead of passing items along.

* **Tools** slot of [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/)

The workflow's result goes back to the model, not to the next node. The agent's `steps` output lists each call, and its `response` holds the final answer.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

The called workflow uses its own nodes' credentials.

## Example workflow

1. Build a lambda workflow "Lookup customer": a [Lambda Input](/nodes/builtin/lambda/lambdainput/) with an `input` field, an [Http Request](/nodes/builtin/core/http-request/) to your CRM using `{{ $input.input }}`, and a [Lambda Output](/nodes/builtin/lambda/lambdaoutput/).
2. In another workflow, add Workflow as Tool with **Workflow** "Lookup customer", **Tool Name** `lookup_customer` and **Tool Description** `Looks up a customer by email. Pass the email as input.`
3. Connect it to the **Tools** slot of a [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/) with **Prompt** `Summarise the account of {{ $input.text }}`, a [Chat OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/) model in **Model**, fed by [Get Selected Text](/nodes/extension/getselectedtext/) with **Output field name** `text`.
4. [Display Markdown](/nodes/extension/displaymarkdown/) shows `{{ $input.response }}`.

## Common issues

* **"No workflow selected for this tool."** Pick a workflow in **Workflow**.
* **"The workflow paused (for an approval or a wait) and cannot finish inside this call."** The called workflow contains a step that waits for a person or a timer. Remove it from that workflow, or call it outside the agent.
* **The agent is told a step failed, for example `"Http Request" failed: ...`.** Open the called workflow and fix that step; run it on its own first.
* **The agent never calls the tool.** Make **Tool Description** clearer about when to use it, and mention the tool in the agent's **Prompt**.

## Related nodes

* [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/): the agent this tool plugs into.
* [Lambda Input](/nodes/builtin/lambda/lambdainput/) and [Lambda Output](/nodes/builtin/lambda/lambdaoutput/): define what a lambda workflow receives and returns.
* [MCP Client Tool](/nodes/builtin/ai/aidependencies/tools/mcp-client/): tools from a remote server instead of your own workflows.