Price Update Flow Error | Value has to be object but it is?

Hello. I’m trying to bulk update prices but I get an error saying “Request is malformed: Value (fields)'s type should be object”

The input value is an object so I’m not sure whats going on.
https://developers.webflow.com/#update-sku

Based on the documentation, to update the sku price, “fields”: {} need to be the parent object.

I’m not using the built-in webflow node because the path is only for the cms collection & not the product collection.




The last node output

{
“status”: “rejected”,
“reason”: {
“message”: “400 - {“msg”:“Request is malformed: Value (fields)'s type should be object”,“code”:400,“name”:“BadRequestError”,“path”:”/sites/628579a39ae0a8a33da36520/products/628579a39ae0a80bcea3686c/skus/ponddye-32floz-2",“err”:“BadRequestError: Request is malformed: Value (fields)'s type should be object”,“meta”:{“details”:[{“type”:“type”,“path”:".fields",“params”:{“type”:“object”}}],“code”:“BadRequest”},“errorEnum”:“BadRequest”}",
“name”: “Error”,
“stack”: “Error: Request failed with status code 400\n at createError (/private/var/folders/6_/vvxtg5q95hz18xyhrmlq43kh0000gn/T/AppTranslocation/914939DB-8819-427A-8A4A-197DAD80BF29/d/n8n 2.app/Contents/Resources/app/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/private/var/folders/6_/vvxtg5q95hz18xyhrmlq43kh0000gn/T/AppTranslocation/914939DB-8819-427A-8A4A-197DAD80BF29/d/n8n 2.app/Contents/Resources/app/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/private/var/folders/6_/vvxtg5q95hz18xyhrmlq43kh0000gn/T/AppTranslocation/914939DB-8819-427A-8A4A-197DAD80BF29/d/n8n 2.app/Contents/Resources/app/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:406:35)\n at IncomingMessage.emit (node:domain:470:12)\n at endReadableNT (node:internal/streams/readable:1331:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”
}
}

Using Desktop App Version 0.174.0

Would very much appreciate your inputs on this.

Hey @jay, welcome to the community :tada:

I suspect the value you are using isn’t quite what the HTTP Request node expects. You might need to update the expression you have in use. Perhaps you can share your HTTP Request node (simply select it and press Ctrl+C to copy its code) as well as the JSON data returned by your Set node? This way we should see what might need updating here.

For a working example using a dummy object in the HTTP Request node you could check out this workflow:

You can see the actual JSON object being sent here is wrapped in curly braces:

Hey so I’m wondering, is it possible for me to reference other nodes within the function node?
I’m trying to convert the json string from google sheet to javascript object.

I know I can use the javascript object from the received data of the sku node but I need some fields from the excel.

Yes, you can reference data from other nodes through $items("Your node name here") - check out the documentation here.