Adding Liquid template variables to workflow messages

You can add template variables to any text field that contains the Add template variable link in Flow. Workflow actions that contain such text fields include Send email message, Send Slack message, Send HTTP request, and Update order note.

Add a template variable to a text field

To add a template variable to a text field:

  1. Create a workflow, and then add an action that supports template variables in texts fields.

  2. Enter your message in a text box. For example, The following customer is now a VIP customer:
    Close up of text in a Message text box.
  3. Click Add template variable and select a template variable from the list:
    Close up of the Add template variable window.
    The template variable appears in the text box:
    Message that includes a template variable.
  4. Click Save.

  5. If you are editing an message action, then click Preview to see an example of what your message will look like when the text variable is replaced during your workflow:
    Preview your workflow.

Examples

In the following example, the title of the discontinued product will appear in the message:

Discontinued product {{product.title}} has just hit an inventory level of 0.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free