Skip to content

Workflow

client.workflows manages the Imbrace flow engine: create and trigger automation flows, inspect run history, organize with folders, manage app connections and MCP servers, and access workflow tables.

For a guided walkthrough, see Workflows in the SDK guide.


Schema

Flow

FieldTypeDescription
idstringUnique flow ID
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last-updated timestamp
projectIdstringProject this flow belongs to
externalIdstringOptional external identifier
status"ENABLED" | "DISABLED"Whether the flow is active
operationStatusstringCurrent operation state
versionFlowVersionActive version object

FlowVersion

FieldTypeDescription
idstringUnique version ID
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last-updated timestamp
flowIdstringFlow this version belongs to
displayNamestringHuman-readable flow name
triggerobjectTrigger configuration
stepsobject?Optional step configuration
validboolean?Whether the version is valid

FlowRun

FieldTypeDescription
idstringUnique run ID
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last-updated timestamp
projectIdstringProject ID
flowIdstringFlow that was executed
flowVersionIdstringSpecific version that ran
status"RUNNING" | "SUCCEEDED" | "FAILED" | "TIMEOUT" | "PAUSED" | "STOPPED"Run outcome
environment"PRODUCTION" | "TESTING"Execution environment
startTimestring?When the run started
finishTimestring?When the run finished
failParentOnFailurebooleanWhether failure propagates to parent flow
tagsstring[]?Tags attached to this run

AppConnection

FieldTypeDescription
idstringUnique connection ID
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last-updated timestamp
externalIdstringExternal identifier
displayNamestringHuman-readable name
pieceNamestringThe piece (integration) this connection is for
projectIdstringProject ID
type"SECRET_TEXT" | "OAUTH2" | "CLOUD_OAUTH2" | "PLATFORM_OAUTH2" | "BASIC_AUTH" | "CUSTOM_AUTH"Connection auth type

McpServer

FieldTypeDescription
idstringUnique MCP server ID
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last-updated timestamp
projectIdstringProject ID
namestring?Server name

Methods

Flows

MethodTypeScriptPythonDescription
List flowslistFlowslist_flowsPaginated list of flows
Get flowgetFlowget_flowGet a single flow by ID
Create flowcreateFlowcreate_flowCreate a new flow
Delete flowdeleteFlowdelete_flowDelete a flow
Apply flow operationapplyFlowOperationapply_flow_operationApply an operation (e.g. publish, enable) to a flow
Trigger flowtriggerFlowtrigger_flowTrigger a flow asynchronously
Trigger flow synctriggerFlowSynctrigger_flow_syncTrigger a flow and wait for result

Flow Runs

MethodTypeScriptPythonDescription
List runslistRunslist_runsList run history
Get rungetRunget_runGet a single run by ID

Folders

MethodTypeScriptPythonDescription
List folderslistFolderslist_foldersList flow folders
Get foldergetFolderget_folderGet a folder by ID
Create foldercreateFoldercreate_folderCreate a folder
Update folderupdateFolderupdate_folderRename a folder
Delete folderdeleteFolderdelete_folderDelete a folder

App Connections

MethodTypeScriptPythonDescription
List connectionslistConnectionslist_connectionsList app connections
Get connectiongetConnectionget_connectionGet a connection by ID
Upsert connectionupsertConnectionupsert_connectionCreate or update a connection
Delete connectiondeleteConnectiondelete_connectionRemove a connection

MCP Servers

MethodTypeScriptPythonDescription
List MCP serverslistMcpServerslist_mcp_serversList MCP servers
Get MCP servergetMcpServerget_mcp_serverGet a server by ID
Create MCP servercreateMcpServercreate_mcp_serverRegister a new MCP server
Delete MCP serverdeleteMcpServerdelete_mcp_serverRemove a server
Rotate tokenrotateMcpTokenrotate_mcp_tokenRotate the server’s auth token

listFlows / list_flows

const page = await client.workflows.listFlows({
limit: 10,
status: "ENABLED",
folderId: "folder_id",
});
for (const flow of page.data) {
console.log(flow.id, flow.version?.displayName);
}

createFlow / create_flow

const flow = await client.workflows.createFlow({
displayName: "New Lead Notification",
projectId: "project_id",
});
console.log(flow.id);

triggerFlow / trigger_flow

Trigger a flow asynchronously with an optional payload.

await client.workflows.triggerFlow("flow_id", {
contact_id: "contact_123",
event: "lead_created",
});

listRuns / list_runs

const page = await client.workflows.listRuns({
flowId: "flow_id",
status: "FAILED",
limit: 20,
});

upsertConnection / upsert_connection

Create or update an app connection (e.g. API key for a third-party service).

const conn = await client.workflows.upsertConnection({
displayName: "Slack Workspace",
pieceName: "slack",
projectId: "project_id",
type: "SECRET_TEXT",
value: { api_key: "xoxb-..." },
});

createMcpServer / create_mcp_server

const server = await client.workflows.createMcpServer({
name: "My MCP Server",
projectId: "project_id",
});