Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Product ID error in Shopify Flow with Arigato automation trigger

Product ID error in Shopify Flow with Arigato automation trigger

AndrewLeb
Tourist
47 0 2

How to fix this error with the product ID?

Screenshot 2023-07-20 213021.pngScreenshot 2023-07-20 213033.pngScreenshot 2023-07-20 213053.png

Replies 6 (6)

paul_n
Shopify Staff
1430 156 332

The answer is right there in the error message.

 

Some more context....Get product data returns a list of products. Update product metafield accepts a single product. Therefore you need to add a "for each" loop after "Get product data"

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AndrewLeb
Tourist
47 0 2

But I filter product data by 1 product ID, which comes from Arigato, but see the error. What should I change here?

paul_n
Shopify Staff
1430 156 332

Flow doesn't know that your filter is only going to return one thing. It returns a list. Add a For Each step after "Get product data" and in the "for each item" path put your action. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AndrewLeb
Tourist
47 0 2

So what changes do I have to make in that workflow?

DanAtBonify
Shopify Partner
57 4 42

In the update product metafield was there an issue with the value, missing curly brace?

 

{{ generateText.text }}

AndrewLeb
Tourist
47 0 2

Open AI should have returned that text, or Flow should have passed it. I am trying to understand why this happens. I will keep testing. But it is not the correct workflow with the Product Id issue. The ID issue is here: Arigato to Open Ai Product Description, and I can't even activate it.