Daily Email on OOS Products Flow Suddenly Stopped Reading From a Location?

Topic summary

A Shopify Flow automation that sends daily emails about out-of-stock (OOS) products stopped working correctly. Initially, the user believed it was only reading from the default location instead of all locations, but later clarified the flow was returning zero items daily.

Root Issue Identified:
The query syntax in the “Get product data” action was invalid. The original query used date_minus:"one day" incorrectly.

Solution:

  • Changed query from tag:Retail OOS AND date_minus:"one day" to tag:"Retail OOS" AND created_at:>{{ scheduledAt | date_minus:"24 hours"}}
  • The date_minus filter only accepts plural time units (seconds, minutes, hours, days, weeks, months, years), not singular “one day”
  • Using “24 hours” instead of “one day” resolved the Liquid error

Current Status:
The flow now returns results (1 item on test run). User is monitoring for 24 hours to verify consistent functionality. A related issue with another flow not properly adding/removing OOS tags by location was also mentioned, which may affect overall results.

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

I still received the same error with the new workflow so I’ll send you a PM.

I think the date_minus filter is not handling the singular of “days” well. Try “1 days” or “24 hours”

I looked at the code for this and it only handles plurals:

seconds, minutes, hours, days, weeks, months, years

I changed it to 24 hours and reran it and it returned 1 item, which is good. I’ll give it another 24 hours and see what it returns tomorrow morning.

I did notice that my other flow where I designate OOS tags based on locations doesn’t seem to be removing & adding tags properly which would affect the actual return of this flow. Care to look at that one as well?

https://admin.shopify.com/store/kryptonite-kollectibles/apps/flow/overview/0196107c-c7db-7f35-acf5-0d3bcac62163

https://admin.shopify.com/store/kryptonite-kollectibles/apps/flow/editor/0196107c-c7db-7f35-acf5-0d3bcac62163/0196cef0-9baa-72af-b523-5a887a919640

I can open a new thread if you prefer, but they’re basically all encompassing to both issues so figured I’d ask before I bog the forum with it.