I’m trying to save WhatsApp webhook data into Firestore using n8n. My workflow starts with a WhatsApp Trigger node (from the Meta API) and then goes into a Firestore “Create or Update Document” node.
For the Update Key, I’m using:
{{ $json[“contacts”][0].wa_id }}
The problem happens when I try to pass multiple values into Firestore under Columns / Attributes. I wrote everything in one line, for example:
wa_id: {{ $json.contacts[0].wa_id }} message: {{ $json.messages[0].text.body }} direction: “outgoing” timestamp: {{$now}}
Firestore gives me an error saying the property path is invalid, and it interprets the whole line as one single field name instead of multiple attributes.
My question is: how should I properly structure the Columns / Attributes so that each property (like wa_id, message, type, timestamp, and direction) is stored as a separate field in the Firestore
document?
