how to insert document id/uid into the document created

How can I insert the document ID into the document that was just created?

I see for the users collection, it automatically creates the UID as a field when a user is created, I want to be able to do the same thing for other collections. Is this possible?

3
2 replies