How to get firestore auto generated document Id

I have created a form contains multiple fields that the user should enter to create a new document in a collection. The problem is I dont want the user to enter the value of the id field manually I want to get the firestore auto generated document Id and set it to that field, so that the document id and the id field value are the same.
Is there anyway to achieve that ?

Thank you!

You can simply leave this field empty and then it will be automatically generated by Firestore.

If you’re looking to set a record field of say “document ID” to the name of the document ID that is auto generated when the record is created you’ll need to set up an automation that set’s up and sets the value after it is created…

Is that the end goal? To have a field in the record that matches the name of the firestore document?