Hi Everyone,
I’m new to N8N, but not so new to Firestore. I have a cloud function working with N8N to look at applications that are missing documents and are essentially overdue. It sends reminders and NOW updates Firestore.
The documentation for the Google Firestore N8N plugin is fairly limited. Even Cursour and ChatGPT couldn’t get it to work!
After days and days of trial and error (lots of errors), I finally have a working flow that retrieves data from the Cloud function, then sends an email to each overdue user, and updates each Firestore document.
The biggest issue I faced was that the document ID was always coming up undefined. I tried the suggested {{ $json.docId }} and everything looked ok, but never worked. Also, I tried using an expression to set the field names. That didn’t work, and all the AIs said to just click a button to add a new field. Well, that wasn’t available.
The fix:
As you can see in the image, I removed the {{ $json.docId }} and replaced it with docId, and the fields, just a comma-separated list.
Now the flow executes, and my members get a reminder email, and their application document is updated.
I hope this helps anyone else struggling with the Firestore node.
Cheers
OzNick

