Firebase Extensions

Firebase Extensions help you deploy functionality to your app quickly with pre-packaged solutions.

Once installed, a Firebase Extension performs a specific task or set of tasks in response to HTTPS requests, Cloud Scheduler events, or to triggering events from other Firebase products, like Cloud Firestore or Firebase Cloud Messaging.

Explore Extensions Hub Learn how to install an extension Learn how to build your own extension

Key capabilities

Reduce time spent on development, maintenance, and growth

Since an extension is a packaged solution, all you do is install and configure the extension.

With extensions, you don't spend time researching, writing, and debugging the code that implements functionality or automates a task for your app or project.

Explore Extensions Hub to find solutions for your app or project.

Built to be configurable and reusable

Each installed instance of an extension is unique.

You specify configuration values for the extension that are unique for your app, project, or use case. Depending on what the extension does, these values could be almost anything: a Cloud Firestore path, image dimensions, or a GitHub URL.

You can reuse the same extension in different projects. You can even install multiple instances of the same extension in a single project. Each installed instance can have its own customized configuration.

Integrates the Firebase platform

Extensions can fill that missing piece of your existing architecture.

Extensions can respond to events generated by the Firebase products that you already use in your app. A change in one Firebase product can trigger an extension to perform its task, even a task using another product. For example, a specific Realtime Database write can trigger sending a new Firebase Cloud Messaging notification.

An extension can also integrate your Firebase project with other Google Cloud Platform products (like BigQuery and Google Translate) or even third-party services (like Mailchimp and Bit.ly).

And triggering events aren't limited to Firebase events; you can even trigger an extension directly with an HTTPS request, or at a scheduled interval.

Security and limited access

The application logic for extensions runs on the backend, using Google Cloud Functions, so the code is fully isolated from the client.

Also, extensions themselves are isolated from the rest of your project because an installed extension is granted limited access to only the resources and data that are clearly listed before installation.

Zero maintenance

Install and configure an extension for your Firebase project. After that, the backend automatically scales computing resources up and down to match the needs of your extension.

You never worry about credentials, server configuration, provisioning new servers, or decommissioning old ones.

How does it work?

At its core, a Firebase Extension is code that performs a task whenever a specifically defined event occurs in your app or project.

An extension's logic is written using Cloud Functions for Firebase. The functions in an extension define the event providers and the conditions that trigger execution (for example, a Cloud Firestore write, an HTTPS request, or a Cloud Scheduler event).

Even though extensions use functions, a key differentiating feature between extensions and functions is that an extension relies upon an extension.yaml specification file, which explicitly defines:

  • The Google services (APIs) that the extension will use
  • The access roles that the extension requires to operate
  • The extension-specific resources that the extension requires to operate
  • The configurable parameters for the extension

You can install an extension in a project multiple times, with each installed instance having a different configuration.

When you install an instance of an extension, Firebase does the following:

  1. Prompts you to specify the required configuration values (parameters) to be used for this instance of the extension.
  2. Enables the listed APIs from the extension.yaml file for the project.
  3. Creates a new service account to be used by this instance of the extension, and assigns it the listed access roles. The extension instance executes its code using the access granted to this service account.
  4. Provisions the listed resources for the extension instance (for example, a function).

Note that each installed instance of an extensions has its own service account and individually-provisioned resources.

In addition to the extension.yaml file, the extension directory also includes instructional files, like the README, which contain information to help you complete further configuration tasks or generally use the extension.

After installation, you can reconfigure an extension (specify new parameter values) as well as update an extension to a newer version. You can also uninstall an extension from your project at any time.

Both the Firebase CLI and the Firebase console allow you to install, view, and manage extensions.

Implementation path

Find an extension

Explore the extensions available in Extensions Hub.

Evaluate, install and configure an extension

When you find an extension that solves a need in your app or project, you can evaluate the extension with the Extensions emulator, then install the extension via the Firebase console or the Firebase CLI.

Configure the extension so that it's customized for your app or project.

Manage the extension

View and manage the installed extension using the Firebase console or the Firebase CLI.

Next steps