Workflow definition
A workflow is a list of nodes and a list of edges. The editor, the API, the MCP server and the import and export file all read and write the same JSON. This page describes that JSON. For the configuration keys of each individual action, see the action reference.
{
"nodes": [
{
"id": "trigger",
"type": "trigger",
"position": { "x": 0, "y": 0 },
"data": {
"type": "trigger",
"label": "Every 10 minutes",
"config": { "triggerType": "Schedule", "scheduleCron": "*/10 * * * *" }
}
},
{
"id": "check-balance",
"type": "action",
"position": { "x": 250, "y": 0 },
"data": {
"type": "action",
"label": "Check Balance",
"config": {
"actionType": "web3/check-balance",
"network": "1",
"address": "0x0000000000000000000000000000000000000000"
}
}
},
{
"id": "is-low",
"type": "action",
"position": { "x": 500, "y": 0 },
"data": {
"type": "action",
"label": "Balance below 1 ETH",
"config": {
"actionType": "Condition",
"condition": "{{@check-balance:Check Balance.balance}} < 1"
}
}
},
{
"id": "notify",
"type": "action",
"position": { "x": 750, "y": 0 },
"data": {
"type": "action",
"label": "Notify",
"config": {
"actionType": "discord/send-message",
"integrationId": "your-discord-connection-id",
"discordMessage": "Balance is {{@check-balance:Check Balance.balance}} ETH"
}
}
}
],
"edges": [
{ "id": "e1", "source": "trigger", "target": "check-balance" },
{ "id": "e2", "source": "check-balance", "target": "is-low" },
{ "id": "e3", "source": "is-low", "target": "notify", "sourceHandle": "true" }
]
}Nodes
| Key | Required | Description |
|---|---|---|
id | Yes | Unique within the workflow. Other nodes reference it in {{@nodeId:Label.field}}. |
type | Yes | "trigger" or "action". Every node that is not the trigger is an "action", including conditions and loops. |
position | In an export file | Canvas coordinates { "x": number, "y": number }. When you save through the API or MCP and omit it, the node is placed at 0, 0. When more than one node is saved and all of them share one position, the editor lays them out automatically. |
data.type | Yes in an export file | The same value as type. The API fills it in when you send only the outer type. |
data.label | Yes | The display name. It is the Label part of a template reference, and the editor shows it on the node. |
data.description | No | Free-text notes. |
data.config | Yes | The node’s settings. For an action, actionType selects the action and the other keys are that action’s fields. For a trigger, triggerType selects the trigger. |
data.enabled | No | false skips the node when the workflow runs. Omitted means enabled. |
data.status | No | Run state shown in the editor. Only the saved states are kept; anything else is dropped. It is not part of an export. |
Keys other than label, description, type, config, status and enabled placed directly under data are moved into data.config when the workflow is saved through the API or MCP. An export file does not accept them.
Action nodes
data.config.actionType is required and takes one of these forms:
integration/actionfor a plugin or protocol action, for exampleweb3/check-balance,discord/send-messageoraave-v3/supply. Every action type and its fields are listed in the action reference.- The name of a system action, for example
ConditionorHTTP Request. See System actions.
When you send the action type as the outer node type (for example "type": "web3/check-balance"), the server moves it into data.config.actionType and sets type to "action".
Actions that use a saved connection (Discord, SendGrid, Database Query and similar) take the connection’s id in data.config.integrationId. The id is private to your organization, so exports remove it and an import leaves it for you to bind again. Web3 writes sign with the sender in web3Connection instead; see Create workflow.
Edges
| Key | Required | Description |
|---|---|---|
id | Yes | Unique within the workflow. |
source | Yes | The id of the node the edge leaves. |
target | Yes | The id of the node the edge enters. |
sourceHandle | For branching nodes | Which output of the source node the edge uses. |
targetHandle | No | Accepted and stored. Nodes have a single input, so it is normally omitted. |
type, label, data | No | Presentation only. |
Set sourceHandle on every edge that leaves a branching node and omit it everywhere else:
| Source node | sourceHandle | The target runs |
|---|---|---|
| Condition | "true" | When the condition is true. |
| Condition | "false" | When the condition is false. |
| For Each | "loop" | Once per array element, as the loop body. |
| For Each | "done" | Once, after the loop has finished. A Collect node placed here receives the gathered results. |
A node on a branch that a Condition did not take does not run. A later Condition that references such a node reads its fields as undefined rather than failing.
Triggers
A workflow starts from one trigger node. data.config.triggerType selects the trigger:
triggerType | Starts a run when | Main config keys |
|---|---|---|
Manual | You run it from the editor, the API or the MCP server. | None. |
Schedule | The cron expression or interval fires. | scheduleCron or scheduleIntervalSeconds, scheduleTimezone |
Webhook | Its webhook URL receives a request. | webhookSchema, webhookMockRequest |
Event | A contract emits the event. | network, contractAddress, contractABI, eventName |
Block | A chain reaches the block interval. | network, blockInterval |
Transfer | A TIP-20 transfer with a memo reaches a watched Tempo address. | network, contractAddress, recipientAddress, memo |
Pyth Price | A Pyth price crosses a threshold. Offered only where the trigger is enabled. | feedId, direction, threshold, rearmThreshold, maxAgeSeconds |
The triggers reference lists every key, its type and its description, and the outputs each trigger emits.
Notes that the reference does not carry:
- A Schedule trigger set to a fixed interval stores the number of seconds in
scheduleIntervalSecondsand leavesscheduleCronempty. WhenscheduleIntervalSecondsholds a valid value it is used andscheduleCronis ignored.scheduleTimezonedefaults toUTCwhen it is absent. - An Event trigger on a Solana network takes
programId,idlandeventNameinstead of the contract keys. - An Event trigger can name a protocol event instead of a contract address, with
_eventProtocolSlugand_eventSlugand nocontractAddress. The event lists on the action reference pages carry the slugs. The address is looked up from the protocol on the chosen network, and the workflow never runs when the protocol has no address there. - Every trigger emits
triggeredAt, an ISO timestamp. A Webhook trigger emits each top-level key of the JSON body next to it, so a body of{"amount": "5"}is read as{{@triggerNodeId:Label.amount}}. There is nobody,headers,methodorquerywrapper. - A trigger’s output is stored as
{ success, data }. A reference such asLabel.triggeredAtand one writtenLabel.data.triggeredAtboth resolve.
System actions
System actions are built into the engine and need no connection. Set actionType to the name in the first column. Keys, types, defaults and outputs are on the system actions reference.
actionType | Purpose |
|---|---|
Condition | Branch on a boolean expression or on a rule group. Outputs result. |
HTTP Request | Call an HTTP endpoint. Keys include endpoint, httpMethod, httpHeaders, httpBody, timeout, failOnError, retryAttempts and retryDelay. Outputs status and data. |
Database Query | Run SQL against a connected database. Keys: integrationId, dbQuery, plus optional dbSchema, connectTimeout and retries. Outputs rows and rowCount. |
For Each | Run the nodes on its loop handle once per array element. Keys: arraySource, plus optional maxIterations, mapExpression, concurrency and concurrencyLimit. Inside the loop, currentItem, index and totalItems are available. |
Collect | Gathers the results of a For Each into results and count. |
State Get, State Set | Read and write a key of the workflow’s persistent state. See Workflow state. |
Trip Circuit Breaker, Reset Circuit Breaker | Engage or clear the organization’s incident circuit breaker. |
Condition
A Condition node carries either an expression in condition or a rule group in conditionConfig:
{
"actionType": "Condition",
"conditionConfig": {
"group": {
"id": "g1",
"logic": "AND",
"rules": [
{
"id": "r1",
"leftOperand": "{{@check-balance:Check Balance.balance}}",
"operator": "<",
"rightOperand": "1"
},
{
"id": "g2",
"logic": "OR",
"rules": [
{ "id": "r2", "leftOperand": "{{@t:Trigger.mode}}", "operator": "===", "rightOperand": "alert" },
{ "id": "r3", "leftOperand": "{{@t:Trigger.mode}}", "operator": "isEmpty", "rightOperand": "" }
]
}
]
}
}
}- A group has an
id, alogicof"AND"or"OR"(anything else is read as"AND") and aruleslist. An entry ofrulesis either a rule or a nested group; an entry withrulesorlogicis read as a group. - A rule has an
id,leftOperand,operatorandrightOperand. Operands are literals or template references. An operator that takes no right operand (the unary ones) leavesrightOperandempty. - Ids missing on save are generated. Keep them unique.
operatormust be one of the exact keys on the system actions reference, for example===,<,contains,isEmpty,arrayContainsormatchesRegex. A few spellings such asequals,greater_thanandis_emptyare rewritten to their key on save. A name that is not a key and not one of those spellings is replaced with===, so check the spelling.- When
conditionConfig.groupproduces a real expression, it runs andconditionis ignored. Otherwise the text inconditionruns. - References in a Condition use the stored format only. See Templating reference.
Template references
A string in a node’s config can hold {{@nodeId:Label.field}}, which is replaced by the output of an upstream node when the workflow runs:
nodeIdis the upstream node’sid. Characters other than letters and digits are treated as_when the output is looked up, so ids that differ only in punctuation collide.Labelis the upstream node’sdata.label. In an action’s config the lookup usesnodeId; the label is for readers and for the editor. The field path starts after the first., so a label that contains a.breaks the reference in an action’s config.fieldis a dotted path with numeric indexes, for exampledata.items[0].name. Omit it to take the whole output. When the path is not found at the top of the output, the engine tries insidedataand then insideresult.{{@__system:System.unixTimestamp}},unixTimestampMsandisoTimestampread the clock when the node runs.
A reference that cannot be resolved fails the step instead of passing an empty value on. The full grammar, the other accepted forms and the runtime rules are in the templating reference.
Export file format
An exported workflow is one JSON file in the shape below. Import and export describes how to download and upload it.
{
"version": 1,
"exportedAt": "2026-01-01T12:00:00.000Z",
"workflow": { "name": "Balance alert", "description": "Optional" },
"nodes": [],
"edges": [],
"integrationBindings": []
}| Key | Rules |
|---|---|
version | Must be 1. |
exportedAt | An ISO 8601 datetime. Required. |
workflow.name | 1 to 200 characters. |
workflow.description | Optional, up to 2,000 characters. |
nodes | Up to 200 nodes. Each node has exactly id (non-empty), type, position and data, and no other keys. data has exactly label (up to 500 characters), type ("trigger" or "action"), and optionally description (up to 2,000 characters), config, status and enabled. Keys inside config are free. |
edges | Up to 500 edges. Each has id, source and target, and may add type, sourceHandle, targetHandle, label and data. |
connectionIds | Optional. The exact value "kept" marks a file exported with its connection ids kept. Any other value, or no key, means the ids were removed. |
integrationBindings | One { nodeId, integrationType } for each action node that used a connection. The nodeId must match a node, and integrationType must match that node’s config.integrationType when it has one. |
Rules applied on top of the shape:
- Any node config that holds a
webhookUrlmust usehttps://. - By default, export removes
integrationId,integrationConfigand any field that selects a second connection, records the connection type inintegrationBindings, drops the runstatus, and leaves out placeholder nodes and the edges that touched them. Import removes them again, and keeps aweb3Connectiononly when it names a Safe or theneeds-sendermark. - An export made with connection ids kept (
?keepConnectionIds=trueon the download route, or Keep connection ids in the export dialog) leaves those ids in place and sets"connectionIds": "kept". On import, an id is kept only when it is a usable connection of the organization importing the file. Every other id is removed as in a default file, and the response reportsstepsNeedingConnection, the number of steps that lost one and need a connection picked. An import never binds a connection from another organization. - Run history and ownership are not part of the file.