Cannot Update Metafields via Flow App

Topic summary

A user encountered errors when trying to update product metafields via Shopify Flow based on product tags. The initial error indicated “Value is invalid JSON” when attempting to assign values like “Ladies” or “Men”.

Troubleshooting attempts:

  • Adding quotes (single or double) resulted in different errors: “unexpected token” or “Value must be an array”
  • After adjustments, the Flow entered an infinite “Retrying” state

Solution found:
The metafield values must be formatted as JSON arrays:

  • For multiple values: ["Value1", "Value2", "Value3"]
  • For single values: ["Single Value"]

This array format resolved the JSON parsing errors and allowed the Flow to execute successfully.

Follow-up issue:
A later user (Gavhughes) reports their similar Flow runs but shows no output data, with the message “This action didn’t return an output when it ran.” They’re questioning whether additional steps are needed or if the original solution still works. This remains unresolved in the thread.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hi,

I am trying to assign metafields depending on the product tags in Shopify Flow app, yet there is a constant error that shows after the app tries to do so:

Got error updating metafield: “Value is invalid JSON: unexpected token at ‘Ladies’.” For value: “Ladies”

I have included screenshots of the Flow itself & of the metafield settings.

Please help me to figure our what is wrong with this.

1 Like

UPDATE:

Still don`t know how to resolve this, but I have tried to put metafield values in “…” and ‘…’

Error without any ’ or ":

Got error updating metafield: “Value is invalid JSON: unexpected token at ‘Men’.” For value: “Men”

Error with ‘…’:

Got error updating metafield: “Value is invalid JSON: unexpected token at ‘‘Men’’.” For value: “‘Men’”

Error with “…”:

Got error updating metafield: “Value must be an array.” For value: ““Men””

So, I am still confused

Now, I somehow managed to avoid the error messages, and now Flow takes infinite time to update metafield. Please see the screenshot:

Since it says Retying, I suspect there is still something wrong.

Please help :anguished_face:

Were you ever able to solve this? I am experiencing this exact issue in Flow now.

Hi,

Yes, I did solve this in the end, indeed. Turns out it had to be written in an array format, which kinda makes sense.

[“Metafield Value”, “Another Value”, “Third Value”] - if you have a list of strings

[“Metafield Value”] - if it`s a single string

5 Likes

Just wanted to thanks HEAPS for posting this solution! THANK YOU

1 Like

Hi i am trying to do the same thing but when the flow runs and i look at the step data it shows OUTPUT “This action didn’t return an output when it ran. This is because this action does not return data to Flow.”

My flow runs when a product is created, checks for a specific tag (animal type) in this instance and then is meant to add the tag as a product metafield using the action update product metafield.
im wondering am i missing a step and is your flow still working?
thanks
Gavin