← Firebase Admin SDK

New Child Object in a Realtime Database from Firebase Admin SDK API

Pipedream makes it easy to connect APIs for Firebase Admin SDK and 900+ other apps remarkably fast.

Trigger workflow on
New Child Object in a Realtime Database from the Firebase Admin SDK API
Next, do this
Connect to 900+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New Child Object in a Realtime Database with Firebase Admin SDK API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New Child Object in a Realtime Database trigger
    1. Connect your Firebase Admin SDK account
    2. Configure Polling Interval
    3. Configure Path
  2. Add steps to connect to 900+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Send Message with Discord Webhook API on New Child Object in a Realtime Database from Firebase Admin SDK API
Firebase Admin SDK + Discord Webhook
 
Try it
Add Multiple Rows with Google Sheets API on New Child Object in a Realtime Database from Firebase Admin SDK API
Firebase Admin SDK + Google Sheets
 
Try it
Get Film with SWAPI - Star Wars API on New Child Object in a Realtime Database from Firebase Admin SDK API
Firebase Admin SDK + SWAPI - Star Wars
 
Try it
Create Multiple Records with Airtable API on New Child Object in a Realtime Database from Firebase Admin SDK API
Firebase Admin SDK + Airtable
 
Try it
Custom Request with HTTP / Webhook API on New Child Object in a Realtime Database from Firebase Admin SDK API
Firebase Admin SDK + HTTP / Webhook
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New Child Object in a Realtime Database on Firebase Admin SDK
Description:Emit new event when a new child object is discovered within a specific path
Version:0.0.2
Key:firebase_admin_sdk-new-child-object

Code

import common from "../common.mjs";

export default {
  ...common,
  key: "firebase_admin_sdk-new-child-object",
  name: "New Child Object in a Realtime Database",
  description: "Emit new event when a new child object is discovered within a specific path",
  version: "0.0.2",
  type: "source",
  dedupe: "unique",
  props: {
    ...common.props,
    path: {
      propDefinition: [
        common.props.firebase,
        "path",
      ],
    },
  },
  methods: {
    ...common.methods,
    async processEvent(event) {
      const { timestamp } = event;
      const ref = this.firebase.getApp().database()
        .ref(this.path);
      const snapshot = await ref.get();
      const children = snapshot.val() || {};
      for (const [
        key,
        value,
      ] of Object.entries(children)) {
        const meta = this.generateMeta(key, timestamp);
        const child = {
          [key]: value,
        };
        this.$emit(child, meta);
      }
    },
    generateMeta(key, timestamp) {
      return {
        id: key,
        summary: `New child object: ${key}`,
        ts: timestamp,
      };
    },
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Firebase Admin SDKfirebaseappThis component uses the Firebase Admin SDK app.
Polling Intervaltimer$.interface.timer

Pipedream will poll the API on this schedule

Pathpathstring

A relative path to the location of child data

Authentication

Firebase Admin SDK uses API keys for authentication. When you connect your Firebase Admin SDK account, Pipedream securely stores the keys so you can easily authenticate to Firebase Admin SDK APIs in both code and no-code steps.

  1. Enable the Cloud Firestore API on your Firebase account, and make sure you've created at least one collection in the database.

  2. Follow these instructions to generate a private key tied to your Firebase service account. This will generate a JSON file that contains the project ID, private key, and client email that you should paste below.

  3. When entering the private key, please add the full string included in the JSON file, from -----BEGIN PRIVATE KEY----- to -----END PRIVATE KEY-----, with all newline characters included.

About Firebase Admin SDK

Firebase is Google's mobile platform that helps you quickly develop high-quality apps and grow your business.

More Ways to Use Firebase Admin SDK

Triggers

New Document in Firestore Collection from the Firebase Admin SDK API

Emit new event when a structured query returns new documents

 
Try it

Actions

Create Document with the Firebase Admin SDK API

Creates a New Document. See the docs here

 
Try it
Create Firebase Realtime Database Record with the Firebase Admin SDK API

Creates or replaces a child object within your Firebase Realtime Database. See the docs here

 
Try it
List Documents with the Firebase Admin SDK API

Lists documents in a collection. See the docs here

 
Try it
Save Event to Firestore with the Firebase Admin SDK API
 
Try it
Update Documents with the Firebase Admin SDK API

Updates a Document. See the docs here

 
Try it