The three node types that turn a workflow from a straight line into something that can handle real data.
For Each
Runs an action once for every row that matches. This is how a workflow acts on a set rather than a single record.
Typical uses: every overdue invoice for a customer, every open task on a closing deal, every member of a team.
- Add a For each node.
- Define what it iterates over - the records to match.
- Attach the action to run per row.
Caution
Check the size of the set before activating. A loop over "every contact" on a workspace with forty thousand contacts is forty thousand actions. If those actions send anything, that is forty thousand messages. Narrow the set, and dry run to see how many rows match.
Loops are the most expensive node. Prefer a narrower trigger over a broad loop wherever both would work.
Transform
Computes a variable from other values, mid-flow. Use it when the value you want to act on is not a field on the record.
Common cases:
- Deriving a total from several fields.
- Normalising a value before comparing it - trimming, changing case.
- Building a string for a message from several parts.
- Turning a date into a count of days.
The transform's output is available to every step after it, so this is also how you avoid computing the same thing twice.
Variables And Context
Each step passes its context to the next. A trigger contributes the record that fired it; each subsequent step can add to it.
This is why send actions do not ask you to fill in every value: variables are collected from the step context automatically and filled into the template. You can override any of them per step when you need something specific.
Tip
Compare two fields by transforming one into a variable first, then testing the variable in a condition. Conditions test a field against a value, not a field against another field, and this is the way around it.
Interpolation
Values from the context can be dropped into text using placeholders, so a message body or a field value can carry the record's specifics without hard-coding them.
Keep interpolation out of templates where you can. A template carrying its own copy of a price becomes wrong quietly; a variable passed in stays correct. See Communication Templates.
Designing A Flow That Uses All Three
An example: when a deal is won, thank the champion and close out its open tasks.
- Trigger - deal won.
- Transform - build the thank-you message parts from the deal and the contact.
- Action - send the email to the contact.
- For each - every open task on the deal.
- Action - close the task.
- End.
Note the order: the send happens before the loop. If the loop fails halfway, the customer has still been thanked. Put the step that matters most to the customer earliest, because a workflow that fails partway leaves everything before the failure done and everything after it undone.
What Happens When A Step Fails
Execution stops and records the error. Steps already completed are not rolled back. A workflow that creates a record and then fails leaves the record behind.
Design for this. Order steps so a partial run leaves a sane state, and prefer creating things late.
Common Questions
Can a loop contain a condition? Yes. Build the per-row logic inside the loop.
How do I know what variables are available? The builder surfaces the variables from the step context as you configure a node.
Can a transform call out to something external? No. Use the webhook action for that.
My loop ran zero times. The set matched nothing. Dry run and check what it resolves to - usually the filter is narrower than intended, or the field it filters on is empty.
Did this answer your question?
No, ask a person