Firestore Create/Update upsert into subcollection

I’m new to n8n… what am I doing wrong here? Is this a bug or not supported?

When my workflow executes a document is created in my subcollection (users/{user-id}/videoAskQuestions) with an id of undefined even though it appears as though it should work see screenshots:

this is in Firestore:

Hi @benneic, welcome to the community! I hope you’re having a good day thus far?

In the update key field you’d define the name of the field which holds the id of the document to update (or create). So in your example, n8n would use a field with a name of 02266c88... which does not exist (and thus would have an undefined value).

Instead you’d need the name of the field with the respective value:

Example workflow

I hope this makes sense and helps! Let me know if you still run into any trouble afterwards.

Awesome, that works now! And obvious what *Update Key * means now that I’ve had a sleep and come back to it…

Update Key = “Provide the key that corresponds to the value in the input used to identify the document for create and update operations.”


1 Like