Firestore “Create or Update Document” node – Invalid property path when saving WhatsApp data

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?

Hey! Can you:

  • execute the workflow
  • highlight the firestore node and the previous node
  • PIN the data (press P)
  • Copy
  • paste here like so

Hey, this is how you do it. You only pass the column names in the Firestore node, which should correspond to input values which you can set before that. Firestore node will pull the values automatically.

Hope it helps! Feel free to mark it as Solution if it does.

2 Likes

Thanks mate, Solved.

Nice, please mark my workflow as Solution :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.