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
  • How to Format Variables
  • Formatting Options

Was this helpful?

  1. Workflow Builder
  2. Fields

Formatting Variables

PreviousVariablesNextLiquid Templating

Last updated 1 month ago

Was this helpful?

Formatting variables is a way to filter and format your that produce strings, numbers, arrays, and dates.

This is a great feature to use when you want to simplify complex data like dates produced in formatting (2008-01-10T11:00:00) and have the values converted to a more readable format like MM/DD/YY (10/01/08).

How to Format Variables

To format variables, click the vertical 3-dot icon at the right of any variable to open the Step Options, then click Format.

You will then be able to format your variable's output using the formatting options that populate within the sidebar menu.

Formatting Options

Within the Formatting Options sidebar menu, you'll be able to adjust the value your variable produces based on its type.

Date
  • Add time: Adds a specified amount of time to a date.

  • Format: Converts a date into a different format.

  • Start of day: Converts a date to the start of the day (00:00:00).

  • End of day: Converts a date to the end of the day (23:59:59).

  • Subtract time: Subtracts a specified amount of time from a date.

  • Time between: Calculates the time difference between two dates.

  • Time since: Calculates the time difference from a date to now.

String
  • Append: Adds text to the end of a string.

  • Capitalize: Capitalizes the first word in a string and downcases the remaining characters.

  • Downcase: Converts all letters to lowercase.

  • Prepend: Adds text to the beginning of a string.

  • Remove last: Removes the last instance of a substring inside a string.

  • Replace: Replaces all occurrences of specific text within a string.

  • Replace last: Replaces only the last occurrence of specific text within a string.

  • Split: Breaks a string into an array based on a separator.

  • Strip: Removes spaces from the beginning and end of a string.

  • Strip HTML: Removes all HTML tags from a string.

  • Upcase: Converts all letters to uppercase.

Math
  • At least: Ensures a number is no smaller than a set minimum.

  • At most: Ensures a number is no larger than a set maximum.

  • Divided by: Divides a number and keeps the same type (integer or decimal).

  • Minus: Subtracts one number from another.

  • Plus: Adds two numbers.

  • Round: Rounds a number to the nearest whole number.

  • Times: Multiplies a number by another number.

Array
  • Compact: Removes empty values from an array.

  • Concat: Combines two arrays into one.

  • First: Retrieves the first item in an array.

  • Join: Combines all of the items in an array into a single string, separated by a space.

  • Last: Retrieves the last item in an array.

  • Map: Extracts values from a specific property in an array of objects.

  • Size: Returns the length of a string or the number of items in an array.

  • Sort by an array item property: Sorts the items in an array in case-insensitive alphabetical order.

  • Sum: Adds up all numbers in an array.

To apply your formatting, fill out one of the options based on the type you're working with and click apply.

You can add multiple combinations of formatted options to create the precise variable value that you need. They will be listed in the order that you apply them within the top of the Formatting Options sidebar.

variables
ISO 8601 date and time