Want to delete or draft products after given metafield date

Want to delete or draft products after given metafield date

GleamJewels
Visitor
2 0 0

Hi Everyone,
so i want to create workflow in which i want to remove or draft products after added metafield date is passed
I try to create that in shopify workflow app but now i am stuck
I have started it with scheduled to run daily and check given time everyday then i was adding condition for that if metafield date is greater than current date then draft product
now i am stuck at how do i get current date?
Is this logic even possible? please share your thoughts
tell me any alternate solutions if you know any
Thank you in advance

 

GleamJewels_0-1738691702261.png

 

 

Reply 1 (1)

paul_n
Shopify Staff
1584 171 364

Do not do that condition. It will attempt to pull a high amount of data and screw up any other workflow you have running as you'll hit your API limit (it would get all products for all collections for all publications for all installations of all channel apps). 

 

Look at the "Get data" actions instead. For example "Get product data". You could get draft products with a query on the status.

 

You can also now query by metafield value, but I don't believe you can query by dates (limitation of that API).  So you might need to do the data comparison in Flow. 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.