Documentation

Welcome to Retool! We're a fast way to build custom internal software.

You'll find the 5 minute demo, quickstart guide, and documentation for each of our connectors and components here. If you've got any questions -- chat with us on the bottom right!

Get Started    Guides

Firebase Integration

Retool supports Firebase's Admin API and allows you to create your custom admin interfaces to manage your Firebase application.

Retool supports managing users, querying and updating from Firebase Real-time Databases, and querying from Firestore.

Setting up Firebase

In the resources selector view - choose "Firebase." You will be prompted to provide a Service Account Key as well as a Database URL. The Service Account key is a JSON blob that you can create from your Firebase console, and the Database URL is how you can inform which database Retool should use. For more information on how you can obtain these fields see Firebase's documentation https://firebase.google.com/docs/admin/setup

Your configuration should resemble something like the screenshot below

After providing the Service Account Key and the Database URL, hit "Save." Retool will validate that it is able to connect to your Firebase database and then save. If instead you are looking to integrate Retool with Firestore, you need only fill in the Project Id section on this form.

Querying Firebase

You can now begin to use Firebase's API from within Retool.

User management

We support all the APIs documented here for managing users - https://firebase.google.com/docs/auth/admin/manage-users

Database

Retool currently only supports performing queries against the database using Firebase's ordering + range + limit query operations. Below is an example of such a query:

Firebase doesn't always return arrays of objects!

Retool doesn't do any transformations on the data that Firebase returns, and it won't always be an array of JSON.

To display the data in a Table, you'll probably want to use something like this:

{{ _.values(firebaseQuery.data) }}

Or in more advanced cases where you would also like to pull in the Firebase key:

_.zipWith(_.keys(firebaseQuery.data), _.values(firebaseQuery.data), (key, value) => Object.assign({}, { key: key}, value))

Querying Firestore

To begin querying data in Firestore you must first fill in the Project Id property on the Resource screen. Once that's been completed, you will be able to write simple queries on Firestore. Here is an example of such a query.

Snapshot metadata

Retool also automatically adds an _id field to the returned data which will be the record's id.


-->