Workflows
Build, edit, trigger and diagnose automation workflows, and manage the leads moving through them.
Tools (9)
Section titled “Tools (9)”diagnose_workflow_sourcing
Section titled “diagnose_workflow_sourcing”Full name: campaignstack_diagnose_workflow_sourcing
Explain why one lead did or did not enter one workflow, including score, dedup, exclusions, provider filters, and verdict. Read-only diagnostic only.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
leadId | string | No | — | |
profileUrl | string | No | — |
get_workflow_node_types
Section titled “get_workflow_node_types”Full name: campaignstack_get_workflow_node_types
Discover supported workflow node types before graph edits. Includes graph shape docs, examples, and webhook templates for integration:webhook nodes.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
includeWebhookTemplates | boolean | No | true |
get_workflows
Section titled “get_workflows”Full name: campaignstack_get_workflows
Read one or many workflows in a stable envelope. Omit ids to list matching records, pass one id for one record, or pass several ids for several records. The response still uses the same collection envelope. Use include only for extra details the user asked for. Large, computed, historical, or external includes must use their documented caps and must report when data is truncated or paginated. Includes can add graph, stats, bounded split optimization history, node activity, and leads at nodes.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ids | string[] | No | — | Workflow ids to hydrate. Omit to list workflows in the workspace or campaign. |
filters | object | No | — | |
filters.workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
filters.campaignId | string | No | — | Restrict listing to one campaign. |
filters.signalAgentId | string | No | — | Restrict returned rows to workflows owned by this signal agent after workspace listing. |
filters.enabled | boolean | No | — | |
filters.status | string | No | — | |
include | object | No | — | |
include.graph | object | No | — | Full workflow graph with nodes, edges, sequence projection, and account refs. |
include.stats | object | No | — | Per-node lead counts and edge traversal counts. |
include.optimizationHistory | object | No | — | Recent split-node optimization audit rows. |
include.nodeActivity | object | No | — | Recent activity for selected nodes. |
include.nodeLeads | object | No | — | Leads currently at selected nodes. |
limit | integer | No | 20 | Maximum items to return, capped at 100. (min: 1, max: 100) |
cursor | string | No | — | Opaque pagination cursor. (min length: 1, max length: 1000) |
nodes | object | No | — | |
nodes.ids | string[] | No | — | Node ids to hydrate through nodeActivity or nodeLeads includes. |
edit_workflow
Section titled “edit_workflow”Full name: campaignstack_edit_workflow
Create workflows, edit metadata, set whether the workflow sends without review (approvalMode), enable or pause execution, set LinkedIn account pools, set email sender account, set workflow-level outreach intents, and restore a previous node instructions version (restore_guidance, using a versionId from campaignstack_get_workflows include.guidanceHistory). Graph changes belong in campaignstack_edit_workflow_graph. Each operation returns independently.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
operations | operation[] | Yes | — | Batch edits are bounded. Return one result per requested item, and report partial failures instead of describing the whole batch as successful. |
Operations (operations[].op)
Section titled “Operations (operations[].op)”create
Section titled “create”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
clientOperationId | string | No | — | |
name | string | Yes | — | (min length: 1) |
description | string | No | — | |
campaignId | string | No | — | |
sourceConfig | object | Yes | — | |
graph | object | Yes | — | |
graph.nodes | object[] | Yes | — | |
graph.edges | object[] | Yes | — | |
graph.anchorEdges | object[] | No | — | |
approvalMode | manual_review | auto_when_confident | automatic | No | — | Whether what this workflow drafts waits for a person. manual_review: every message waits in the review queue. auto_when_confident: messages still wait, and the ones the confidence check rates as safe to send unchanged go out on their own once the workspace’s calibration allows it (a daily cap applies, and booking confirmations, files, conversation turns and flagged drafts always wait). automatic: no review step at all. On a signal agent this also removes its review steps; on any other workflow, review steps already in the graph keep waiting, so remove them with campaignstack_edit_workflow_graph. Omit to keep the current mode; on create, omit to start from the owner’s onboarding answer. Only a workspace owner or admin can set it. Set automatic only when the user asked for messages to go out unreviewed. |
set_meta
Section titled “set_meta”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
clientOperationId | string | No | — | |
workflowId | string | Yes | — | (min length: 1) |
name | string | No | — | (min length: 1) |
description | string | No | — | |
emailGoogleAccountId | string | null | No | — | |
outreachIntents | object[] | No | — | |
approvalMode | unknown | No | — | Whether what this workflow drafts waits for a person. manual_review: every message waits in the review queue. auto_when_confident: messages still wait, and the ones the confidence check rates as safe to send unchanged go out on their own once the workspace’s calibration allows it (a daily cap applies, and booking confirmations, files, conversation turns and flagged drafts always wait). automatic: no review step at all. On a signal agent this also removes its review steps; on any other workflow, review steps already in the graph keep waiting, so remove them with campaignstack_edit_workflow_graph. Omit to keep the current mode; on create, omit to start from the owner’s onboarding answer. Only a workspace owner or admin can set it. Set automatic only when the user asked for messages to go out unreviewed. |
set_enabled
Section titled “set_enabled”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
clientOperationId | string | No | — | |
workflowId | string | Yes | — | (min length: 1) |
enabled | boolean | Yes | — |
set_linkedin_accounts
Section titled “set_linkedin_accounts”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
clientOperationId | string | No | — | |
workflowId | string | Yes | — | (min length: 1) |
accountIds | string[] | Yes | — |
restore_guidance
Section titled “restore_guidance”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
clientOperationId | string | No | — | |
versionId | string | Yes | — | versionId of a previous node instructions version to restore. (min length: 1) |
edit_workflow_graph
Section titled “edit_workflow_graph”Full name: campaignstack_edit_workflow_graph
Atomically patch or replace one workflow graph. replace supplies the full non-anchor graph. patch starts from the current non-anchor graph, upserts/removes nodes, and replaces edges when supplied. Invalid graphs are rejected before persistence; active-lead safety remains enforced by the workflow backend. Optional split-node optimization runs after the graph write.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
mode | patch | replace | Yes | — | |
graph | object | No | — | |
graph.nodes | object[] | Yes | — | |
graph.edges | object[] | Yes | — | |
graph.anchorEdges | object[] | No | — | |
patch | object | No | — | |
patch.upsertNodes | array | No | [] | |
patch.removeNodeIds | string[] | No | [] | |
patch.edges | array | No | — | When supplied, replaces the non-anchor edge set after node patching. |
patch.anchorEdges | array | No | — | |
optimizeSplitNodeIds | string[] | No | — | Optional named split nodes to optimize after a valid graph write. |
retry_workflow_entries
Section titled “retry_workflow_entries”Full name: campaignstack_retry_workflow_entries
Retry one or many failed workflow entries by explicit entry ids, or retry all failed entries at one node. Returns per-entry partial results for explicit ids and node batch counts for node selectors.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
selector | operation | Yes | — | Exactly one operation, see below. |
selector variants (selector.type)
Section titled “selector variants (selector.type)”entries
Section titled “entries”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
entryIds | string[] | Yes | — |
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
nodeId | string | Yes | — | (min length: 1) |
trigger_workflow
Section titled “trigger_workflow”Full name: campaignstack_trigger_workflow
Confirmed consequential execution: adds the selected leads to a workflow, or with no leadIds runs its sourcing now. A lead enters a workflow once: leads already in it, in any status, and leads an exclusion matches are skipped and counted in skipped. It joins the workflow queue and obeys pacing, review, account, and safety limits. To retry failed entries, use campaignstack_retry_workflow_entries.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
leadIds | string[] | No | — | |
confirmed | boolean | Yes | — | Confirms this starts workflow execution for real leads. |
cancel_workflow_node_leads
Section titled “cancel_workflow_node_leads”Full name: campaignstack_cancel_workflow_node_leads
Confirmed drain operation for one workflow node. Waiting, event-waiting, and pending-review entries are cancelled; processing or already sent work cannot be recalled and is reported separately.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
nodeId | string | Yes | — | (min length: 1) |
confirmed | boolean | Yes | — | Confirms queued node entries may be cancelled; processing/sent work cannot be recalled. |
delete_workflow
Section titled “delete_workflow”Full name: campaignstack_delete_workflow
Permanently delete one workflow and its associated records. Requires confirmed:true. Use edit_workflow set_enabled:false to pause without deleting history.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
workflowId | string | Yes | — | (min length: 1) |
confirmed | boolean | Yes | — | This permanently deletes a root record. Before calling it, name exactly what will be deleted, explain that it cannot be undone, and wait for an explicit yes. |