Skip to content

Workflow node reference ​

The type of a node in a workflow definition is one of the ids below. Each type has its own config schema; the console editor shows the fields for the selected type, and validation rejects a config that does not match.

The getWorkflowSchema query returns the JSON Schema for workflow definitions. To find out what nodes.<id>.output will contain for a node, pass its type and config to resolveNodeOutputSchema:

graphql
mutation OutputSchema($config: JSON!) {
  resolveNodeOutputSchema(input: { nodeType: "graphql", config: $config }) {
    schema
    resolution
    diagnostics { message }
    errors { path message }
  }
}

resolution says how the schema was worked out: INFERRED, INTROSPECTED, STATIC or PASSTHROUGH. PASSTHROUGH means the node outputs its input unchanged.

Unless a row says otherwise, a node has one input and one output (see Branching and joining).

Flow control ​

TypeWhat it does
conditionEvaluates a predicate and takes the true or false branch (label the outgoing edges "true" and "false"). Passes its input through. Fans out.
switchEvaluates cases in order and takes the branch of the first match, or the default branch. Each case name must match an outgoing edge's condition. Without a default, the node fails when no case matches. Fans out.
logicCombines several predicates with and, or, not, nand, nor, xor or xnor into one true / false branch. Outputs result and each operand's value. Fans out.
splitRuns every outgoing branch in parallel. No config. Fans out.
joinWaits for all live incoming branches (AND) and combines their outputs with the strategy keyed (default), merge or array. A failed branch triggers onPartialFailure: fail (default) or skip. Fans in.
mergeCombines whichever incoming branches arrive (OR); a failed branch is dropped. Fans in.
for_eachRuns an embedded body node once per item of items, sequentially or with maxConcurrency in parallel. Outputs results (one entry per item, in order) and count.
delayWaits for a configured duration, then passes its input through.

Data ​

TypeWhat it does
transformBuilds a new object from a mapping of keys to expressions, literals or nested structures.
set_variableSets workflow variables that any later node reads as variables.<name>.
json_parseParses a JSON string, or encodes a value as JSON.
csv_parseParses CSV into a list of objects, or encodes objects as CSV.
yaml_parseParses a YAML string, or encodes a value as YAML.
regexRegular-expression match, extract, replace or split on a string.

Checks and logging ​

TypeWhat it does
assertEvaluates a predicate. If it fails, the workflow fails with the configured message, or, with softFail: true, outputs passed: false instead.
logWrites a message to the execution log and passes its input through. Levels: debug, info, warning, error.

Platform ​

TypeWhat it does
graphqlRuns a GraphQL query or mutation against the CoCoCo API. The output's data has the shape of your selection set.
microsqlRuns a MicroSQL query against the reporting engine.
scriptRuns a Lua script: a saved script by id or name, or inline code.
custom_workflow_actionRuns a custom workflow action, a reusable Lua-backed action defined in your tenant.
integration_actionRuns an action exported by an installed integration.
ml_predictRuns an ML model: features for tabular models, horizon / confidenceLevel for forecast models.
producibility_auditRuns a feasibility audit against a job's production plan using current progress data, and returns severity, findings and at-risk items.
messageSends a notification to a notification group or one recipient. Delivery is by email; recipients without an email channel are skipped.

People and AI ​

TypeWhat it does
taskCreates a human task from a task definition and pauses the workflow (status WAITING) until someone completes or rejects it. Outputs the chosen outcome.
agentSends a prompt to an AI agent for free-form processing.
agent_taskLets an AI agent resolve a task by choosing one of its outcomes, optionally falling back to a human task.

HTTP and devices ​

TypeWhat it does
http_callSends an HTTP request to any URL allowed by the platform's HTTP policy. Outputs status, headers, body (a string: parse it with json_parse) and ok (true for 2xx).
http_requestSends an HTTP request to a device.
sql_queryRuns a SQL query against a device's database.
invoke_edge_appCalls a function of an edge app installed on a controller.
mqtt_publishPublishes a message to MQTT.

Files ​

These nodes work on Folders: named storage locations in your tenant. Each takes an optional Folder ID (folderId, or sourceFolderId / destinationFolderId for file_copy; without it, the tenant's default Folder is used) and a folder-relative path or key; .. is not allowed.

TypeWhat it does
file_readReads a file
file_writeWrites a file
file_checkChecks whether a file exists
file_listLists files under an optional prefix. Set recursive: false to list one level only; controller folders always list one level.
file_deleteDeletes a file
file_copyCopies a file to another Folder or within the same Folder
file_waitPauses the workflow until a given file appears

Folders in the CoCoCo cloud store, including the tenant's default Folder, do not support listing or deleting, so file_list and file_delete fail on them.

Prepress ​

TypeWhat it does
impose_planRuns the imposition engine and outputs the recommended plan as data. Nothing is stored.
impose_pdfImposes source PDFs onto press sheets from a plan or saved imposition specs, and stores the print-ready PDF as a file.
pdf_renderRenders one page of a PDF to an image.
pdf_separationsRenders every ink plate of a PDF page (CMYK and spot colours) to greyscale PNGs, one file per colourant.
pdf_preflightRuns a preflight check on a component's artwork PDF and can store the report.

The file-producing prepress nodes take an optional outputFolderId for where their files are stored.

Connect machines, automate workflows, and build custom apps for print production.