Get a list of products or a specific product

Hi, I’m having trouble with the following flow. What I want to do is search for a specific product, retrieve the familia_web and modelo_real, and insert them into the product’s labels field, but I can’t get it to work. Could someone help me? In the future, I don’t want to retrieve just one product; I want the entire catalog, and I don’t see any trigger that retrieves the catalog. Do you know of any way to get it?
image

There is a “Get product data” action which retrieves a list of matching products.
The list can then be fed into “Loop” action and each product processed as you like inside the Loop.

Of course, it’s not a trigger, but this acton can be run via a “Scheduled” trigger to process your products as you want daily/weekly, etc…

Be aware that all “Get …” actions in Flow are limited to 100 objects max, so if you have more objects, need to do some tagging /adding other marker and schedule several runs to cover all of them.
There are several topics in the forum with recipes how to do that.

If you want to run automation for a list of products with a quantity significantly exceeding 100 items, and if you don’t mind using third-party apps, you can use the combination of the Start custom workflow for list of product action and the Product: custom trigger triggered trigger from the Flow Companion app. The Start custom workflow for list of product action has no limit on the number of selected items.

Second thing I want to mention: the Add product tags action does not support liquid variables. In order to set tags from liquid variables, you can make a GraphQL request for this. You can do it using the Execute GraphQL request action from the Flow Companion app. The request would be as follows:

mutation addTags($id: ID!, $tags: String!) {
  tagsAdd(id: $id, tags: $tags) {
    node {
      id
    }
    userErrors {
      message
    }
  }
}

and variables:

{
  "id": "{{product.id}}",
  "tags": "{{product.familiaWeb.value}}, {{product.modeloReal.value}}"
}

Here’s what it might look like:

  • The first workflow starts on a schedule and runs the Start custom workflow for list of products action for all active products. You can specify a narrower condition in the Query field if needed. In the Specifier field, you can use any value - in my example, I’ll use set tags

  • The second workflow starts with the Product: custom trigger triggered trigger, checks that the Specifier equals set tags, and adds tags from metafield values if the metafields are not empty.

Hi everyone, the problem was that I had a synchronization from a provider that was overwriting those fields.
Thank you all for your help.