Use the easiest to manage and most widely supported network virtualization platform to connect all your devices, cloud VMs, and apps as if the whole world is one big cloud region!
Emit new event when a new child object is discovered within a specific path
Emit new event when a structured query returns new documents
Authorize a specific member (node) in a network. See docs here
Creates or replaces a child object within your Firebase Realtime Database. See the docs here
Delete a specific member (node) in a network. See docs here
ZeroTier is a smart Ethernet switch for Earth. It's a global distributed network that connects devices, VMs, and apps with a simple, secure, and ubiquitous network fabric. The ZeroTier API allows you to manage networks, members, and access rules programmatically. With Pipedream's capabilities, you can automate interactions with ZeroTier, integrating it seamlessly with other apps and services to orchestrate complex workflows, react to events, or sync data across platforms.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
zerotier: {
type: "app",
app: "zerotier",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://my.zerotier.com/api/v1/org`,
headers: {
Authorization: `Bearer ${this.zerotier.$auth.api_token}`,
},
})
},
})
The Firebase Admin SDK API provides powerful backend functionality for Firebase apps. It allows you to interact with Firebase services like Firestore, Firebase Realtime Database, Firebase Storage, and Firebase Authentication directly from a server. With Pipedream, you can harness this API to automate complex workflows, respond to Firebase events in real-time, and integrate with countless other services.
import admin from "firebase-admin"
export default defineComponent({
props: {
firebase_admin_sdk: {
type: "app",
app: "firebase_admin_sdk",
},
},
async run({ steps, $ }) {
// Enter values for the following parameters below this code step,
// These get passed to the initializeApp method below.
const {
projectId,
clientEmail,
privateKey,
region = "firebaseio.com",
} = this.firebase_admin_sdk.$auth
// Before passing the privateKey to the initializeApp constructor,
// we have to replace newline characters with literal newlines
const formattedPrivateKey = privateKey.replace(/\\n/g, "\n")
// See https://firebase.google.com/docs/reference/admin/node/admin.credential.html#cert
if (!admin.apps.length) {
admin.initializeApp({
credential: admin.credential.cert({
projectId,
clientEmail,
privateKey: formattedPrivateKey,
}),
databaseURL: `https://${projectId}-default-rtdb.${region}/`,
})
}
},
})