How to use an app tool in a workflow
This guide shows you how to run a tool of an installed app in a workflow. It also shows you how to use the output of the tool in a later node. Before you start, an app with workflow tools must be installed on the project. Refer to How to install an app.
The examples use the Create Zoho lead tool of the Zoho CRM app. For the tools of the apps from Picked, refer to:
1. Find the name of the tool
- In the project switcher, choose Apps.
- Find the app on the tab Installed.
- Read
Workflow tools: <names>below the name of the app.
Each tool has the name app.<slug>.<tool>, such as app.zoho-crm.create_lead. The slug is
the slug of the installation in this project. Refer to
Tools in a project.
2. Add a tool node
- Open the workflow.
- Choose Add node.
- Choose Add tool.
- Choose the tool of the app.
In the editor, the name of a tool starts with the name of the app. For example, the editor
shows create_lead as Zoho CRM: Create Zoho lead.
3. Set the arguments
The inspector shows one field for each argument of the tool, with the label from the app.
- Enter a value in each required argument. The editor shows an error on a required argument that has no value.
- For an argument with a list of options, choose one of the options.
- Enter a value in each other argument that you need.
A value can be a template that reads the trigger or an earlier node. For example, set
Last name to {{ trigger.action.responses.lastName }}. Refer to
Workflow templates.
4. Use the output
A later node reads each output field of the tool as {{ nodes.<node-id>.<field> }}. For
example, {{ nodes.zoho.zohoLeadId }} is the ID of the Zoho lead that the node zoho made.
The reference page of each app gives the output fields of its tools.
5. Continue after a failure
The node fails when Picked cannot get to the app. It also fails when the app answers with an
error status, or with no output object. To continue the run after a failure:
- Connect the error exit of the node to a condition node.
- Test
{{ nodes.<node-id>.error.retryable }}in the condition. - Connect the
falseexit of the condition to the nodes that record the failure.
The error of the node has these fields:
| Field | Value |
|---|---|
code | app_unreachable when Picked cannot get to the app. app_tool_failed when the app answers. |
message | The node, the tool and the reason, such as the app answered 502. |
retryable | true when Picked cannot get to the app, or the app answers with a status of 500 or more. |
status | The HTTP status of the answer from the app. Only with app_tool_failed. |
reason | app_error when the answer from the app has an error.message. |
The error of the node does not show the error message from the app. To send the call again, refer to How to retry a failed call with a loop.
These failures stop the run at the node, also when the error exit has an edge:
- The output from the app does not have the type of each output field of the tool.
- The app is not installed on the project now. The node names a tool that Picked does not know.
6. Test the workflow
- Open the Test tab of the workflow.
- Start a test run.
A tool with the effect write, such as Create Zoho lead, runs in a test run only when
Execute writes is on. A tool with the effect read always runs. When a tool of an app
runs in a test run, Picked tells the app that the call is a test. For example,
Create Zoho lead then makes no lead in Zoho. Refer to the
workflow test runs reference.
API and MCP
You can also do this task with the Management API, the MCP server, or code that you send to picked_run.
| Task | GraphQL | MCP tool | Run |
|---|---|---|---|
| Find the name of the tool | workflowTools | None | None |
| Add a tool node | workflowGraphUpdate | update_workflow_graph | tools.update_workflow_graph({ workflow_id, create_nodes, create_edges }) |
| Test the workflow | workflowTestRun | test_run_workflow | tools.test_run_workflow({ workflow_id }) |
Give workflowTools the projectId of the project to get the tools of its apps. The MCP
tool list_workflow_tools does not give the tools of apps.
Related
- Workflow tools — the tools of Picked.
- Workflow runs — the status of a run, and the failures that stop it.
- How to upgrade or uninstall an app — what happens to the tools when you remove an app.
- About apps — how apps add tools to a project.
