Create a flow that adds a Customer's tags to a new order

Topic summary

Issue: A user attempted to automatically copy customer tags to new orders using Shopify Flow but encountered an “Order tags is invalid” error.

Root Cause: The flow worked for customers with a single tag but failed for multiple tags. The problem stemmed from using a Liquid for loop ({% for tags_item in order.customer.tags %} {{tags_item}} {% endfor %}) in the “Add order tags” action, which generated a space-separated string instead of the required array format.

Solution: Replace the Liquid loop with {{ order.customer.tags }} to pass tags as a proper array.

Outcome: The simplified syntax resolved the issue, allowing customer tags to transfer correctly to orders regardless of tag count.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

This seems like it should be simple but I’m not getting any success, and haven’t found anyone else with this problem.

All I’m trying to do is: When an order is created, add the tags associated with that Customer to that order. For example, if the Customer has the tag “Wholesale”, then the order automatically gets populated with the tag “Wholesale”

My flow:

  1. Start When: Order Created

  2. Add order tags: {% for tags_item in order.customer.tags %} {{tags_item}} {% endfor %}

I get the error: “Order tags is invalid”

Can anyone point me to what I’m doing wrong? Thanks!

UPDATE: This seems to be an issue only if the customer has more than one tag. Customers with a single tag are working correctly. I tried adding the “For each” element but that did not work either.

I think this might be the issue: the “Add order tags” action in Shopify Flow expects a list (array) of strings, not raw Liquid template code. When you input:

{% for tags_item in order.customer.tags %} {{tags_item}} {% endfor %}

you’re generating a single string of space-separated tags (or possibly invalid Liquid), rather than a proper list Shopify Flow can use. Try replacing it with:

{{ order.customer.tags }}

This should pass the tags correctly as an array.

That explains why it worked with one tag—your code outputs a single string, which Flow can handle, but it breaks with multiple tags since it’s not a proper array.

Thanks so much, this did the trick!