api/run.yaml on its own can say “start, then check once”. It cannot say “check until”.
These keys are how you say it.
The pattern is the same each time. You describe how that particular API works, and the
platform does the looping.
None of these changes the node’s
kind, and all of them work on either. A PromiseNode
can walk forty pages and still settle once. A CallbackNode that streams its final answer
can page through a lookup first.
What decides kind is the last call’s transport, because that is the node’s answer.
Every earlier call settles by definition, so an earlier step can do anything at all. See
Node types.
The capabilities
paginate
Walk the pages and accumulate the results.
api/run.yaml
cursor reads the next-page token out of a reply, and a falsy result ends the walk. into
names the query parameter it goes back as, and the first request carries none.
For a numbered API use strategy: page, which also needs size so the platform can tell a
full page from the last one. strategy: offset counts records instead of pages. in: body sends the page number in the
request body for an API that reads it there rather than from the query.
The reply becomes { items, pages, truncated }, not the last page’s body. The
accumulation is the answer, and handing back the final page would quietly lose the rest.
truncated is true when a limit stopped the walk with more still to fetch. A consumer can
tell “that is everything” from “that is the first hundred”.
There is a ceiling of 100 requests per call whatever max says, because an API that keeps
returning the same cursor would otherwise loop forever.
chunk
The mirror of paginate. That one loops because the API decides how much comes back. This
one loops because the API limits how much you may send at once.
batch, so you describe one request and the platform repeats it.
size is the API’s limit, not a preference. Airtable rejects an eleventh record,
HubSpot takes 100, Salesforce 200.
The reply is { sent, batches, results, errors }, and partial success is normal. One
rejected batch out of ten is neither a failed call nor a successful one. The batches before
it have already landed and cannot be taken back. A failing batch is recorded and the
walk continues, so check errors rather than assuming all or nothing.
There is a ceiling of 200 per batch whatever size says.
poll
Start work, then ask until it is done. Every crawler, render farm, transcription and batch
import works this way.
url is an expression over the start reply, which is where the job id is.
The reply is the final status payload, not the start reply. The start reply is a receipt
carrying a job id. Handing that back would give events a handle where it expected the
answer.
Always write failed. Without it, a job that fails terminally is polled until it runs
out of attempts, and you get a timeout instead of the reason.
until is asked of the start reply first, before any polling, because some endpoints finish
inline and return the completed result with no job id at all. A manifest that assumed a
handle would fail on exactly the fast case.
intervalMs is capped at 60 seconds and maxAttempts at 300.
state
Sometimes an entry in the list is not a request at all.
merge is read-modify-write rather than a replace, because more than one writer shares a
key and replacing it wholesale would drop their fields.
drain takes items permanently, so nothing is processed twice. max defaults to 25 and is
bounded so one run cannot pull an unbounded queue.
Write key as the logical key with no prefix, usually built from scope. The
deployment namespace is added by the platform, so a manifest cannot forget it and write
somewhere nothing reads.
save is the exception: it takes no key, and lint refuses one. It belongs to this run,
and a later node reads it as saved.<nodeId>.
loop
LoopStart and LoopEnd are a pair, and loop is how each half keeps its place. It makes
no request.
key is the id of the LoopStart the loop belongs to, so LoopStart passes
{{ scope.nodeId }} and LoopEnd passes the paired id from its own settings. The run is
supplied by the platform, so a loop can never reach another execution’s state.
One capability rather than a handful of state operations, which is the point. Expressing
this by hand took eight different store operations, and the ordering lived in whoever wrote
it.
presign
Makes no request at all. It computes signed URLs from the credentials and the clock.
for, even for one file. A
listing needs a link per object and a single file needs one, and making those different
shapes would push the difference onto every reader.
It earns its place in the ordered list for the same reason state does: listing a bucket
and then minting a link for each object found is one sequence.
transport: ws
transport: ws is for a service you hold a conversation with rather than call: realtime
voice, above all. Three lists cover the whole lifecycle, and each holds messages you send.
open is a list because services disagree about how much of a handshake there is. One sends
a single configuration message; another needs an ordered sequence where each step is only
valid after the one before.
close matters more than it looks. A service that expects a teardown and never gets one is
left holding a session open, and billing for it.
send is deliberately general rather than tool-shaped. toolExchange counts turns, and a
turn is one model call, which is not an idea that exists on a socket held open for a whole
conversation. A reactive send covers a tool result going back, a response asked for, or a
keepalive, without importing the wrong model of time.
Audio is separate. api/audio.yaml binds a voice node to the platform’s audio lane, because
binary audio cannot travel the same path as everything else. Everything that is not audio
belongs in events.yaml as usual.
Declare what you use
A package declares these inrequires, alongside auth and transport.
package.yaml
paginate, state and loop name the strategies or operations used. chunk and poll
are switches.
Lint refuses a node that uses a capability its package does not list. Without that, a
paginated call would fetch one page and stop, a cache would look permanently cold, and a
queue would never drain, with nothing anywhere reporting it.
Real examples
Next steps
Testing
Run the node against the real service before you wire it up.
api/run.yaml
Every field a call takes, generated from the schema.

