Shopify integration - Send email when an order has a specific tag and include the line item detail.

I run a store using Shopify. How can I create a flow like below using Hubspot?:
When order gets tagged as “error” → generate an email with the line item detail of that order → send to the customer

Currently, I am sending emails one by one to customers whose orders could not be fulfilled due to mistakes in their addresses. I would like to somehow automate this.

Hey @Fullbalance ,

First, you need to integrate your Shopify store with hubspot: HubSpot Marketplace


This enables HubSpot to pull data from Shopify, so the portal will know which orders have errors and how these orders are related to contacts.

Once this is established, you can build a workflow to trigger when an order (or Deal in HubSpot) is tagged as an error, then set it to send an email to the contact associated with the Deal.

I hope this helps!

Hi @webdew

Thank you for your reply!

I’ve integrated my Shopify store and was able to make a flow like below:

Trigger - Tag of the deal is equal to “error”

Action - Send email

but how do I put the order details (number of items purchased and price of each item) in the email?

This is how I would write in liquid, but can I do something similar with Hubspot email?
{% for tag in order.tags %}
{% if tag contains ‘error’ %}
{{ line_item.title }}
{{ line_item.quantity }}
{{ line_item.unit_price }}
{% endif %}
{% endfor %}

I look forward to your reply.