Create Record with custom id

Hey Folks!! I am new to composer pro and been using it for a dummy project of mine. I was trying to setup a proper login using appgver’s firebase integration.
However, I need to keep authentication collection and user info collection mapped or with same id.
I need help understanding if there is any tweak to give custom id while using Create Record Flow function. I am not getting option to bind values to id field currently and so it is creating records with auto id.

You could use another field called user_id.

Hi brother, I am facing the same issue and trying find solution pass 2 week
there is a document mentioning can create but the method not working for me

Even i have go through few forums
link :REST API for Google Firestore Tutorial
many has mentioned its works for them but I get the method .

1 Like

Hi @Jaya_Seelan - Correct, this does work! Actually this is the only way I have managed to get it to work.

Why is this method not working? Whap happens?

This is my Config for Create Record:

To avoid to enter a lot of data into my field, I set the Schema to ‘No request body’:
image

My Test response

The new record in the DB:
image

Hope this helps :slight_smile:

Michael

2 Likes

Hey, I was trying to use firebase services to create end-to-end user login n user based application. Using another Id won’t enable to use any relationship between authentication database and user info database.

The straight forward way will be to follow this amazing youtube tutorial. All credits to the channel owner :slight_smile:
Appgyver / Firebase CRUD - 1 Setup Firebase - YouTube

Hello, Michael,

I followed your configuration, but this didnt work for me. Can you help me, please ?

BASE CONFIG

obs. I have Firebase Authentication integrated

POST CONFIGS

Look it doesnt show id field for this, why ?

Thanks in advance

try setting your key (id) like this
image

when you have it set to static it doesn’t show as variable in test tab (because its static)

Hi!
Would you help me to configure an HTTP request flow fonction to create a document with a custom document ID. I know how to create document this way but firestore always generate random id for the document. I would like to use the user mail as custom id for a users collection.

Thank you

Have you got the answer now? I am also stucked for this.