Why isn't my date comparison flow working in Shopify?

1 0 1

so i need to make flow, that checks if date in product metafield was before now, and if so add tag to it.


i created this flow with shopify chat assistant, and its not working
this is metafield


whats wrong?

Reply 1 (1)

Shopify Staff
5 1 1

Unfortunately, Liquid, the Shopify templating language, does not allow for direct read and write operations on a product's metafields or for date comparisons.

Manipulating metafields and date comparisons are operations that are typically done in the backend of an application using the Shopify API, in a language like Ruby, Python, or Node.js.

While you can access metafields in a Liquid template, you can't use them to trigger actions like adding a tag to a product.


This task would require a custom solution, possibly a custom app, that uses the Shopify API to periodically check the date in the product metafield and add a tag if necessary.

Alejo 😄
Did my information help? please do not hesitate to let us know. Remember that you can reach out to our help center for more help