Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Uipath maestro flow/Api-workflow
Reference · Uipath maestro flow

Api-workflow

Part of Uipath maestro flow. Install the skill and your agent reads this page when it needs the depth.

API Workflow

Exact signatures, fields, and defaults: apiWorkflow().

Run a coded API workflow, deployed or a sibling in the same solution, as a serverless Orchestrator job.

Signature: apiWorkflow({ key?, name, folderPath, inputs?, inputSchema?, returns? }), or apiWorkflow({ key, name, location: 'in-solution', projectId, inputs?, inputSchema?, returns? }) for an API workflow in the same solution (see In the same solution). For a published process, leave key and returns out: check prints the registry prepare --kind Process command that records them, and compile fills both in (Orchestrator Processes). An in-solution sibling still takes key. Orchestrator often leaves an API workflow's contract blank, so prepare prints Outputs (not recorded …); then keep returns, as below.

.step('age', apiWorkflow({ name: 'NameToAge', folderPath: 'Shared',
  inputs: { name: input('name') }, returns: { age: 'integer' } }))

At a glance

Run a coded API workflow and wait for its job result.

Published workflow: confirm identity and exact argument casing on the tenant. In-solution sibling: read them from the sibling project (In the same solution). .onError(...) is supported.

Recording the key and contract: or-processes.md

Tenant contract

For a published workflow, the key, name, and folder must describe one deployed resource. Confirm its actual input/output names and casing from the tenant. See Orchestrator Processes and use the Api process type for the shared, pagination-safe resource-discovery procedure.

.onError(...) is supported on API workflow steps. Choose a handler only when the scenario wants recovery; otherwise a faulted job may need to fault the Flow.

To type an argument differently from its value (for example an object filled from an expression), add inputSchema; keep one a decompiled step carries. See Orchestrator Processes.

In the same solution

An API workflow that is a sibling project of the Flow, in the same solution, is not published yet, so it has no folder. Write it with location: 'in-solution' and projectId instead of folderPath:

.step('notify', apiWorkflow({
  key: localResourceKey,
  name: '<ApiWorkflowProject>',
  location: 'in-solution',
  projectId: localProjectKey,
  inputs: { name: input('name') },
}))

Needs @uipath/maestro-builder-sdk 6.71.1 or later: check that dist/nodes/process/flow/spec.d.ts of the SDK copy in use declares projectId on ApiWorkflowInputs. An older SDK has no location on apiWorkflow(): check reports APIWF_NO_FOLDER, but compile alone (6.64.0 on, it no longer runs check) exits 0 and writes a binding keyed undefined.<name>. On an older SDK, report the version instead of compiling the in-solution form.

Evidence boundary

Replay uses the authored contract. Live evidence should identify the real job, its input arguments, completion status, and returned output. Job completion does not by itself prove the coded workflow's business result is correct.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.