---
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 can pass one text value, `input`. The selected **Workflow** runs in the background with `{ input: "..." }` as its starting data, and what it produces goes back to the model as text:

* A lambda workflow returns what its [Lambda Output](/nodes/builtin/lambda/lambdaoutput/) node 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.

## 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.