Skip to content

Workflow Execution

Monitor workflow progress — node stats, lead positions, activity logs, and retry failed entries.

Full name: campaignstack_get_workflow_stats

workflows:read Read-only Idempotent

Get real-time execution statistics for a workflow. Returns per-node lead counts (waiting, processing, completed, failed), edge traversal counts, and paused action types. Call this when the user asks how a workflow is doing or where leads are stuck. It counts leads only, not who they are: use campaignstack_list_leads_at_node for names. Use campaignstack_get_workflow to get the workflow structure first.

NameTypeRequiredDefaultDescription
workflowIdstringYes(min length: 1)

Full name: campaignstack_list_leads_at_node

workflows:read Read-only Idempotent

List leads currently at a specific workflow node. Returns up to 100 leads with their name, headline, company, status, and timestamps. Entries with status ‘cancelled’ were terminated by the lead router (cancelReason: superseded_by_reply, superseded_by_newer, meeting_booked, stale_expired, workflow_disabled). Call this when the user asks who is at a node or wants failed entries to retry. It does not show a single lead’s full path across nodes: campaignstack_get_lead_history does that. Use campaignstack_get_workflow_stats to identify nodes of interest.

NameTypeRequiredDefaultDescription
nodeIdstringYes(min length: 1)

Full name: campaignstack_get_node_activity

workflows:read Read-only Idempotent

Get recent activity for a specific workflow node. Returns entries sorted by most recent, with per-status counts. Call this when the user asks what happened at a node recently or why it is failing. ‘cancelled’ entries carry a cancelReason explaining why the lead router terminated them (e.g. superseded_by_reply = the lead replied before the queued touch was sent). It is scoped to one node: for one lead across every node, use campaignstack_get_lead_history.

NameTypeRequiredDefaultDescription
nodeIdstringYes(min length: 1)
limitintegerNo50(min: 1, max: 100)

Full name: campaignstack_retry_failed_entry

workflows:write

Retry one failed workflow entry. Resets the entry from FAILED to WAITING so the workflow executor picks it up on the next tick. Call this after fixing whatever caused the failure for a single lead; to clear a whole node’s failures at once, use campaignstack_retry_failed_entries_at_node instead. Use campaignstack_list_leads_at_node to find failed entries.

NameTypeRequiredDefaultDescription
entryIdstringYes(min length: 1)
workspaceIdstringYesWorkspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach. (min length: 1)