Apologies for the delay, I missed the message. Below is a summary of what I did.
Flow 1: Product Created Trigger > Wait 60 seconds
Branch 1 > Update Product Metafield (metafield namespace: mm-google-shopping, key: custom_product, Value: True, Type: Boolean)
Branch 2 > For each > Update Product variant Metafield (metafield namespace: mm-google-shopping, key: condition, Value: new, Type: single line text)
Branch 3 > For each > Check if Options Value = Hoodie (example) Update Product variant Metafield (metafield namespace: mm-google-shopping, key: gender, Value: unisex, Type: single line text)
Branch 4 > For each > Check if Options Value = Hoodie (example) Update Product variant Metafield (metafield namespace: mm-google-shopping, key: age_group, Value: adult, Type: single line text)
The process just repeats for each field you want to update.
For other items like linking a size guide or setting the product taxonomy, I had to use the Send Admin API request with the productupdate mutation. The hardest part with this is actually finding the right gid’s to make the updates. For example, the inputs for a sweatshirt look like the below. The 14326 is the number that is hard to find. The only “easy” way it to manually set some of the products up and then use the GraphQL App to run a query to pull the info.
{
“input”: {
“id”: “{{ product.id }}”,
“productCategory”: {
“productTaxonomyNodeId”: “gid://shopify/ProductTaxonomyNode/14326”
}
}
}
I also replicated all the flows to redo all the updates when I update a product in case the values need to change. This was the hardest to make work consistently without an endless loop of updating. For this I had to use MESA with Flow. This is the general “flow”.
-
FLOW 1: Scheduled to run every 15 minutes > get Product Data with following query: updated_at:<=‘{{ scheduledAt }}’ AND updated_at:>‘{{ scheduledAt | date_minus: “15 minutes” }}’ > for each item in get product data > check if updated at is less than or equal to scheduled at > check if Last Flow Update (Custom metafield) does not exist or is less than updated at > Update Product Metafield custom.last_flow_update_at, value: {{ getProductDataForeachitem.updatedAt | date_plus: “30 minutes” | date: “%Y-%m-%dT%H:%M:%S” }} Then check if updated at is less than or equal to scheduled at > check if Last Flow Update (Custom metafield) does not exist or is less than updated at > Send Product to MESA.
-
MESA: Receive Product from FLOW, Send Product back to FLOW. (As simple as this is, I could not find another way to make it work with FLOW alone.
-
FLOW 2: Send Product from MESA trigger > run all updates.