"Order tags is invalid" error when order created from draft

Topic summary

Issue: An order created from a draft in Shopify triggered a Flow that adds order tags and failed with the error “Order tags is invalid.” Screenshots show the Flow steps and the error message.

Context: The Flow targets orders created in Shopify (not external marketplaces). It attempted to tag with: {{order.riskLevel}}, {{order.customer.id}}, {{order.app.name}}, {{order.discountCode}}, {{order.note}}. Tags are labels used to categorize orders; Shopify Flow is an automation tool; draft orders are admin-created orders.

Investigation: Recommendation was to log each variable’s value to see which contains invalid characters or exceeds tag constraints (length/characters). Initial suspicion included the id and note fields.

Outcome: The failing value was {{order.note}}. This explains why the Flow worked for some orders but not others.

Next steps: Sanitize the note before tagging (e.g., use Liquid to strip/replace invalid characters or trim length). Adding a Log action can help proactively validate values.

Status: Resolved with identified culprit and mitigation plan.

Summarized with AI on January 3. AI used: gpt-5.

Hi, and thanks in advance for any guidance.

An agent at my business created an order in the Shopify backend from a draft. It was paid, and triggered the below Flow:

harryAtTIDE_1-1709820500457.png

This Flow handles orders that are created in Shopify itself, and not those from connected 3rd party marketplaces. It has been adding tags and reaching the end of the Flow when a sale has been created by the online store. This is the first order from draft, and the first time I have seen this error.

Here are the tags I’m trying to add:

{{order.riskLevel}}
{{order.customer.id}}
{{order.app.name}}
{{order.discountCode}}
{{order.note}}

I’m interested to know if it’s a particular tag that is throwing the error, the order object being incompatible with drafts, or perhaps something else.

I would expect that if one of the values that I’m trying to pass in as a tag is not present, then the tag would be null and not be created.

Would be very grateful for advice.

Many thanks,

1 Like

A tip - put those variables into a Log output action to see what values they contain.

I think that at least one of them contains invalid characters for tags (def the id field, but note probably is too long)

1 Like

Hi Paul,

Thank you very much for your helpful reply. In this particular instance, the {{order.note}} was the culprit; it would explain why Flow worked in some cases but not others.

Noted on the invalid characters; I will use Liquid to strip or replace them.

All the best!