Locoia
  • Overview
  • Account and User Settings
    • User types
    • Adding Users
    • Teams
    • Access Permissions
    • 2 Factor Authentication 2FA
    • Versioning and Snapshots
    • Activity Log
  • Reset your Password
  • Invoices and Payments
  • Automation
    • Flow Builder
      • Flow Building Best Practices
      • Jinja Template Language
        • Jinja: (Custom) variables, wildcards and functions
        • Magic Code Samples
      • Connectors & APIs
        • Titles and References
        • Referencing data of objects, lists, arrays - how to pass data dynamically
        • Accessing Objects with JSONPath
        • Merging nested JSON objects
        • Parsing JSONs from String
        • Response Headers & Status Codes
        • Custom Data Fields
        • Wildcard API calls and actions
        • Response cleaning
      • Text Strings, Date & Time, Numbers and Currencies
        • Text and Strings
        • Dates & Time
        • Numbers (Thousand Separators, Currencies)
      • Email-formatting
      • Code Fields
      • Running single Flow steps
      • Flow run data retention, logging, and error notifications
      • Advanced View
      • Dynamic Title
      • Custom Error Handling
      • Error Handling Flows
      • Automatic Pagination
    • Flow Debugger
      • Automatic Retrying
      • Run Flows again
      • Troubleshooting Flows
    • Community Library
  • Connectors & Helpers
    • Connectors
      • Monday.com
      • ActiveCampaign
      • Aircall
      • Allthings
      • Amplitude
      • Animus
      • Assetti
      • Awork
      • AWS RDS Database - How to connect
      • bubble.io
      • Casavi
      • Chargebee
      • CleverReach
      • comgy
      • commercetools
      • Everreal
      • Exact Online
      • Facebook Marketing
      • Fahrländer Partner
      • FastBill
      • FILESTAGE.io
      • Freshdesk
      • Freshsales
      • Google Ads
      • Google Ads Lead Form
      • Google Analytics
      • Google Chat
      • Google Drive
      • Google Sheets
      • Gmail
      • HubSpot
      • Heyflow
      • iDWELL
      • ImmobilienScout24
      • Instagram Ads
      • Intercom
      • klaviyo
      • Kiwi Opening Doors
      • Klenty
      • Klipfolio
      • Kolibri CRM
      • konfipay
      • KUGU
      • Shopify
      • S3 AWS
      • SQS AWS
      • Lambda AWS
      • Learnster
      • lexoffice
      • LineMetrics
      • Linkedin
      • Locoia
      • Notion
      • MailGun
      • Makula
      • Microsoft Dynamics 365
      • Microsoft OneDrive
      • MixPanel
      • MongoDB
      • Odoo
      • OnFleet
      • OnOffice
      • Oracle NetSuite
      • Outbrain
      • Quickbooks
      • Trello
      • PandaDoc
      • Personio
      • Pinterest Ads
      • Pipedrive
      • Plentific
      • PriceHubble
      • relay
      • REALCUBE
      • Sage ERP
      • Salesforce
      • SAP
      • Scoro
      • Seafile
      • sevDesk
      • SharePoint
      • SharpSpring
      • Slack
      • Snapchat Marketing
      • Snowflake
      • Teamleader Focus
      • Teamwork.com
      • Tableau
      • TikTok
      • TinQwise
      • The Trade Desk
      • Twitter
      • Typeform
      • WordPress
      • Xero
      • Youtube
      • Zendesk
      • Zoho CRM
      • Zoom
    • Helpers
      • Scheduler
      • Webhook
      • Dict Helper
      • Spreadsheet Helper
      • REST Helper
      • Boolean Helper
      • Multi Case Helper
      • Looper
      • FTP Helper
      • CSV Helper
      • XLSX Helper
      • Mail Sender
      • Flow Trigger
      • File Storage Helper
      • Terminate Helper
      • Delay Helper
      • SQL Connector
      • PDF Helper
      • Zip Helper
      • Data Warehouse Helper
      • XML Helper
      • Form Helper
      • Arrow
      • Error Arrow
    • Authentication Types Available
      • Setting up authentication
      • OAuth1
      • OAuth2
      • Refreshable token
      • AWS Signature
      • Basic Auth and Other Simple Authentication Methods
      • How are API versioning and API updates handeled?
      • Custom OAuth2 clients (apps)
    • Building Connectors
      • Base Connector Setup
        • Connector Auth Validation
        • GraphQL APIs
        • Rendering with User Input
      • Building Connector Actions
        • Actions Examples
      • Search Automation
      • Pagination Automation
      • Uploading Files in Actions
      • Working with SOAP APIs
    • Super Actions
    • Webhook Trigger for Connectors
    • Data Mapping and Env Variables
  • Embed - White Label Portal
    • Embed Overview
      • 1. Embed Flow
        • 1.1 Creating Embed Flows
        • 1.2 Updating Embed Flows
        • 1.3 Embed Error Handling
        • 1.4 Setting up Callbacks for Integration activation/deactivation
        • 1.5 Setting up Remote search
        • 1.6 Setting up End User logs
      • 2. Configure Embed
        • 2.1 Embed Integration via SSO
        • 2.2 Proprietary connector setup
        • 2.3 Sharing level
        • 2.4 Consent screen
        • 2.5 Account Secrets
        • 2.7 Further settings
      • 3. Integrate Embed
        • 3.1 iframe vs native embed
        • 3.2 Customizing CSS
        • 3.3 Events emitted from iframe to parent window
      • 4. Embed for End User
        • 4.1 Embed Remote Search
        • 4.2 Embed End User Logs
      • 5. Test Embed Configuration
        • Testing example
      • 6. Embed Integrations and Connector Auths
    • Embed FAQs
  • Data and Dashboards
    • Dashboards & Insights
      • Introduction to Dashboards
      • Introduction to Insights
      • Introduction to Data Sources
      • Dashboard Filters
      • Insight Marketplace - Using Pre-Built Insights
      • Writing SQL Queries
      • Useful SQL Examples
      • Charts
        • Line Chart
        • Bar and Horizontal Bar Chart
        • Stat Card
        • Pie Chart
        • Gauge Chart
        • Donut Chart
        • Stacked Bar, Horizontal Stacked Bar, and Normalized Horizontal Stacked Bar
        • Multiple Line Chart
        • Pivot Table
        • Map Chart
  • Best Practice Guides
    • Integration Best Practices
    • Integration Check List
    • CSV Files in Excel
    • Multi-Tenant Flows
    • On-Premise Integrations
    • Database Connection Setup
    • Data and General Security
    • Using Tags
    • FAQ
  • API
    • Locoia API Authentication - Personal Access Token
    • Create Connector Authentication
  • Contact us
  • Status of Service
  • Data Privacy
  • Imprint
Powered by GitBook
On this page
  • Overview
  • Actions
  • Comparison Values
  • Comparison types of the boolean helpers
  • Boolean helpers in Loops
  • Example
  • Advanced Data Comparison
  • Length of a list
  • Checking if a string is empty
  • Checking that a variable is defined
  • Checking that multiple variables are defined

Was this helpful?

  1. Connectors & Helpers
  2. Helpers

Boolean Helper

Making decisions based on comparing data

PreviousREST HelperNextMulti Case Helper

Last updated 1 year ago

Was this helpful?

Overview

Oftentimes, you want to make a decision based on data you got in a previous step. This can be done with the Boolean Helper. Comparison types like greater, smaller, etc. are explained . It's possible to compare different values like a reference with a static value. See this

Actions

The Boolean Helper has only one default action - Make boolean-like comparison.

In the screenshot below, you see a typical example of where and how to use a boolean helper:

To get started, simply enter the data value you want to compare to in Value A and the to be compared with the value in Value B. As for the Comparison Type select the one that suits your use-case. The boolean helper fully supports our Jinja2 syntax, so you can dynamically insert values for comparison.

Comparison Values

You can either select two relative values in Value A and Value B, meaning you can reference data from a previous step of the automation flow, or you can enter static data. E.g. in the example screenshot above, you can see Value A is a relative reference to a previous step indicated by the Jinja parenthesis {{ }}. Value B on the other hand, has just the word "true" which is static and not a reference.

These are the possible combinations:

Value A
Value B
Common example

{{ reference }}

{{ reference }}

Compare whether the new data matches the existing data, e.g. to check whether a CRM System needs to be updated.

{{ reference }}

static

Check whether a user's property is equal to a set value. For example, test if a user is part of a specific customer group.

static

{{ reference }}

The same as line two so not really needed.

static

static

This can be convenient to add manual gates into your flows. For example, you might want to send out emails to customers, but only once your Flow is live, and not for testing. So you can compare True to False, which will make the flow end at the boolean helper if nothing is connected to the false arrow.

Comparison types of the boolean helpers

The boolean helper has many comparison types for values:

  • greater - can be applied to any number or datetime format

  • smaller - can be applied to any number or datetime format

  • equal - can be applied to any number or datetime format

  • greater_equal - can be applied to any number or datetime format

  • string_is - can be applied to any string

  • string_begins - can be applied to any string

  • string_ends - can be applied to any string

  • string_includes - can be applied to any string (not visible on the screenshot below, but is in the app)

Screenshot from the app:

Boolean helpers in Loops

Example

Let's suppose you have a list of users who contacted you on your website and depending on whether they already exist, you want to send a different email to them:

Advanced Data Comparison

Thanks to Jinja, you are able to do a lot of different data comparisons with the boolean helper. Let's go over a few of them:

Length of a list

{{ my_list | length }} will return the length of a list. An empty list will always have a length of 0. So by comparing the length against a number of you choosing, you can either ensure that a list has at least one entry (>0), or that it meets a specific length requirement you have.

Checking if a string is empty

If you like to check whether a variable returns an empty string, you have to set Value B to {{ "" }}. In this example, it is checked that a my_variable is not an empty string. If my_variable is an empty string it will return false.

Checking that a variable is defined

{{ my_variable is defined }} will return either True or False, which you can compare against by using the "equal" comparison type.

Checking that multiple variables are defined

You can chain multiple tests together in a single Jinja statement and return some conditional value. If you want to check that, for example, 2 of your variables are defined before the flow proceeds, you can use the following statement:

{% if var1 is defined and var2 is defined %}
  True
{% else %}
  False
{% endif %}

Then simply compare against True with the equal comparison, and your flow will only go along the TRUE arrow when both values are defined.

Boolean helpers are often used as part of , when there is a larger list, dict or array of data, where each data record has a particular information based on which the boolean helper can make a decision and do something.

To figure out the length of a list, you can use the Jinja Builtin Filter :

loops
| length
below
table