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
  • What is a variable?
  • Find and Use Variables
  • Advanced Variable Use
  • Using global store settings
  • Formatting tags with Liquid
  • Dates and Times

Was this helpful?

  1. Workflow Builder
  2. Fields

Variables

PreviousFieldsNextFormatting Variables

Last updated 10 months ago

Was this helpful?

What is a variable?

Variables are representations of data, and when a workflow runs, variables are replaced with real data. Think of variables as the stand-in for the data you want to use, and once the show begins (we hear you yelling action!) that's when the real data comes in to steal the scene.

Find and Use Variables

Let's begin with an example! Using one of our pre-built templates, . Let's look at the SMS Send Message step. Here, you can see that the Order Created > Phone variable is used. When this workflow runs, this will be replaced with your customer's actual phone number.

Where do you find the variable that fits the part? You can find the Variables menu by clicking the [<>] icon in the To phone number field. A menu will be displayed on the right-hand side.

In the right-hand menu, feel free to use the search bar for "Phone" to find the Phone variable easily.

Since the variable data comes from an earlier step in the workflow, we'll want to select the step that best fits what we're looking to use for the customer's phone number. You'll notice there are several options. In this example, it's best to select the variable Order Created > Phone.

Once triggered, the order data will determine the customer's phone number for the SMS notification. For example, if an order is received from Jenny Smith (555-867-5309), the workflow will send a text message to 555-867-5309 when the order is flagged as fraudulent. In this particular case, it is recommended to add your phone number so you are notified of these flagged orders.

Advanced Variable Use

Next, we're going to get technical about variables you can create without the variable menu.

Using global store settings

Use the {{context.shop.PARAMETER}} variables to pull in settings from your Shopify store. Some common variables:

  • {{context.shop.email}}: Your store's contact email. Set in the General page of your Shopify settings.

  • {{context.shop.domain}}: Your store's url. Example: www.mystore.com if you have a custom domain, mystore.myshopify.com if you have not configured a custom domain.

  • {{context.shop.myshopify_domain}}: Your .myshopify.com domain. Example: mystore.myshopify.com.

  • {{context.shop.name}}: Your store's name. Example: My Store.

Formatting tags with Liquid

In this example, we replace all tags that contain 'Spring Range' with 'Summer Range'.

1. Select the variable for the product tags.

2. Double-click on the variable to edit it.

Reveal the editable version of the variable.

Dates and Times

You can get information about the current date and time by using the {{date:<format>}} variable. For example, if the day of the week today is Tuesday, the variable {{date:D}} will return "Tue".

Another popular example is formatting the "Created At" variable to display as YYYY-MM-DD by using the following variable: {{shopify_order.created_at | date: "%Y-%m-%d"}}

Now that you know how to find and use variables, you can cast your automation data superstars!

Variables use . This can be useful when you wish to manipulate data before it's processed.

3. Insert the filter to replace all tags that contain 'Spring Range' with 'Summer Range'.

Liquid Templating
replace
Receive an SMS message when someone creates a fraudulent order
A common use is for your store's email.
That is a fancy date variable!