A workflow turns an event into work: an email arrives, a webhook is called or a schedule ticks, and Sommatic AI runs a graph of nodes that classify, transform, call systems and, when the case needs a person, open a task. Every run is recorded node by node, so you can always answer what happened, with which data and why.
How a workflow is built
A workflow is a graph: nodes connected by edges.
- A node runs one operator from the node catalog (
ai.classify,io.http,flow.if…). It has alabel, a stablenode_id, itsconfigand its output ports. - An edge connects the port of one node to the next node:
{ "from": { "node_id": "…", "port": "out" }, "to": { "node_id": "…" } }. - The first node is a trigger: it decides how a run starts (webhook, schedule, mailbox, queue, another workflow or by hand).
Nodes read data from earlier nodes with expressions, for example
{{ $('Classify request').item.json.label }}.
Draft, version and run
| Object | What it is |
|---|---|
| Flow definition | The workflow you edit. Its draft (draft_nodes, draft_edges) changes every time you save. |
| Flow version | An immutable snapshot of the draft, created when you publish. Production runs use the latest published version. |
| Flow instance | One run: its status, its variables and the node it is on. |
| Node execution | The record of one node inside a run: its output, port and timing. |
How a run moves
Sommatic AI’s engine runs the graph one node at a time:
- The trigger creates the instance and its input becomes
$jsonfor the first node. - The engine runs the current node. The node returns an envelope:
{ ok, data, port, meta? }. - The
portpicks the edge to follow (outby default;true/falseinflow.if;errorwhen something fails). - The instance state is saved after every node, so a run can be inspected and resumed.
A run stops when no edge leaves the chosen port. One tick runs at most 100 steps, a ceiling that protects you from accidental loops.