Flow to tag products based on published market?

Hi there,

I am looking to build a flow that will automatically tag a product with a specific tag when the product is published on a specific market.

I tried using the trigger “product variant inventory quantity changed” so it could check for a published market each time the product has added new inventory. However, I’m having difficulties finding any conditions associated to market publication.

Is there currently a way for Shopify Flow to add tags to a product based on if it is published to market?

You could probably use some custom graphql to grab that:

{
  product(id:"gid://shopify/Product/${productId}") {
    publishedOnPublication(
      publicationId: "${publicationId}"
    )
}