Outcome
Execute a selected automation manually with an optional trigger payload.
Before you start
- Verify authenticated identity, environment and the approved organization context before preparing an action.
- The published application permission is workspace:write. Discover and bind the exact granted Flow workspace. Supplied ids do not grant access.
- Session callers need read_write or admin workspace access. Auth-introspected API keys must bind that workspace and satisfy workspace:write. The application permission and workspace boundary are separate checks.
- Authorize the documented mutation effects before CLI --confirm or MCP confirm:true. Fixture credentials and ids authorize no live operation.
Discover the target
topolo whoami --json
topolo actions get app_topolo_flow.flow.run --detail --json
topolo resources topolo-flow --json
topolo workspaces list topolo-flow --json
- Set FLOW_WORKSPACE_ID to the exact id returned by granted workspace discovery.
- Discover flowId using flows.list or a retained creation response in this workspace.
Request
POST /api/flows/{flowId}/run
Inspect and test this action. Save the exact input object as payload.json; resource context is supplied separately.
Input fields
| Field | Required | Meaning | Constraints |
|---|---|---|---|
flowId | Required | Exact flow.id returned by creation, flows.list or flows.get in this granted workspace. | {} |
payload | Optional | JSON object delivered to the trigger context; nested arbitrary values are accepted. Retained run/step data can contain personal or sensitive content. | {} |
View the full input schema through the action reference or CLI/MCP discovery.
Effects
- With FLOW_RUNS configured, creates a durable instance and returns HTTP 202 running before the run row exists. Without that binding, executes synchronously and returns its actual summary. Repeated calls make distinct runs. Draft and paused flows may be invoked manually; execution can call apps/providers, emit notifications and usage. Acceptance does not establish completion.
- Session callers need read_write or admin access to the exact granted Flow workspace, in addition to the published application permission. Auth-introspected API keys use their bound workspace and workspace:write; supplying an id never grants access.
Interpret the response
Read $.run.runId for the returned run identifier. An empty collection does not discover a target.
Save run.runId and poll runs.get/runs.list until a retained terminal record and steps exist; inspect each external action independently. A 202 fixture proves simulated acceptance only.
View the complete success schema. Success examples below preserve the actual exported Worker responses; errors have their original refusal shapes. CLI/MCP add their transport envelope, and --detail requests the full CLI response.
Worked examples
Captured from the actual exported Flow Worker with both local SQLite D1 stores and all committed migrations, synthetic Auth identity/grants and simulated Nexus, archive and Workflow-acceptance transports. Fixture credentials and identifiers authorize no live operation. No live provider invocation, credential storage, notification delivery, metering acceptance, durable Workflow execution, deployment, backup erasure or production completion is established by these captures. Refused examples explain boundaries and must not be executed as successful workflows.
Refused request · HTTP 403
Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Nexus/archive transport. No live credentials, provider calls, delivery, deployment or durable Workflow execution proof. Scenario: read workspace grant refused.
Input · payload.json:
{
"flowId": "synthetic_missing"
}
CLI:
topolo actions validate app_topolo_flow.flow.run --data @payload.json --json
topolo actions plan app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"error": "This workspace requires read_write access",
"code": "workspace_access_insufficient"
}
HTTP 403. The handler refused this request. Resolve the exact cause before retrying; invalid input can be refused by CLI validation before reaching the handler.
Successful request
Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Nexus/archive transport. No live credentials, provider calls, delivery, deployment or durable Workflow execution proof. Scenario: simulated durable acceptance.
Input · payload.json:
{
"flowId": "flow_f00bce3f21204aa19d12",
"payload": {
"message": "Synthetic queued fixture"
}
}
CLI:
topolo actions validate app_topolo_flow.flow.run --data @payload.json --json
topolo actions plan app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --confirm --detail --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_flow.flow.run",
"input": {
"flowId": "flow_f00bce3f21204aa19d12",
"payload": {
"message": "Synthetic queued fixture"
}
},
"resourceType": "workspace",
"resourceId": "<id returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 202:
{
"run": {
"runId": "run_806168a208e640c9b7b3",
"status": "running",
"stepCount": 0,
"error": null,
"steps": []
}
}
HTTP 202. Save run.runId and poll runs.get/runs.list until a retained terminal record and steps exist; inspect each external action independently. A 202 fixture proves simulated acceptance only.
Refused request · HTTP 404
Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Nexus/archive transport. No live credentials, provider calls, delivery, deployment or durable Workflow execution proof. Scenario: unknown flow.
Input · payload.json:
{
"flowId": "flow_missing"
}
CLI:
topolo actions validate app_topolo_flow.flow.run --data @payload.json --json
topolo actions plan app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 404:
{
"error": "flow_not_found"
}
HTTP 404. The handler refused this request. Resolve the exact cause before retrying; invalid input can be refused by CLI validation before reaching the handler.
Refused request · HTTP 401
Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Nexus/archive transport. No live credentials, provider calls, delivery, deployment or durable Workflow execution proof. Scenario: anonymous action.
Input · payload.json:
{
"flowId": "synthetic_missing"
}
CLI:
topolo actions validate app_topolo_flow.flow.run --data @payload.json --json
topolo actions plan app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 401:
{
"error": "Authentication token required"
}
HTTP 401. The handler refused this request. Resolve the exact cause before retrying; invalid input can be refused by CLI validation before reaching the handler.
Another supported response
Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Nexus/archive transport. No live credentials, provider calls, delivery, deployment or durable Workflow execution proof. Scenario: flow.run.
Input · payload.json:
{
"flowId": "flow_d16b892d0e89474a8f24",
"payload": {
"message": "Synthetic fixture"
}
}
CLI:
topolo actions validate app_topolo_flow.flow.run --data @payload.json --json
topolo actions plan app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_flow.flow.run --resource-type workspace --resource-id "$FLOW_WORKSPACE_ID" --data @payload.json --confirm --detail --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_flow.flow.run",
"input": {
"flowId": "flow_d16b892d0e89474a8f24",
"payload": {
"message": "Synthetic fixture"
}
},
"resourceType": "workspace",
"resourceId": "<id returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"run": {
"runId": "run_ad5fdc8e1e0143789d89",
"status": "success",
"stepCount": 2,
"error": null,
"steps": [
{
"nodeId": "trigger",
"label": null,
"kind": "trigger.manual",
"status": "success",
"error": null,
"output": {
"message": "Synthetic fixture"
}
},
{
"nodeId": "transform",
"label": null,
"kind": "core.transform",
"status": "success",
"error": null,
"output": {
"message": "Synthetic fixture"
}
}
]
}
}
HTTP 200. Save run.runId and poll runs.get/runs.list until a retained terminal record and steps exist; inspect each external action independently. A 202 fixture proves simulated acceptance only.
Verify the result
- Save run.runId and poll runs.get/runs.list until a retained terminal record and steps exist; inspect each external action independently. A 202 fixture proves simulated acceptance only.
Errors and recovery
flow_not_found(HTTP 404): Never repeat an uncertain invocation blindly: first discover its run and effects. No general action cancels a run or reverses arbitrary app/provider side effects; plan each compensating action separately.Authentication token required(HTTP 401): Authenticate normally in the approved environment and organization, verify identity, then rediscover the action and its granted resource before retrying.organization_required(HTTP 403): Authenticate into the specifically approved organization. Do not guess a different organization or bypass the refusal.action_permission_required(HTTP 403): The credential lacks the exact published application permission. Stop and obtain authorized access; changing target ids cannot grant it.workspace_required(HTTP 400): Discover an explicitly granted Flow workspace and bind its exact resource id.workspace_access_insufficient(HTTP 403): Stop when the selected workspace grant is insufficient. Obtain authorized read_write or admin access, or an Auth-introspected key with the correct workspace binding and workspace:write; do not widen context or retry with guessed ids.
Preserve the exact status, response, request id and resource context. Runtime input validation, authentication and platform resource resolution can refuse a request before the handler. Dynamic dependency messages are not stable provider error codes.
Recovery boundary
Never repeat an uncertain invocation blindly: first discover its run and effects. No general action cancels a run or reverses arbitrary app/provider side effects; plan each compensating action separately.
Related actions
- Get a Flow run: Read one retained execution record and its ordered step evidence.
- List runs for a flow: Read up to 50 retained executions for an exact flow in the workspace.
Evidence
Captured from the actual exported Flow Worker with both local SQLite D1 stores and all committed migrations, synthetic Auth identity/grants and simulated Nexus, archive and Workflow-acceptance transports. Fixture credentials and identifiers authorize no live operation. No live provider invocation, credential storage, notification delivery, metering acceptance, durable Workflow execution, deployment, backup erasure or production completion is established by these captures. Original scenario labels and response digests are retained in the source fixtures.