Keep the rules below in mind to avoid unexpected behavior and failures.
To learn more about how the internal of Upstash Workflow works, see how Workflow works.
Your endpoint runs many times per workflow run. Only code inside a step runs exactly once.
Variables assigned inside a step are lost on the next call. Return the value instead.
Database reads, time checks, and randomness must produce the same result on every call.
Steps can be retried. Running one twice must have the same effect as running it once.
A workflow run can have at most 1,000 steps and a 100 MB context.
Never call context.run, context.sleep, or context.call inside another context.run.
A workflow without any context.run fails with Failed to authenticate Workflow request.
Promise.all works for parallel steps, but Promise.any isn’t supported.