Shopify Flow for Custom Attributes

Hi, I am struggling with setting up the following flow.

I want to send an internal email when an order is placed with certain items from one collection.

I have set up the trigger and the email portion but I cannot get the custom attributes to work.

I’ve tried if collections_item.title = All-merch

But I don’t think this is correct.

1 Like

hi @msrwalsh

Thanks for reaching out!

You’re on the right track with setting up the trigger and email. To filter based on items from a specific collection like “All-merch,” you’ll need to check the line items in the order and then reference the product’s collection properly — unfortunately, collections_item.title isn’t a valid attribute in most automation platforms (like Shopify Flow, for example).

Instead, you typically need to:

Loop through the line_items in the order.

Check if the product belongs to the desired collection. Since collections aren’t directly tied to line items in most order objects, you might need to use product tags or metafields instead (e.g., tag products in the “All-merch” collection with a tag like all-merch, then filter by tag).

Here’s a more reliable condition you can try if using tags:

{% for line_item in order.line_items %}
  {% if line_item.product.tags contains "all-merch" %}
    [Trigger your internal email logic here]
  {% endif %}
{% endfor %}

If you’re using Shopify Flow and can’t access tags directly in the condition block, consider tagging the product in Shopify and using a “Product Tag” condition in Flow.

If your goal is to check if at least one product on the order is in a collection titled all-merch then that condition looks correct. The title field is the name of the collection as displayed in the Shopify admin. Does the value exactly match all-merch? You could also consider matching on the id of the collection, in case it’s ever renamed. There are a few ways to preview data to find the exact value you’re looking for.

Hi @msrwalsh !

I checked out your flow setup and the parameters look good! If it’s still not working as expected, one possible reason could be the condition where you’re checking the collection title.

You’ve used collection.title as equal to “all-merch”, but I think that might actually be the collection handle, not the title. Just double-check what the actual title of the collection is in your Shopify admin. For example, if the title is “All Merch”, then the condition won’t pass because “all-merch” (lowercase and hyphenated) isn’t the same as “All Merch” — it’s case-sensitive too.

I tested the same setup on my end using the correct collection title, and it worked fine. Here’s the condition I used — it ran smoothly. Attaching a screenshot for reference:

I hope this helps!

If my response helped you, please consider giving it a like ( :+1: ) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions.

Thank you!

Regards,

Abhishek from Swym