MESA Docs
MESA Homepage
  • Welcome to MESA
    • Installing MESA
    • Dashboard
    • Core Concepts
    • Getting Help
  • Templates
    • Template Library
    • Installing & Editing
  • Workflow Builder
    • Triggers
    • Actions
    • Fields
      • Variables
      • Formatting Variables
      • Liquid Templating
    • Testing
  • Workflow Activity
    • Tasks
      • Troubleshooting
      • Replay
    • Logs
    • Time Travel
  • Best Practices
    • Set Titles & Descriptions
    • Track Time Saved
    • Enable Failure Notifications
    • Avoid Infinite Loops
  • Going Further
    • Plans & Billing
    • Notifications
    • Credentials
    • Understanding the Queue
    • Export & Import Workflows
    • Platform Thresholds & Limits
  • Built-in Tools
    • Activity Log
    • AI
    • API
    • Approval
    • MCP
    • Custom Code
      • Libraries
        • MESA SDK
        • Filter
        • Loop
        • Transform
        • oAuth
        • Shopify
        • ShopifyGraphql
      • FAQ
    • Data
    • Delay
    • Email
    • Filter
    • Form
      • Configure
      • Going Further
      • Technical Notes
    • FTP
    • Image
    • Loop
    • Package Tracking
    • Paths
    • Schedule
    • Scraper
    • SMS
    • Transform
    • Virtual Output
    • Weather
    • Web Request
    • Webhook
  • Apps
    • Airtable
    • Amazon S3
    • Asana
    • Blog Studio
    • ChannelApe
    • Claude
    • ChatGPT
    • Dall-E 2
    • Delighted
    • Digital Humani
    • Discord
    • DocuSign
    • Dropbox
    • Etsy
    • Facebook
    • Fera.ai
    • Gatsby
    • Gmail
      • Send Email
    • Google Analytics 4
    • Google Analytics UA
    • Google Calendar
    • Google Drive
    • Google Forms
    • Google Sheets
      • Add Row
      • Query Rows
      • Update Row
      • Row Created
      • Row Updated (Advanced)
      • Creating New Spreadsheets
      • Technical Notes
    • Gorgias
    • Govalo
    • Help Scout
    • Hubspot
    • Infinite Options
    • Intercom
    • IPDetective
    • Judge.me
    • Katana
    • Klaviyo
      • API Deprecation
    • Loop Returns
    • Loyalty Lion
    • Mailchimp
    • Mailgun
    • Mandrill
    • Mantle
    • Notion
    • Odoo
    • Omnisend
    • Page Studio
    • Pinterest
    • Printful
    • PrintNode
    • QuickBooks
    • Rebuy
    • Recharge
    • Remove.bg
    • Returnly
    • Rivo
    • Salesforce
    • Segment
    • Sendlane
    • Shippo
    • ShipStation
    • Shopify
      • Technical Notes
        • Configuring Your Payload
        • Modifying and Filtering Get Lists
        • Parameters
        • Error Codes
        • Accuracy of orders_count Variable
        • Accuracy of Count Products Action
        • Using the Gift Cards API
        • How to Find a Specific Record in the Testing Interface
        • Order, Customer, and Product Updated Trigger Frequency
    • Shopify Flow
    • Shopify Plus
    • Shopify Retail POS
    • Skio Subscriptions
    • Slack
    • Smartrr
    • Smile.io
    • Square
      • Updating Inventory
      • Frequently Asked Questions
    • Stamped.io
    • Stripe
    • Thanks.io
    • TikTok
    • Tracktor
    • Twilio
    • Uploadery
    • Wonderment
    • Xero
    • Yotpo
    • Yotpo Loyalty
  • For developers
    • Admin API
    • Command Line Interface
    • Embedding templates
  • Frequently asked questions
    • Why isn't the log search returning logs with the search I entered?
    • Is it possible to handle errors or retry steps?
    • How do I handle a failed task?
    • Does MESA auto-save workflows?
    • Can I Use Apps That Don't Have a MESA Connector?
    • Why is my workflow action adding the same data each time it occurs?
    • How do I cancel automations that are already in progress?
    • How do I cancel my MESA subscription or 7-day trial?
    • Can you import code from npm in custom code?
    • Do you have a Slack Community?
Powered by GitBook
On this page
  • Configure
  • Examples of Conditions
  • Going Further
  • Multiple rule sets
  • Technical Notes
  • Advanced rule sets
  • Special values
  • Creating a custom comparison

Was this helpful?

  1. Built-in Tools

Filter

PreviousEmailNextForm

Last updated 6 months ago

Was this helpful?

The Filter tool is a step that lets you stop your workflow based on the conditions you set. A Filter is different than a because it controls whether or not your workflow continues. A Path continues the workflow for a different outcome based on the conditions set.

You should use a Filter in your workflow when there are certain reasons why you would want your workflow to stop or continue or to only act on specific items or instances.

Configure

When using the Filter tool, you will need to select the correct so that MESA can apply the filtering based on the data returned by the previous steps of your workflow.

Examples of Conditions

The Filter tool has fifteen conditions you can use to compare values.

Condition
Description
Example

Equals

A specified field matches an exact value provided

The number of line items in an order is equal to 2

Does not equal

A specified field does not match an exact value provided

The number of line items in an order is not equal to 2

Contains

A specified field includes a certain value within its content, regardless of its position in the text

An order's tags contains a "VIP" tag

Does not contain

A specified field does not include a certain value within its content, regardless of its position in the text

An order's tags does not contain a "VIP" tag

Is empty

A specified field has no data, meaning it is blank or null

An order's tags are empty

Is not empty

A specified field has data, meaning it is not blank or null

An order's tags are not empty

Is greater than

A specified field is numerically higher than a given value

A customer's order count is more than 2

Is less than

A specified field is numerically lower than a given value

A customer's order count is less than 2

Is less than or equal to

A specified field is numerically lower than or exactly equal to a given value

A customer's order count is less than or equal to 2

Is greater than or equal to

A specified field is numerically higher than or exactly equal to a given value

A customer's order count is greater than or equal to 2

Is in

A specified field matches any one of the values within a defined list or content

US is in a customer's country code address

Is not in

A specified field does not match any one of the values within a defined list or content

US is not in a customer's country code address

Is after [date/time]

A specified date/time value falls later than a given date or time

An order was created after 10/24/24 12:00AM

Is before [date/time]

A specified date/time value is earlier than a given date or time

An order was created before 10/24/24 12:00AM

Is on [date]

A specified date value matches exactly with a given date

An order was created on 10/24/24

Please note that values will be case-sensitive

Going Further

Multiple rule sets

You can apply additional rules by clicking the Add Rule button.

Define if all rules need to match (AND), or if only one of your rules need to match (OR). You can add an unlimited amount of rule sets to build complex comparison logic.

Technical Notes

Advanced rule sets

If you use a combination of AND or OR operators, the logic will read from top to bottom. For example, a AND b OR c AND d will be executed as ((a && b) || c) && d.

AND Filter will only proceed if both conditions are true.

  • Example: Order created is more than $5 AND it is the customer's first order.

  • Action: If both conditions are met, the task continues. Otherwise, it stops.

OR Filter will proceed if at least one of the listed conditions is true

  • Example: Order created is more than $5 OR it is the customer's first order.

  • Action: If one condition is met, the task continues. Otherwise, it stops.

For more fine-grained control, separate your AND comparisons and OR comparisons into separate Filter steps.

Special values

The following values will be automatically cast from strings to their respective types:

  • true

  • false

  • null

Creating a custom comparison

You can further adjust the functionality of a Filter step by clicking the Edit code link in the Configure conditions of the step.

When using dates or time frames as a condition or rule within the Filter step, you have the ability to use .

specific date formats
Path
variables