with Procore and Firebase Admin?
Emits an event each time a Budget Snapshot is created, updated, or deleted in a project.
Emits an event each time a Commitment Change Order is created, updated, or deleted in a project.
Emit new event when a new child object is discovered within a specific path
Emit new event when a structured query returns new documents
Emit new event when a new budget snapshot event is created. See the documentation
Creates or replaces a child object within your Firebase Realtime Database. See the docs here
Retrieves a document from a Firestore collection. See the documentation
The Procore API empowers developers to interact with its construction management software programmatically, enabling automation of tasks, data synchronization, and enhanced reporting. With APIs covering project management, quality and safety, construction financials, and field productivity, you can craft workflows that streamline operations, reduce manual entry, and provide real-time insights. On Pipedream, these capabilities can be harnessed to create workflows that react to events in Procore or orchestrate actions between Procore and other apps, optimizing construction project workflows.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
procore: {
type: "app",
app: "procore",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.procore.com/rest/v1.0/me`,
headers: {
Authorization: `Bearer ${this.procore.$auth.oauth_access_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}/`,
})
}
},
})