with Firebase Admin and Frame.io?
Emit new event when an asset is uploaded. See the documentation
Emit new event when a new child object is discovered within a specific path
Emit new event when a new comment is left on an asset. See the documentation
Emit new event when a structured query returns new documents
Emit new event when a new project is created. See the documentation
Creates or replaces a child object within your Firebase Realtime Database. See the docs here
Creates a new comment on an asset in Frame.io. See the documentation
Retrieves a document from a Firestore collection. See the documentation
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}/`,
})
}
},
})
The Frame.io API hooks into their robust video collaboration platform, enabling automated workflows around video reviews, project updates, and asset management. With the API, you can programmatically interact with comments, accounts, projects, and more—perfect for integrating with other tools to streamline video production pipelines.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
frame: {
type: "app",
app: "frame",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.frame.io/v2/accounts`,
headers: {
Authorization: `Bearer ${this.frame.$auth.oauth_access_token}`,
},
})
},
})