Back to Browse

Firebase for HubSpot Apps: Build the Backend

83 views
May 12, 2026
18:16

HubSpot UI extensions can't call external APIs directly. We scaffold the Firebase backend that powers the rest of this app: https://hsdev.fyi/49nKDeg HubSpot UI extensions run in a sandbox. They can call HubSpot APIs and your own backend, and nothing else. To talk to YouTube, store OAuth tokens, or run a background sync, you need a backend. This episode scaffolds that backend on Firebase. By the end you have Firebase enabled on both your dev and prod Google Cloud projects, Firestore deployed with a global deny-all rule, two shared backend utilities every endpoint will use, local emulators running, and a `/health` endpoint deployed to dev and prod with `.firebaserc` aliases controlling which project you hit. Heads up. EP06 is a heavier scaffolding episode than usual at 18 minutes. Chapters below if you want to jump. Following along in code? Our git workflow lives in the repo README, link below. Code, the `firebase.json`, the deny-all `firestore.rules`, and the shared utilities (`firestore-paths.ts` and `middleware.ts`): https://hsdev.fyi/49nKDeg Part 6 of the Creator Console Series. Building, customizing, and shipping inside HubSpot's Creator Console surface, end to end. Chapters 00:00 Intro and what we're building 01:14 Enable Firebase on both GCP projects and capture project IDs 02:49 `firebase init` walkthrough 04:48 Verify Firestore and deploy the deny-all rule 07:02 `.npmrc` and install dependencies 08:00 Shared utilities: `firestore-paths.ts` and `middleware.ts` 10:50 Local emulators and the `/health` endpoint test 13:24 `.firebaserc` aliases 14:30 Deploy to dev and prod 16:49 `.env` files and templates Resources ▶ Companion repo, Creator Console (Episode 6 branch): https://hsdev.fyi/49nKDeg ▶ Repo README (git workflow for following along): https://hsdev.fyi/4u5pvSf ▶ Firebase CLI reference: https://hsdev.fyi/42u4g0p ▶ Firestore security rules reference: https://hsdev.fyi/42xQNVo ▶ Cloud Functions environment configuration (`.env` files and reserved variables): https://hsdev.fyi/4u7PVTD ▶ HubSpot UI extensions backend requirements (sandbox model): [TODO-BITLY-LINK | dest=[TODO-DENNIS-LINK] | utm_content=docs-ui-ext-backend] Series links ▶ Previous (Episode 5): HubSpot App Object Schema: Design the Record Before You Submit It: https://hsdev.fyi/49v6Tmv ▶ Next (Episode 7): HubSpot + Firebase CI/CD with GitHub Actions. Drops Thu 2026-05-14: [TODO-BITLY-LINK | dest=[TODO-DENNIS-LINK] | utm_content=yt-creator-console-ep07] ▶ Full series playlist: https://hsdev.fyi/4uogRid

Download

0 formats

No download links available.

Firebase for HubSpot Apps: Build the Backend | NatokHD