Use Flow to add tags to products from a specific collection (using a schedule trigger)

Hi there,

Is it possible to create a workflow to add tags to products from a specific collection at a set day / time?

We use tags to manage the display of promotional badges on storefront.

I would like to automate the adding and removal of these badges to run in line with the promotion schedule.

I tried, but can’t seem to find a way to select the correct products under condition when the trigger is set as schedule.

Thank you,

Hello,

You’ll need a custom app to fetch all the products from the specific collection and add or remove tags using the Shopify Admin API. This app can be triggered via a Scheduled Flow workflow that sends a webhook to the app on the desired day/time. Or your app can be configured for scheduled tasks/cronjobs.

Typically for something like this, you would want to do:

Scheduled time

Get product data (filtering by collection)

For each (product)

Add product tags

But you cannot filter by collection_id on the Products query. You could potentially use Get Product Variant Data, which has a filter called collection. But you will likely run into Flow’s limit of 100 resources for “Get” action. To get around that, you would have to run the workflow more frequently. You likely would also want to add a “tag_not” filter to your query so you don’t pull variants from the same product twice.