Hi everyone,
I’m working on a workflow in n8n using the n8n AI Agent to collect user info (last name, first name, email, and phone number) via WhatsApp, and then store that data in a MongoDB collection.
The agent receives the user’s answers through conversation, then sends the data to a MongoDB Insert Tool. The problem is:
Instead of inserting each field (lastName, firstName, email, phone) correctly, the node stores everything as a single key with null values.
As you can see below in the image, the whole object is inserted as a single key (stringified JSON), not as a real document with 4 fields.
My questions:
How can I make sure the agent outputs a real JSON object, not a stringified version?
Is there a way to parse or convert the agent’s output in n8n before it goes into MongoDB?
Thank you for your help.


