Build more advanced flows than ever
Today we are releasing one of our biggest product updates ever with a dramatically improved flow designer. You can now build advanced logic to automate your business – including nested conditional branching, filtering, looping and more.
Previously, you could have a single if-else statement, but that was the full extent of logic that was supported. Now you can add a second (or third, etc…) condition inside of another. To do this, there is a new option to Add a condition, even when you are inside another condition:
This means that if you need to check if an order size is under a certain amount and if you have sufficient inventory you can do that now. Or, if you want to do an approval with multiple outcomes (such as including the ability to re-route), even that is possible today.
In the above example, we built an approval flow that has two conditions. First, we check if the request is too soon, at which point we automatically reject the request. Then, we send an approval email to the manager, and then either approve or reject the final request based on the manager's response.
Apply to each
Frequently, you will get a list of items returned by an action. For example, you could get a list of email attachments for new emails, or a list of search results from a search API. An apply to each loop makes it possible to control the list that you repeat over. You can also use a condition inside of an apply to each to filter the array. To add new control flow concepts like Apply to each or Do-until, first click New Step and then select More.
This will add a shape to the designer that you can choose an array in.
A do-until loop allows you to repeat a step until a certain condition is met. The most common reason to use this is in approval scenarios. For example, you can create a new record in a database, wait until a certain field in that record is “Approved”, and then continue the flow.
There is a single native filter step that can make sure that every item in the list matches some expression that you define, for example, that importance is High.
Compose string variables
If you have a single value that you want to re-use many different times throughout your flow (for example, a single message that you want to reuse in several emails you send out), you can now compose a string variable:
Finally, scopes are a simple way to group two or more actions together. When you put actions inside a scope they can be visually collapsed so that you cake make the presentation inside of the designer much simpler.
With these additions, you should be able to build out a wide variety of new, different logic. It’s your feedback as preview users that helps us know what’s important to build next. In fact, additional control flow was the single most requested feature in the feedback forum. Please tell us what you need us to work on next by continuing to suggest ideas and use cases on the forum.