Check if - 5,000 entries

Topic summary

Goal: Validate whether a customer’s postcode is contained within a large set (~5,000) using Shopify Flow, where the “Check if… at least one of” condition can’t handle so many entries.

Suggested approach: Use shop metafields (or metaobjects) to store the list of postcodes instead of hard-coding them in Flow. A postcode should be stored as a string; use a list of strings with one postcode per item.

How-to:

  • Create a shop metafield of type list of strings and populate it with the 5,000 postcodes. Note: Shopify currently has no native UI to set shop-level metafields; use a free app (e.g., Metafields Guru) to create and fill it.
  • In Flow, add “Shop / Metafield (requires arguments)” to reference that metafield in your workflow.
  • In your condition, use the metafield list. If necessary, loop over the list and compare the customer’s zip to each item.

Status: A workable method is outlined (metafield-based). No confirmation of implementation success yet; discussion remains open.

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

Good afternoon

I would like to check if a postcode is within a list of 5,000. How can I do that?

I do not seem to be able to add 5,000 entries to the Check if… statement?

Many thanks

Usually when a list gets huge, I’d recommend using metafields or metaobjects instead. For example, you could create a shop metafield and put all you zips in there, and then you can use that metafield in your Flow workflow.

Thank you Paul.

Once I’ve created the shop metafield with the postcode values, how can I use this data in flow?

When I try to do Check if, Customer Zip is at least one of … it does not seem to let me compare it to a shop metafield value?

Many thanks

It depends on the type of metafield you add. A zip is stored as a string, so I would use a string or list of strings (with one zip per item in the list).

Once you have that set up, you can add the metafield to flow by going to “shop / metafield (requires arguments)”. There, you’ll be able to choose that metafield. If you use a list, you’ll probably want to add that first in a condition (because you need to loop over the list). Then add the whichever zip as the second part of the condition.

FYI, there’s isn’t yet a UI to set shop metafields…but there are some free apps that allow it like “metafields guru”.