Hi, I am testing to receive whatsapp messages via N8N webhook, then create a record to Notion database. I create the workflow as the following. When I execute the workflow, the Notion create database page node gets error “Cannot read properties of undefined (reading ‘text’)” but I check the input to Notion node seem normal and it can resolve the sender’s phone number. Can anyone advise what this issue is? And how to resolve this problem. Thanks
Hi! That error usually means one of the Notion property values resolves to undefined, and the node then tries to read .text from it. The phone number resolves fine, so check the message body expression. With openwa the text usually sits at {{$json.body.data.body}} (or .data.message.body), not .text. Media and status events don’t carry a text field at all.
To find it: pin the webhook output, open the Notion node and hover each property expression. Any that shows undefined instead of a green value is the culprit. Also make sure the database’s Title property is mapped, because Notion rejects pages without one.
Adding an IF node before Notion that only passes type = chat messages stops media and status events from breaking the flow.
That error in the Notion node almost always means the body text is nested inside a different key from the WhatsApp webhook payload.
Adding a quick Code or Edit Fields node right before Notion to normalize the message string into a clean title property will resolve the undefined reading error.
This error usually happens when the Notion node references a nested property path in the WhatsApp payload that is empty or missing in certain webhook events. You can fix this by wrapping your expression in optional chaining or adding a Set node to map the property safely before the Notion integration. Let me know the JSON structure of your incoming WhatsApp payload and I can help write the exact expression for your Notion node right here.
Hi @icast7788, your screenshot shows two paths into Notion, one directly from OpenWA Trigger and one through Resolve a contact phone number. Those connections don’t merge the message and phone into one item.
For a test, remove the direct Trigger → Notion connection. Keep Trigger → Resolve a contact phone number → Notion. Map the phone from the resolver output and the message explicitly from OpenWA Trigger’s output.
If the same error remains, can you share the Notion node’s property settings and full Error details, with personal data removed? The .text message alone doesn’t tell us which setting is failing.
Hi Anshul, Thanks for your advise. Follow the nodes connection (Trigger → Resolve a contact phone number → Notion) and change to input field name to Notion Create a Database Page parameters, then the execution succeeded.
Also, thanks for all others support.
