Four kinds of steps
How a step is found again
On each call, the SDK matches your steps to the saved ones by kind and name, in the order your code reaches them. So a name can repeat: the secondstep.run('send') gets the second saved send.
A sleep takes its duration as its name, and a wait takes its key.
Keep the path the same
Code outside steps runs again on each call, so it must take the same path every time. Anything that can change between two calls, like the time, a random ID, or an API response, goes in a step:Results are saved as JSON
A step returns what its function returned, passed through JSON. ADate comes back as a string, and undefined as null. The first call gets the same value as every call after it.
Loops and parallel steps
Steps work in loops. Each batch below is saved on its own, so a load that stops goes on from the last batch that made it:Steps in your own functions
You can callnelkap.step from any function your workflow calls. The SDK finds the run on its own.