with Firebase Admin and Autom?
Scrape the results from Bing search engine via the Autom.dev service. See the documentation
Creates or replaces a child object within your Firebase Realtime Database. See the docs here
Scrape the results from Brave search engine using Autom.dev. 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}/`,
})
}
},
})
Autom API offers a rich set of features for creating, managing, and deploying automations. With its capabilities, you can streamline tasks by setting up triggers and actions based on certain conditions. When used within Pipedream, you can harness these features to create robust, serverless workflows that integrate with numerous other services and APIs. Autom API's interaction with Pipedream allows for building scalable automation solutions that respond to real-time events and connect with a multitude of apps to perform complex tasks seamlessly.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
autom: {
type: "app",
app: "autom",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://autom.dev/api/usage`,
headers: {
"Content-Type": `application/json`,
"x-api-key": `${this.autom.$auth.api_key}`,
},
})
},
})