_ID from Insert Document in Firestore


When inserting a document via the Insert Document Action, an ID is returned to the Retool application, but querying that newly created document via my web application, the ID is blank.

If I then update the document from Retool with out changing any information, the ID now shows in my web app.

Is this normal?

Hi @Elam_Daly,

Can you share how you are querying the newly created document?

Are you re-triggering the get request after you insert the document? As described here


I am refreshing the table as described after inserting a document. The problem is that my web app, when querying Firestore, does not receive an ID for the newly created document unless I update the document, with no changes, from Retool first.

Now to test I wrote a dead simple cli program in Node and inserted a document and my web app did receive an ID, so I'm wondering if it's the method used by Retool to insert documents. My CLI uses the Node API's underlying addDoc() method.

FYI, I cloned the Firebase Admin template as a starting point.

Ok i feel dumb. I had a blank ID field in my form, marked as read only. Really for just displaying the ID, but it was being included in the insert call, and thus it was blank.


1 Like

Oh I'm glad that explains it! Thanks for sharing :sunglasses: