OK. What you can do for now is to get the flow function that let’s you get firebase user details from the market, jus type firebase on the flow function market, you’ll see it. Then use that function to get the UId and store it as an app variable. Then use that ID as a custom id for your Firestore document.
Use the link below, it will show you how to post and patch with a custom id
Sorry for the detailed query, I am new to this @F_ORTELL
In my request body, “fields” replaced by my firestore database collection name and inside the “fields”, properties that matches the schema of the database collection, am I right?
I guess you look into my flow functions and all are correct except your point above…
Sign-up user working fine but no record is creating on my data base. Is there any mistake in flow function or request body.
Also tried this format request body bellow… still the same.
{userInfo:{"userName": pageVars.userInfo.userName , "userEmail": pageVars.userInfo.userEmail , "userPassword": pageVars.userInfo.userPassword , "useridToken": pageVars.userInfo.useridToken , "uselocalId": pageVars.userInfo.userlocalId}}
Please please help me to get out of this..
I made exactly what you say in your post above… still the record is not creating while sign up with new email… Sign-up flow works then send verification mail also user added in firebase authentication with UID… all set. But the user record is not creating on data base now.
I took the appVars UID’s value binding screenshot above to make sure you that it is correct.
Before following your instructions, I tried using create record flow function with support of pageVars object with properties… it create record on firebase with random Document ID.
The points 1 & 2 are same as like you in my project.
But the third point, there is different than yours…Let me elaborate.
In my case, when an user register(sign-up) on my app, he needs to provide a Name+email id + Password and hit enter to register. Am using Firebase Rest API HTTP request to register user here. You can see Sign-Up HTTP flow function on the screenshots above.
I connected the next flow function Get current user to the signup flow then assign the output of get current user to a appVars UID with value uid from the output. Then your part comes… HTTP request with PATCH… to create record on my firebase DB.
Yes you’re on the right path, what need is to be able to create any record n firestore using http request… If can manage that, then you can add custom keys to the request and the body.just do a simple record to send. That way you’ll know where the problem is. Also make a toast that shows response code or message.
I think you understand wrong(because of my poor explanations). I didn’t create record using HTTP request, I said that I can create request by using “Create Record” flow function by adding Data Variable, but in this case document ID of my record is generated automatically by firestore itself @F_ORTELL
I am just telling you that I am able create record using create record flow function that create record using auto document ID…
But the HTTP request with PATCH method from your instruction wont work in my App, that’s what I am saying to you. If it works, then only I can create document in firebase with Document ID as UID like you said. @F_ORTELL
ok, I can try that also. I have one more doubt @F_ORTELL
Do I need to create record first using HTTP request POST method and then again use another HTTP request with PATCH method to set the custom ID to the record?
Maybe there’s something wrong with the code I sent,but I can’t test it coz I left my pc. However, you use http request to send data with custom id… Look for other posts talking about setting custom id in the forum, um sure you can find something.
I did it @F_ORTELL Thank you very much for your support, really appreciate that.
The problem is with my appVars, use toast on all the node to track the flow. Then I realize that they stop at appVar that I has set before HTTP request. Digging on that I got the solution and fixed the issue.
Now I can create or update record using PATCH method with custom ID. Thanks again.