Shopify Flow’s Send Admin API action fails when running a productUpdate GraphQL mutation with the error: “Mutation input evaluated to invalid JSON. Please ensure the input forms valid JSON after Liquid code is run.” Flow is an automation tool; the action sends requests to the Admin GraphQL API.
Initial suggestion was malformed JSON (e.g., missing quotes around a string). The author tested with plain text and still saw the same error.
Key guidance emerged:
productUpdate requires the product id; Flow does not implicitly pass the triggering product’s id. You must include a valid product ID.
The mutation structure was invalid; media was incorrectly nested inside input, which doesn’t match the schema. Reference the official productUpdate docs for the correct input shape and required fields.
Screenshots of the Flow setup, API request, and error logs were provided and central to diagnosing.
Status: No confirmed fix yet. Next steps are to ensure valid JSON after any Liquid rendering, include the required product id, and restructure the mutation to match the documented schema (avoid nesting unsupported fields like media inside input). Discussion remains open.
Summarized with AI on December 14.
AI used: gpt-5.
I am trying to use Flow to update various product fields based on certain conditions using the Send Admin API action. To test this I am using an old, inactive product and using a very simple product update mutation but keep getting the following error when it runs: “Ran into exception: Mutation input evaluated to invalid JSON. Please ensure the input forms valid JSON after Liquid code is run.”
I don’t understand why this error is occurring. Please help, I’m at a complete loss. I don’t understand .
i had to google search what flow was. but I think your issue is that your json is formatted incorrectly.
i think
(ON SALE) - Marloboro - plz guaway - 5.5% (440ml),
should need quotes around it. like
“(ON SALE) - Marloboro - plz guaway - 5.5% (440ml)”,
json objects have specific formatting I think that might be your main issue with this error not exactly sure how you can make that happen in an automated way using flow. but I hope that helps
this sort of makes sense because it needs to know which product id you are mutating. it doesn’t know you want to mutate the product that triggered the flow. (if I am understanding your original photo correctly)