feat: add Firebase push notification integration (slice 1)
Problem
PostHog workflows need the ability to send push notifications to customers' mobile app users. This is the first slice toward that capability.
Changes
This adds the foundation for Firebase Cloud Messaging (FCM) push notifications:
-
Backend Integration:
FirebaseIntegrationclass for storing Firebase service account credentials with automatic OAuth2 token refresh - API Endpoint: Upload Firebase service account JSON via integration API
-
Hog Function Template:
firebase_pushdestination template with configurable title, body, and FCM token - Frontend: Firebase integration choice UI with proper icons and types
- Documentation: Implementation plan and testing guide
Architecture: PostHog acts as a conduit - customers provide their Firebase credentials, and we send pushes on their behalf. The notification appears to come from the customer's app.
How did you test this code?
- â
Unit tests for
FirebaseIntegrationclass (token refresh, credential validation) - â Template tests for Hog function
- â Standalone FCM test script validated (push received on Android emulator)
- â Firebase integration created via Django shell
- đ End-to-end workflow test pending (event â workflow â FCM push)
See products/workflows/docs/testing-firebase-push.md for detailed testing instructions.
Changelog
No - This is slice 1 of multiple. Complete feature will include SDK methods to capture device tokens.
Future slices:
- Slice 2: iOS SDK captures and sends FCM token
- Slice 3: Workflow looks up token from PushSubscription model
- Slice 4: Android SDK support
- Slice 5: Rich push (images, action buttons, deep links)
đ¤ Generated with Claude Code
Size Change: 0 B
Total Size: 3.7 MB
âšī¸ View Unchanged
| Filename | Size |
|---|---|
frontend/dist/toolbar.js |
3.7 MB |
đ Migration Risk Analysis
We've analyzed your migrations for potential risks.
Summary: â ī¸ Missing migrations detected
Migrations for 'posthog':
posthog/migrations/0940_remove_annotation_is_emoji_and_more.py
- Alter field kind on integration
Run python manage.py makemigrations to create them.
Last updated: 2025-12-11 22:32 UTC (eea54a7)
-
#43150
-
#43121
đ (View in Graphite)
-
master
This stack of pull requests is managed by Graphite. Learn more about stacking.