Skip to main content

Firebase Realtime Database

Firebase is a highly durable database that can scale automatically to handle your application’s load.

Prerequisite

  1. Firebase Configuration Details: Obtain the necessary configuration details from the Firebase console. Navigate to your Project settings and select the Service accounts tab. Click on the Firebase Admin SDK icon, and generate a new private key. This action will result in the download of a JSON file. Extract the Private key from the downloaded JSON file, as you will need it for configuring the Firebase Connector.

    Obtaining details from Firebase Console
    Obtaining details from Firebase Console
  2. Optionally, Google Cloud Platform Account Key: If preferred, you can create an account key from your Google Cloud Platform (GCP) console. Follow these steps:

    1. Select a project in your GCP console.
    2. Click on "Create Service Account" and assign the role of "Firebase Admin."
    3. Opt for a JSON Key type and proceed to download the generated file. Ensure to keep this file accessible, as it will be required for configuring the connector.

Configuring Connector in DronaHQ

Configure your database category using the provided details. Validate connection with Test connection and Save settings for secure database setup.

General

FieldDescription
Firebase Database URLEnter the URL of your Firebase Realtime Database, e.g., https://your-project.firebaseio.com.
Private KeyPaste the contents of the Private Key obtained from the Firebase console or GCP console.
Firebase Realtime Database with Sample details.
Firebase Realtime Database with Sample details.

Admin

Advanced OptionDescription
Connection OptionsThe key and value connection options in database configuration refer to specific settings (keys) and their corresponding values that dictate how the application connects to the database
Whitelist IP Enhance security by restricting database access to specific whitelisted IP addresses.

Adding Data Management Queries for Firebase Realtime Database

After successfully configuring the Firebase Realtime Database connector, you can adeptly manage data-related operations. Focus on adding queries that involve the "Append data to the list" action:

  1. Define Query Name: Assign a distinctive name to your data management query. This name will serve as an identifier within your Connector Library, simplifying access and management.

  2. Select Action - Append data to the list: Navigate to the Firebase Realtime Database connector options and choose the Append data to the list action. This action empowers you to seamlessly add new data entries to an existing list in your Firebase Realtime Database.

  3. Configure Data Input: Define the data you want to append to the list. Input the necessary values, ensuring they align with the structure of the list you intend to update.

ParameterDescription
Database RefReference a specific path within the Firebase Realtime Database for data retrieval or manipulation.
OrderingDefine the order in which data is retrieved or displayed (e.g., ascending or descending).
ValueSpecify the data value to be appended or updated within the Firebase Realtime Database.
  1. Test and Execute: Prior to finalizing, conduct a test run to verify the query's functionality. Ensure that the appended data appears correctly within the designated list in your Firebase Realtime Database.

    Firebase Realtime Database with append query.
    Firebase Realtime Database with append query.
tip

Use double curly brackets for dynamic variables. Test with sample values before saving. Link dynamic variables to controls/actions and more for runtime use.

Saved queries appear under your connector in Connector Library.

Supported Actions

ActionDescription
Query Firebase dataRetrieve data from the Firebase Realtime Database based on specified criteria.
Set DataAdd or update data at a specific path within the Firebase Realtime Database.
Update DataModify existing data at a specific path within the Firebase Realtime Database.
Append data to the listAdd new data to an existing list at a specific path within the Firebase Realtime Database.
Delete dataRemove data from a specific path within the Firebase Realtime Database.

Using Firebase Realtime Database Connector

Appending Data to a List

To append data to a list within the Firebase Realtime Database using the Firebase Realtime Database Connector, follow these steps:

  1. Access Data Bind Section or Control Action:

    • Navigate to the data bind section of the control.
  2. Select Firebase Realtime Database Connector from Data Bind Options -> Quick Select -> Data Queries:

    • Choose Firebase Realtime Database Connector from the available options.
    • Select the "Append data to a list" action to add new data to an existing list.
    • Click on "Continue" to proceed.
    Firebase Realtime Database with append query.
    Firebase Realtime Database with append query.
  3. Configure Data Input:

    • Specify the Database Ref, which is the reference to the existing list where you want to append data.
    • Provide the values to append as dynamic values. This can include any type of data, arrays, or objects.
  4. Integrate with Controls and Actions:

    • Integrate this query into your workflow by adding controls like a TextInput field for user input.
    • Create an action flow that triggers the Connector action to append data.
    • Configure the connector to pass the value from the TextInput control as input.
Append data workflow
Append data workflow