How do I write to FireStore database?

Hi all,

I am trying to convert an app from using Airtable to using Firestore instead. Fort that, as a try out I wrote a simple app to get each record in Airtable separately by keying in the recordID and storing all the attached data in corresponding cloud variables.

However, from that point on I am stuck: URL and API Key for Firebase are set, I created a Web API with the FireStore URL but I don’t know how to post the cloud variables into the FireStore database.

Changing the URL to the one for the Firebase RealTime Database works, i.e. the cloud variables are stored in the RTDB, but that means that each time new values are sent, they (of course) replace the older one.

I have read the older topics on this subject and tried what I could, but it seems that there have been changes viz. FireStore in Thunkable? In short: what do I need to do to add data in a FireStore database, using Thunkable cloud variables - or any other method?



1 Like

When using cloud variables in Thunkable, you can replace part or all of a Firebase Realtime Database path so it’s not necessary to always replace every value. You can change a single value if you need to. But it can be kind of a pain to figure out how to specify the correct path especially when lists/arrays are involved.

I haven’t used Firestore with Thunkable so I can’t help you there.

1 Like

You’d use the rest api OR set up a backend server to handle these requests as a middle man.

1 Like

Thank you tatiang!

OK thanks jared! I was hoping for something easy, but it seems working with Firestore is not as simple as with Airtable or Firebase RTDB.