Skip to Content
WorkflowsWorkflow Definition

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

KeyRequiredDescription
idYesUnique within the workflow. Other nodes reference it in {{@nodeId:Label.field}}.
typeYes"trigger" or "action". Every node that is not the trigger is an "action", including conditions and loops.
positionIn an export fileCanvas 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.typeYes in an export fileThe same value as type. The API fills it in when you send only the outer type.
data.labelYesThe display name. It is the Label part of a template reference, and the editor shows it on the node.
data.descriptionNoFree-text notes.
data.configYesThe 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.enabledNofalse skips the node when the workflow runs. Omitted means enabled.
data.statusNoRun 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/action for a plugin or protocol action, for example web3/check-balance, discord/send-message or aave-v3/supply. Every action type and its fields are listed in the action reference.
  • The name of a system action, for example Condition or HTTP 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

KeyRequiredDescription
idYesUnique within the workflow.
sourceYesThe id of the node the edge leaves.
targetYesThe id of the node the edge enters.
sourceHandleFor branching nodesWhich output of the source node the edge uses.
targetHandleNoAccepted and stored. Nodes have a single input, so it is normally omitted.
type, label, dataNoPresentation only.

Set sourceHandle on every edge that leaves a branching node and omit it everywhere else:

Source nodesourceHandleThe 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:

triggerTypeStarts a run whenMain config keys
ManualYou run it from the editor, the API or the MCP server.None.
ScheduleThe cron expression or interval fires.scheduleCron or scheduleIntervalSeconds, scheduleTimezone
WebhookIts webhook URL receives a request.webhookSchema, webhookMockRequest
EventA contract emits the event.network, contractAddress, contractABI, eventName
BlockA chain reaches the block interval.network, blockInterval
TransferA TIP-20 transfer with a memo reaches a watched Tempo address.network, contractAddress, recipientAddress, memo
Pyth PriceA 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 scheduleIntervalSeconds and leaves scheduleCron empty. When scheduleIntervalSeconds holds a valid value it is used and scheduleCron is ignored. scheduleTimezone defaults to UTC when it is absent.
  • An Event trigger on a Solana network takes programId, idl and eventName instead of the contract keys.
  • An Event trigger can name a protocol event instead of a contract address, with _eventProtocolSlug and _eventSlug and no contractAddress. 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 no body, headers, method or query wrapper.
  • A trigger’s output is stored as { success, data }. A reference such as Label.triggeredAt and one written Label.data.triggeredAt both 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.

actionTypePurpose
ConditionBranch on a boolean expression or on a rule group. Outputs result.
HTTP RequestCall an HTTP endpoint. Keys include endpoint, httpMethod, httpHeaders, httpBody, timeout, failOnError, retryAttempts and retryDelay. Outputs status and data.
Database QueryRun SQL against a connected database. Keys: integrationId, dbQuery, plus optional dbSchema, connectTimeout and retries. Outputs rows and rowCount.
For EachRun 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.
CollectGathers the results of a For Each into results and count.
State Get, State SetRead and write a key of the workflow’s persistent state. See Workflow state.
Trip Circuit Breaker, Reset Circuit BreakerEngage 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, a logic of "AND" or "OR" (anything else is read as "AND") and a rules list. An entry of rules is either a rule or a nested group; an entry with rules or logic is read as a group.
  • A rule has an id, leftOperand, operator and rightOperand. Operands are literals or template references. An operator that takes no right operand (the unary ones) leaves rightOperand empty.
  • Ids missing on save are generated. Keep them unique.
  • operator must be one of the exact keys on the system actions reference, for example ===, <, contains, isEmpty, arrayContains or matchesRegex. A few spellings such as equals, greater_than and is_empty are 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.group produces a real expression, it runs and condition is ignored. Otherwise the text in condition runs.
  • 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:

  • nodeId is the upstream node’s id. Characters other than letters and digits are treated as _ when the output is looked up, so ids that differ only in punctuation collide.
  • Label is the upstream node’s data.label. In an action’s config the lookup uses nodeId; 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.
  • field is a dotted path with numeric indexes, for example data.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 inside data and then inside result.
  • {{@__system:System.unixTimestamp}}, unixTimestampMs and isoTimestamp read 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": [] }
KeyRules
versionMust be 1.
exportedAtAn ISO 8601 datetime. Required.
workflow.name1 to 200 characters.
workflow.descriptionOptional, up to 2,000 characters.
nodesUp 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.
edgesUp to 500 edges. Each has id, source and target, and may add type, sourceHandle, targetHandle, label and data.
connectionIdsOptional. The exact value "kept" marks a file exported with its connection ids kept. Any other value, or no key, means the ids were removed.
integrationBindingsOne { 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 webhookUrl must use https://.
  • By default, export removes integrationId, integrationConfig and any field that selects a second connection, records the connection type in integrationBindings, drops the run status, and leaves out placeholder nodes and the edges that touched them. Import removes them again, and keeps a web3Connection only when it names a Safe or the needs-sender mark.
  • An export made with connection ids kept (?keepConnectionIds=true on 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 reports stepsNeedingConnection, 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.