Building workflows

Node execution flow

How a workflow actually runs: what fires first, how one node's output becomes the next node's input, and when template expressions are resolved.

The order of things

  1. A trigger fires. An incoming message, an API call, a scheduled interval, a spreadsheet row. This opens a session.
  2. The trigger produces output — the message body, the request payload, the row.
  3. The next node is compiled. Any template expressions in its fields are resolved against what is available now.
  4. That node runs and produces its own output.
  5. Steps 3 and 4 repeat along the wires until a response node is reached.
  6. The response is sent and the session ends — or waits for the next message, if it is a conversation.
Each node is compiled with what is available, then run.

Compilation happens per node, at run time

This is the part worth internalising. A template like {{POUT response.title}} is not resolved when you save the workflow — it is resolved at the moment that node is about to run, using the output the previous node just produced.

That is why the same workflow behaves differently for different inputs, and why the compiled log is the right place to debug: it shows what each expression actually became on that run.

If an expression points at a key the previous node did not produce, it resolves to nothing and the node runs with an empty value. An AI node given an empty prompt will still answer — just not usefully. Check the compiled log before assuming the model is at fault.

Where the AI node differs

An AI node with tools attached does not run once and finish. It may:

  1. Read its input and its attachments.
  2. Decide a tool is needed, and call it with parameters it fills in itself.
  3. Read the tool's result.
  4. Decide whether another tool call is needed.
  5. Produce a final answer once it has enough.

All of that happens inside the one node before its output reaches the next. It is also why an agentic workflow's token usage is not proportional to the number of nodes — see Usage and analytics.

Sessions and memory

Without a memory attachment, each run starts blank — the model sees only this message. With one, the conversation is carried through the session, which is what makes a bot able to answer "and what about tomorrow?".

Branching

A Decision node evaluates a condition and sends execution down one path. Only the taken path runs; nodes on the other branch are not executed and produce no output.

What is encrypted

Your workflow script and your credentials are both stored encrypted. Credentials are injected at compile time through the CREDENTIAL keyword rather than being stored in the node itself — see the credential store.