Skip to content
LogoLogo

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

  1. In the project switcher, choose Apps.
  2. Find the app on the tab Installed.
  3. 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

  1. Open the workflow.
  2. Choose Add node.
  3. Choose Add tool.
  4. 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.

  1. Enter a value in each required argument. The editor shows an error on a required argument that has no value.
  2. For an argument with a list of options, choose one of the options.
  3. 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:

  1. Connect the error exit of the node to a condition node.
  2. Test {{ nodes.<node-id>.error.retryable }} in the condition.
  3. Connect the false exit of the condition to the nodes that record the failure.

The error of the node has these fields:

FieldValue
codeapp_unreachable when Picked cannot get to the app. app_tool_failed when the app answers.
messageThe node, the tool and the reason, such as the app answered 502.
retryabletrue when Picked cannot get to the app, or the app answers with a status of 500 or more.
statusThe HTTP status of the answer from the app. Only with app_tool_failed.
reasonapp_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

  1. Open the Test tab of the workflow.
  2. 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.

TaskGraphQLMCP toolRun
Find the name of the toolworkflowToolsNoneNone
Add a tool nodeworkflowGraphUpdateupdate_workflow_graphtools.update_workflow_graph({ workflow_id, create_nodes, create_edges })
Test the workflowworkflowTestRuntest_run_workflowtools.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.