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