Exclude products from Get Product Data in Shopify Flow

Hi,

I’ve been using the ‘Send daily email summary with out of stock products’ template from Shopify Flow.

The flow works, but, it sends me a daily summary with ALL of the products I’ve got 0 inventory of (so also DRAFT and ARCHIVED products). I want to exclude the Draft and Archived section but I just cannot figure out how.

Can somebody help me or have tips on how to do this?!

See:

https://shopify.dev/api/admin-graphql/2023-01/queries/products

You can filter by:

status:active and inventory_total:>0

Thank you!