Why isn't my custom Shopify Flow triggering with specific order attributes?

Topic summary

Shopify Flow is not triggering after adding a checkout gift note via cart.attributes and expecting a Flow on “Order created” to run when specific custom attributes are present.

Key points on conditions:

  • Evaluate order.customAttributes by checking the attribute key (no “attributes.” prefix). Use conditions like Key equals/includes “To”, “From”, and “Message”. Keys may be case sensitive.
  • You can combine into a single condition that matches if the key is any of the desired values. Screenshots show the intended setup, but the logic must target the key names directly.

Accessing values in Flow:

  • Direct access like {{ order.customAttributes.Customer_Type }} is not supported.
  • Use Liquid to extract a value by iterating customAttributes and matching key, or use filters: where (key) + map (value). Code snippets provided illustrate both approaches.

Naming/GraphQL notes:

  • Flow uses Admin GraphQL API field names; ensure key strings match exactly. Handling keys with spaces is not explicitly resolved; examples show underscores when filtering by key.

Status: Guidance and working patterns were provided; no final confirmation that the original Flow now triggers.

Summarized with AI on December 30. AI used: gpt-5.

This is 3 years later for a reply but if anyone is having this issue it is worth mentioning the 2023 solution.

@evaldas_92 is 100% correct, When using a condition for custom attributes, you will loop over them. the key is JUST the name of the attribute and NOT attribute[key]. If you are unsure, you can see the key’s name when you click on the custom attributes on the order.

Now the main reason I posted this is that if you are trying to USE values in the order attributes, you need to know that Shopify Flow uses the GraphQL api. So reference: https://shopify.dev/docs/api/admin-graphql/ for the names in your code.

Secondly, you can use full liquid code in there to set a variable.

So if you can use

{%- liquid
assign theAttributeYouCareAbout = "defaultValue"
for attribute in order.customAttributes
  if attribute.key == "theAttributeKey"
    assign theAttributeYouCareAbout = attribute.value
    break
  endif
endfor -%}{{ theAttributeYouCareAbout }}

I have used this code and replaced the default value as well as the name of the attribute key and by storage variable in a working shopify flow.

Use as you see fit!

In the worst case if you can’t sort it out using shoify flow, you can always create a custom private app with a webhook and write it in your language of choice (Python, Javascript..etc)

1 Like