I am trying to post a raw json to the new mongodb atlas rest API using n8n cloud.
The JSON body looks like
{ "dataSource": "Cluster",
"database": "test",
"collection": "stuff",
"document": {"GroupId": "Foo", "quantity": "123"}
}
The error message is
ERROR: The data in “Body Parameters” is no valid JSON. Set Body Content Type to “RAW/Custom” for XML or other types of payloads
NodeOperationError: The data in "Body Parameters" is no valid JSON. Set Body Content Type to "RAW/Custom" for XML or other types of payloads
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest.node.js:741:35)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:442:47
It seems as though the body parameters have a depth limit?
I have tried using the parameters option but thos wraps the document item in quotes when testing output using pipedream.io.
Many thanks
Pete
Information on your n8n setup
- n8n Cloud:
- n/a
- Running n8n via n8n.cloud