Locoia
Search…
Flow Building Best Practices
Learn how to build robust and scalable flows.

Flow status

Once you start building a new flow, its status is always draft. In this mode, you can build, debug and test. Once ready, set the status to live. Once a flow is set to live, the scheduler will actively schedule and execute flows. This is not the case in draft or paused. So the status live should always be used for all actively running flows. If a flow throws multiple errors or you want to actively prevent it from executing use the status paused. You can change the status either in the upper left corner of the FlowBuilder by clicking on the button:
Status button
... or by clicking on the edit button:
Run Now and Edit Buttons

Flow triggers

There are several ways to trigger (run) a Flow:
    1.
    Manual trigger - Clicking the "Run Now" button on the Flow Builder (visible in the screenshot above)
    2.
    Schedule trigger - via Schedule Helper
    3.
    Webhook trigger - via Webhook Helper or Connector Webhook Trigger
    4.
    Flow triggering another flow - via Multi Flow Trigger

Naming flows

Always include your initials MM for Max Miller as well as a date or version in the flow name: "Salesforce contacts sync with Zendesk MM 04.03.2020"

Default values

In order to easily check for variable existence and default to an empty string, use this pattern:
1
{{ property.country | default() }}
Copied!
This defaults to an empty string if the field/value for country doesn’t exist.
1
{{ property.country | default("Germany") }}
Copied!
This defaults to Germany. This is particularly useful when dealing with an ERP System for example, and your Sales team only filled the country field when it's not Germany.

Further best practices

    Include some comments in the description of the Flow under the edit button for everyone to know what the flow is about
    Edit each individual Connector description text on the workspace to tell others (or yourself when you return a month later) what each step does
    Improve the short-references (e.g. zen1 for Zendesk); ideally, rename this to zendeskContacts or zendesk_contacts, depending on your preference of camel case vs. snake case
    Once a flow is ready to be deployed, set the status to "live" to let everyone know it is ready to go
    Reduce the flow in its components and try running (debugging) one step at a time rather than building everything at once. Once the first steps work, add in more functionality.
    Initially, use test-data sets that are rather small, just to test the functionality of each step properly. For CSV, XML, or JSON files you can e.g. upload test data to AWS S3, Google Drive, or Dropbox and use them. If you query a REST API, try filtering e.g. by date range to keep the data set small.
    Look at other flows you already built or find in a template on the Flow Template Marketplace.
    If you send emails, only send them to yourself for testing purposes.
    If you need more space, you can ZOOM in and out by pressing the CMD button on a Mac or the CTRL button on a PC and zoom in or out with your mouse.
    You can copy individual connectors just by CMD/CTRL + C and CMD/CTRL + V after clicking on a connector. It will copy it including all its settings.
    CMD/CTRL + Z and CMD/CTRL + Shift + Z can be used to revert graphical adjustments in Flows (moving connectors and helpers on the flow builder workboard)
    Once a Flow is ready to run, in the Flow Builder edit dialog, include a list of comma-separated email addresses you want notified in case an error occurs during execution.
Last modified 2mo ago