Firebase Auth, Firestore & Storage (plugin)
  • 🚀Getting Started
  • Setup
    • Create a Firebase Project
    • Get Firebase access credentials
    • Offline Support
    • Secure your credentials and data
      • Restrict your api-key to your domain
      • Security Rules on Firebase
  • Plugin Elements
    • 🛠️About elements
    • 💾Data Schemas
    • Firebase Auth (Current User)
    • Firestore Data List
      • Firebase Geohash
      • Firestore Data (legacy)
    • Firestore Data Extractor
    • Firestore Data Single
    • Firestore Data Aggregation
    • Firestore Data Processor
    • Firebase Storage Upload Button
    • Firebase Action Listener
    • Firebase Dropdown Processor
  • Plugin Front-end Actions
    • 💻About front-end actions
    • 💾Field types table
    • Firestore
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
      • Batch Operations
        • Batch Operation Constructor
        • Batch Operation Commit
    • Firebase Auth
      • Sign the User Up
      • Log the User In
      • Log the User In with Google
      • Log the User In with Facebook
      • Log the User In with GitHub
      • Log the User Out
      • Update User's Profile
      • Update User's Password
      • Update User's Email
      • Send password reset email
        • Handle reset password code
      • Send verification email
        • Handle verify email code
      • Delete current user
    • Firebase Storage
      • Upload file base64
      • Delete uploaded file
  • Plugin Back-end Actions
    • ☁️About backend actions
    • Firestore Backend
      • Get a list of documents
      • Get a single document
      • Count a list of documents
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
    • Firebase Auth Backend
      • Create an account for someone else
      • Update another user's profile info
      • Delete a user account
      • Generate email confirmation link
      • Generate password reset link
      • Set user roles
Powered by GitBook
On this page
  1. Plugin Elements

Data Schemas

PreviousAbout elementsNextFirebase Auth (Current User)

Last updated 11 months ago

From v4.4.0, we have added to the plugin the possibility of linking "data types" do documents read from a , or elements.

Since v4.5.0, and elements also receive the "data schema" option.

You can see a sample of the "task manager" app using data schema on this editor ->

That mean you can define a type of "thing" on an use it to map the fields of your Firestore Documents, making the extraction of data from the document fields as easy as selecting a property in a Bubble "thing".

Here is how to do it

  1. Install the Bubble API Connector on your Bubble app

  1. Click on "Add another API"

  1. Click on "Add another call"

  2. Give the API Call the name you want your document type to have (e.g. "task"). Make sure the "Data type" of the call is "JSON".

  1. Click on the "Manually enter API response" option

  1. Get a sample, in JSON, of the Firestore document you want to create a schema to, and paste it on the popup window.

Hit "Save" and choose how you'd like each field to be treated from Bubble. For instance, as a text, number or date.

Important! Reference fields must be treated as texts. The plugin will always convert firestore reference objects into a path to the document (e.g. tasks/document_id)

  1. Now, on one of the supported element, you can define the "data schema" as "task"

  1. Then, you can access the document's fields from the "data (w/ schema)" state.

You can you our "" to turn the raw JSON string returned by elements into a "data schema" you can you on the API Connector.

💾
schema builder
Firestore Data Single
Firestore Data List
Firestore Data Single
Firebase Auth (Current User)
Firebase Data Extractor
Firebase Data Processor
https://bubble.io/page?type=page&name=tasks-with-schema&id=estare-plugin-firestore&tab=tabs-1
Bubble's API Connector