Workflows
Create, trigger, and manage automated outreach sequences.
Tools (8)
Section titled “Tools (8)”list_workflows
Section titled “list_workflows”Full name: campaignstack_list_workflows
List workflows: one campaign’s with campaignId, or every workflow in the workspace without it. Returns workflow IDs, names, status, enabled flag and node count; the workspace-wide form also returns campaignId and signalAgentId per row (either may be null), which is the only way to reach a workflow whose campaign was archived or one a signal agent owns. Call this when the user asks what workflows exist, or to find a workflowId before another call. Use the returned workflowId with campaignstack_get_workflow to inspect it, or campaignstack_trigger_workflow to run it.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
campaignId | string | No | — | List only this campaign’s workflows. Omit to list EVERY workflow in the workspace, including ones whose campaign was archived and ones a signal agent owns. (min length: 1) |
workspaceId | string | No | — | Workspace 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. |
get_workflow
Section titled “get_workflow”Full name: campaignstack_get_workflow
Get a workflow by ID with all nodes (type, label, config, position, execution target) and edges, plus a sequence projection: lanes of the steps the user sees (Connect, First message, Follow-up N, Email N) with their knobs and memberNodeIds, computed from the graph. Call this when the user asks what a workflow does, or before editing it. Use it to describe the workflow the way the user reads it and to find which node ids a step owns; residualNodeIds lists nodes that belong to no known step. It does not report run counts or lead outcomes, use campaignstack_get_workflow_stats for that. If the workflow is not found, use campaignstack_list_workflows to find valid workflow IDs.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
get_workflow_node_types
Section titled “get_workflow_node_types”Full name: campaignstack_get_workflow_node_types
Returns the complete vocabulary of workflow node types available for building automation graphs. For each node type includes: nodeType key, label, description, configHint (exact TypeScript-style config shape), a concrete example node, exit handles for branching nodes, and credit cost per execution. Also returns graphShape documentation (how to structure nodes/edges) and a minimal end-to-end example graph. Call this before building a custom automation graph: it only describes the vocabulary, campaignstack_create_workflow is what actually builds the graph from it.
create_workflow
Section titled “create_workflow”Full name: campaignstack_create_workflow
Create a new workflow from a graph you author. Call this when the user wants a custom automation graph built node by node, beyond what a template or watcher would generate. The graph defines automation nodes (e.g. linkedin:profile_view, linkedin:connection_request, flow:wait) and directed edges. Use campaignstack_get_workflow_node_types first to discover valid node types, their configHint shapes, and the required graph format. Returns { workflowId, nodeCount } on success. sourceConfig is optional. Omit it to get a default campaign_pool source with icpScoreMin 50. This tool authors campaign-pool sourcing only. For a workflow fed by a lead list, do not call this: create the watcher that owns it (campaignstack_create_signal_agent, campaignstack_create_competitor_watch or campaignstack_set_account_watcher), which generates the workflow and its lead list correctly wired. To run a workflow over a list you built yourself, use campaignstack_create_lead_list then campaignstack_trigger_workflow. campaignstack_explain_capabilities with topic workflows lays out all three.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | No | — | Workspace 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. |
campaignId | string | No | — | Associate this workflow with a campaign |
name | string | Yes | — | (min length: 1) |
graph | object | Yes | — | Workflow graph: nodes (nodeType, label, config) + edges (sourceIndex, targetIndex). Use campaignstack_get_workflow_node_types to discover valid node types. |
sourceConfig | object | No | — | Source node configuration (providers format only). Omit to use the default: a single campaign_pool provider with icpScoreMin 50. A lead-list-based (signal-intake) source cannot be authored here: create the watcher that owns it instead, which generates the workflow and its lead list together. campaignstack_explain_capabilities with topic workflows says which watcher to use. |
update_workflow
Section titled “update_workflow”Full name: campaignstack_update_workflow
Update a workflow’s name, description, email sending account, and/or graph. Call this to rename a workflow, change its sending account, or restructure its steps. Provide name/description/emailGoogleAccountId to patch metadata; provide graph to replace the non-anchor nodes and edges. Both can be supplied in a single call. For one node’s config only, use campaignstack_update_workflow_node instead. Set existingNodeId on graph nodes that update an existing node in place. Claimed nodes keep their in-flight leads, while removing a node that still holds active leads fails with NODE_HAS_ACTIVE_LEADS (drain it first with campaignstack_cancel_node_leads). Graph replacement runs validation. Invalid graphs are rejected and the workflow is left unchanged. To enable or disable a workflow use campaignstack_update_workflow_status instead.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
name | string | No | — | New workflow name (min length: 1) |
description | string | No | — | New workflow description |
emailGoogleAccountId | string | null | No | — | Workflow-level email sending account for google:email_send nodes (a googleAccounts id from campaignstack_list_external_email_accounts provider=google, or null to clear). When unset, sends fall back to the account matching the workflow’s LinkedIn identity, then the campaign default. Setting an account resumes email leads parked as no_email_account_configured or account_expired. |
outreachIntents | object[] | No | — | An UNRANKED menu of acceptable outcomes for this outreach. Answers ‘why are we writing to these people’: a message with no stated purpose reads as a compliment plus an open question. The craft picks the outcome this reader and this thread can plausibly give and says the reason in its own words, and it switches when the lead’s own words open another door, so order carries no meaning and listing several is how a non-buyer still gets a relevant message. Resolution is workspace then campaign then workflow, and the narrowest non-empty list REPLACES the wider ones rather than merging, so setting it here overrides the level above. Pass an empty array to clear this level and fall back. |
graph | object | No | — | Replacement workflow graph. Replaces all existing non-anchor nodes and edges. Use campaignstack_get_workflow_node_types to discover valid node types. |
delete_workflow
Section titled “delete_workflow”Full name: campaignstack_delete_workflow
Permanently delete a workflow and all associated data. Call this only after the user has named the workflow and explicitly confirmed deletion, not merely disabling it. This action is irreversible and cascades to: workflow nodes, edges, lead-list source providers, node lead-list entries (lead progress), per-lead workflow contexts, and webhook tokens tied to this workflow. Use campaignstack_list_workflows to find workflow IDs. If you want to stop a workflow without deleting it, use campaignstack_update_workflow_status instead.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
update_workflow_status
Section titled “update_workflow_status”Full name: campaignstack_update_workflow_status
Enable or disable a workflow. Enabling activates the workflow (status becomes active, the graph is validated, and initial sourcing starts); disabling pauses it. Call this when the user names a workflow and a direction, on or off; enabling starts sending to real people. When enabled, the workflow will process leads according to its node configuration. It never stops a run already dispatched, and touches no other workflow. Use campaignstack_get_workflow to inspect the current node configuration first.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
enabled | boolean | Yes | — |
trigger_workflow
Section titled “trigger_workflow”Full name: campaignstack_trigger_workflow
Trigger workflow execution for specific leads or all leads in the workflow’s lead list. Call this when the user asks to start or re-run a workflow over its leads (or a named subset). Leads are set to ‘waiting’ status at the workflow entry node and will be processed by the workflow executor, on the pacing and review steps that workflow’s own graph and enabled state define. Use campaignstack_list_workflows to find workflow IDs, and campaignstack_get_lead_list to see available leads. To chain workflows FROM INSIDE a workflow, use the integration:add_to_sequence node with provider campaignstack instead; unlike this tool it never re-triggers a lead that already entered the target workflow (loop-safe once-ever semantics).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
workflowId | string | Yes | — | (min length: 1) |
leadIds | string[] | No | — |