Firestore node creating a new 'undefined' document instead of updating existing one

Describe the problem/error/question

The firestore “Create of Update” node is creating a new document even when the provided document id does exist.

What is the error message (if any)?

No errors, just an “undefined” document being created with the correct field and value.

Please share your workflow

The query IS returning a valid document id and the id is correctly being transferred to the appropriate slot:

Share the output returned by the last node

[
{
“updateTime”: “2025-08-30T15:58:05.827878Z”,
“status”: {},
name": "projects/pm-academy-web-app/databases/pm-academy-database/documents/lessons/2025_9_5(12:00)_g7hGWS7IJ4ge5Qc3ZDJZDkyGtPy1”,
id": "2025_9_5(12:00)g7hGWS7IJ4ge5Qc3ZDJZDkyGtPy1",
“google_calendar_sync_status”: “synced”,
“document_id”: "2025_9_5
(12:00)_g7hGWS7IJ4ge5Qc3ZDJZDkyGtPy1”
}
]

Information on your n8n setup

  • n8n version: 1.107.4
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n UI
  • Operating system: Windows 11

Hi there @SPM , i would suggest to rather use create or update node, to use just create a document node, so the expected output are always creating and not updating, also the same if you only want to update a document, to just use the update a document

it’s just easier to maintain because you know that they only have. 1 action, and you can route them with like an if node to determine which action should you take, update or create

hope it helps!

1 Like

Hello, there is no action to just update a document. “Create or update” is the only one that allows updating. Even Firestore doesn’t have an “only update” action, just a patch endpoint which does create a new document if the key isn’t found, meaning I can’t build an http request manually. Is there any way I can contact n8n support? Because this really looks like a bug. Still, thank you for your help.

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