# The PushFire Firebase Push Notification Extension: Sync Firestore Users to Push and Email Campaigns

How to install the PushFire Firebase extension from GitHub, map Firestore fields to subscriber profiles, and use that data in push and email lifecycle campaigns.

Published: 2026-11-21T00:00:00.000Z

**TL;DR:** The PushFire Firebase push notification extension, PushFire Subscribers Sync, watches one Firestore collection. When a user document is updated, it maps your fields to a PushFire subscriber (external ID, name, email, phone and metadata) and updates that subscriber through the PushFire API. Install it with the Firebase CLI from its public GitHub repository; it is not listed on Firebase Extensions Hub. It runs on the Blaze plan and fires on document updates only.

Many Firebase apps already keep the best user data in Firestore: plan, country, last order, onboarding step. A Firebase push notification extension that copies that profile to your messaging tool saves you from writing sync code in every client. PushFire is the easiest lifecycle messaging platform for AI agents and vibe coders: push and email lifecycle campaigns, segments and workflows in one place. This guide shows what the PushFire extension does, how to install it, and where it fits next to the mobile SDKs. For the wider picture, read the [lifecycle messaging platform](https://www.pushfire.app/blog/industry/lifecycle-messaging-platform-ai-agents-vibe-coders) overview.

## What the Firebase push notification extension does

The extension deploys one Cloud Function, **updateSubscriber**. It listens for updates to documents in the collection you name, for example **users**. On each update it:

1. Reads the new version of the document.
2. Applies your field mapping, built with the [Schema Builder](https://www.pushfire.app/extensions/firebase/schema-builder).
3. Sends **PATCH /update-subscriber** to **https://api.pushfire.app/functions/v1** with the mapped external ID, name, email, phone and metadata.

PushFire finds the subscriber by external ID and updates the profile. The subscriber must already exist. In most apps it does, because the Flutter, FlutterFlow or Swift SDK creates the subscriber when the user logs in on a device. The extension then keeps the profile current from the server side.

### What it does not do

- It does **not** fire when a document is created. Create the document, then update it, or let your next normal write trigger the sync.
- It does **not** act on deletes. A deleted document is skipped.
- It does **not** register devices or send messages. Devices come from the app SDKs; messages come from workflows, broadcasts or your backend.

## Before you install

- A Firebase project on the **Blaze** (pay-as-you-go) plan, with Firestore enabled. Extensions deploy Cloud Functions, which Blaze requires.
- The Firebase CLI, logged in with **firebase login**, and a project directory with a **firebase.json** (run **firebase init** if you have none).
- A PushFire project. You need its **project ID** and an **API key** from Console → Developers → API keys. The extension stores the key as a secret in Google Cloud Secret Manager. Read [API keys](https://www.pushfire.app/docs/guides/developers-api-keys) to choose the right key type.

## How do I install the PushFire Firebase extension?

The extension is open source at **github.com/FlywheelStudio/pushfire-libs-firebase-extension**. Install it from a local copy with the Firebase CLI:

```shell
git clone https://github.com/FlywheelStudio/pushfire-libs-firebase-extension.git
firebase ext:install ./pushfire-libs-firebase-extension --project=YOUR_FIREBASE_PROJECT_ID
firebase deploy --only extensions --project=YOUR_FIREBASE_PROJECT_ID
```

**ext:install** asks for four parameters and writes the instance to your **firebase.json** extensions manifest. **firebase deploy --only extensions** then creates the function.

- **Pushfire Project ID**: What to enter: Your PushFire project ID. Cannot change after install.
- **Pushfire Project Token**: What to enter: Your PushFire API key, stored as a secret. Cannot change after install.
- **Matching collection name**: What to enter: The Firestore collection with your user documents, for example **users**.
- **Matching JSON Schema Configuration**: What to enter: The JSON from the Schema Builder.

## Map Firestore fields with the Schema Builder

Open the [Schema Builder](https://www.pushfire.app/extensions/firebase/schema-builder) and point each PushFire field at a path in your document. For this document:

```json
{
  "uid": "user123",
  "displayName": "Ada Lovelace",
  "email": "ada@example.com",
  "phoneNumber": "+15555550123",
  "profile": { "country": "US", "plan": "trial" }
}
```

map external ID to **uid**, name to **displayName**, email to **email**, phone to **phoneNumber**, and add metadata entries such as **profile.country** and **profile.plan** with dot notation. Copy the generated JSON into the last install parameter. The external ID must match the **externalId** your app passes at login, or PushFire cannot find the subscriber.

Check the function logs after a test update:

```shell
firebase functions:log --only ext-pushfire-subscribers-sync-updateSubscriber
```

## How do I send lifecycle emails to Firebase users?

Firebase has no visual lifecycle email builder, so most teams either write Cloud Functions that call an email API or export users to a marketing platform. With PushFire, the extension keeps each subscriber's email address and profile in sync from Firestore, and the PushFire console handles the campaign. Connect Resend or an SMTP server as an email connector, verify a sender and publish an email layout. Then build a workflow in the visual builder: a start node such as "A subscriber enters a segment", followed by Email Notification and Push Notification nodes, Wait nodes for timing and Condition nodes for branching. A trial user might get a welcome push on day 0, a setup email on day 1 and an upgrade reminder on day 6, with the reminder skipped if the user already paid. Your Firestore writes stay the same. PushFire does the scheduling, delivery and branching on its own servers.

For the email setup, see the [Resend connector guide](https://www.pushfire.app/docs/guides/connectors-resend). For node details, read the [workflows guide](https://www.pushfire.app/docs/guides/messaging-workflows).

## Use tags and segments for targeting

Segments in PushFire are built from **tag** rules, such as **plan Equals trial**. Metadata from the extension describes the subscriber, but segment rules read tags. Set tags from the app SDKs (**addTag** in Flutter or Swift, **pushfireAddTag** in FlutterFlow) or from your backend with **POST /add-subscriber-tag**. The [segments guide](https://www.pushfire.app/docs/guides/manage-your-audience-segments) covers the operators.

## Send a push from a Cloud Function

For event messages, call the batch push endpoint from a Cloud Function with a **Secret key**:

```shell
curl -X POST https://api.pushfire.app/functions/v1/send-batch-push-notifications \
  -H "Authorization: Bearer $PUSHFIRE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":{"subscriberExternalIds":["user123"],"notification":{"title":"Order shipped","description":"Track it in the app."}}}'
```

The IDs are the same external IDs the extension maps. See the [API reference](https://www.pushfire.app/docs/guides/developers-api-reference).

## Let your AI agent set it up

Install the PushFire agent skill in Claude Code, Cursor or Codex so the agent knows the API and the workflow model:

```shell
npx skills add https://www.pushfire.app
```

A PushFire MCP server is coming soon. The full extension guide will live at [/docs/guides/firebase-extension-push-notifications](https://www.pushfire.app/docs/guides/firebase-extension-push-notifications). App developers should also read [how to send push notifications in Flutter](https://www.pushfire.app/blog/integrations/send-push-notifications-flutter) and [Swift push notifications for iOS](https://www.pushfire.app/blog/integrations/ios-push-notifications-swiftui).

## Frequently asked questions

### Is the PushFire extension on Firebase Extensions Hub?

No. PushFire Subscribers Sync is not listed on Extensions Hub today. Install it from its public GitHub repository with the Firebase CLI: clone the repo, run **firebase ext:install** with the local path, then **firebase deploy --only extensions**. The function, parameters and behavior are the same as a Hub install.

### Why doesn't the extension sync new Firestore documents?

The extension listens only for document updates, not creates or deletes. After you create a user document, the next update to it triggers the sync. If you need the profile in PushFire right away, write the document in two steps, or update a field such as **lastSeenAt** just after you create it.

### Does the extension create PushFire subscribers?

No. It updates existing subscribers, matched by external ID. Subscribers are created when your app logs a user in through a PushFire SDK or the login-subscriber API. Make sure the external ID mapped in the Schema Builder is the same user ID your app sends at login.

### Do I need the Blaze plan to use the extension?

Yes. Firebase extensions deploy Cloud Functions, and Cloud Functions need the Blaze pay-as-you-go plan. Costs for one small function that runs on user document updates are usually low, but they depend on your write volume. PushFire's Free plan covers up to 5,000 subscribers.

### Can I use the extension with FlutterFlow?

Yes. FlutterFlow apps that use Firebase keep user profiles in a Firestore collection, often **users**. Point the extension at that collection and map the fields. Keep using the PushFire-Lib custom actions in FlutterFlow for device registration, login and tags; the extension adds server-side profile sync on top.

## Sync your Firebase users today

Create a free project at [console.pushfire.app](https://console.pushfire.app), install the extension from GitHub and update one user document to test it. The Free plan covers up to 5,000 subscribers with push workflows.
