I need your HELP!🙏🚀

I have a problem with inserting new users and onboarding answers for my Finance AI chatbot, as well as filtering between new and existing users during the onboarding process.

I’m using an Insert Node to create new users.
Although the values appear correct in n8n (e.g., wa_id, status, etc.),
The data is being saved null in MongoDB.

As a result:

  • Find User fails to locate the user, and

  • If User Exist treats every user as a new user each time.

My workflow

webhook(twillio message) > Map incoming (edit): phone, text > find user (mongodb) > user exist (If) >
FALSE
> insert new user (mongodb) > insert new answers (mongodb) > q1(twillio) > update status q1 (mogodb)
TRUE
>Switch: 1. terms link: after q12 (twillio) > update status terms waiting (mongodb) 
2. map incoming data (edit) > messgae a model (OPEN AI): for asking q2-q12 and gives feedbacks >code: phrase AI output > update answers (mongodb) > update status (mongodb) > send answer+next q (twillio)

Share the output returned by the last node

[
{
“{\n user_id: “””:
null,
“wa_id: “whatsapp:XXXXXXXX””:
null,
“status: “ONBOARDING_Q1_WAITING_NAME””:
null,
“terms_status: “PENDING””:
null,
“full_name: “””:
null,
“created_at: new Date()”:
{
“toISOString()”:
null
},
“updated_at: new Date()”:
{
“toISOString()\n}”:
null
},
“_id”:
“6903867e1b472b7e2c213ad0”,
“id”:
“6903867e1b472b7e2c213ad0”
}
]

Information on your n8n setup

  • n8n version: 1.108.2
  • Database: MongoDB
  • n8n EXECUTIONS_PROCESS setting: default
  • Running n8n via: n8n cloud
  • Operating system: Windows 11

ah i see the issue - this is a classic n8n + mongodb combo problem. the Insert node is sending your data but mongodb’s not storing it properly.

few things to check:

**1. field mapping in the Insert node**

make sure you’re mapping fields correctly. in the Insert node, you need to explicitly map each field. like:

- `wa_id` → actual value from your map

- `status` → actual value

- etc.

if youre just passing raw data without mapping, mongodb might be storing nulls. show me your Insert node config - specifically what’s in the “Columns to insert” section?

**2. common culprit - field names**

mongodb is case-sensitive. if your schema expects `wa_id` but youre sending `waId` or `WA_ID`, it wont match and youll get nulls for everything else.

**3. quick test**

before the Insert node, add a Set node and manually create the exact object you want to insert:

```json

{

“wa_id”: “1234567890”,

“status”: “onboarding_q1”,

“phone”: “+1234567890”

}

```

then map that Set node output to your Insert node. if that works, your mapping was wrong. if it still fails, the issue is with the Insert node config itself.

**for the Find User failing** - once you fix the insert, Find should work. but double-check:

- what field are you searching on? (probably `wa_id`?)

- does that field actually have a value now?

drop your Insert node screenshot or the exact field mapping youre using and i can spot it faster