Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.9k
feat(notifications): add Google Chat/Spaces as notification provider#3278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:canary
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Add Google Chat/Spaces webhook integration for receiving deploymentand system notifications. Users can configure a Google Chat incomingwebhook URL to receive formatted notifications for all Dokploy events.Changes include:- Database schema with googleChat table and notificationType enum- Service layer with create/update functions- API routes for create, update, and test connection- Event handlers for all notification types (build success/error, database/volume backup, docker cleanup, dokploy restart, server threshold)- Frontend icon and form handlingClosesDokploy#3153
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR adds Google Chat (Spaces) as a new notification provider to Dokploy, following the webhook-only Lark implementation pattern. Users can now configure Google Chat incoming webhooks to receive formatted notifications for all supported Dokploy events including deployments, backups, and system alerts.
Key Changes:
- Added complete Google Chat notification provider support with database schema, service layer, API endpoints, and utility functions
- Integrated Google Chat notifications across all 7 notification event handlers (build success/error, database/volume backup, Docker cleanup, Dokploy restart, server threshold alerts)
- Added frontend UI components including GoogleChatIcon and full form support in notification settings
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/server/src/db/schema/notification.ts | Added googleChat table schema, enum value, and API validation schemas (apiCreateGoogleChat, apiUpdateGoogleChat, apiTestGoogleChatConnection) |
| packages/server/src/services/notification.ts | Implemented createGoogleChatNotification and updateGoogleChatNotification functions with transaction-based database operations; added googleChat to findNotificationById relations |
| apps/dokploy/server/api/routers/notification.ts | Added createGoogleChat, updateGoogleChat, and testGoogleChatConnection tRPC endpoints with proper authorization checks; included googleChat in notification listing |
| packages/server/src/utils/notifications/utils.ts | Implemented sendGoogleChatNotification function following the Lark pattern with basic error handling |
| packages/server/src/utils/notifications/build-success.ts | Added Google Chat support for build success notifications with formatted message including project, application, environment details and build link |
| packages/server/src/utils/notifications/build-error.ts | Added Google Chat support for build error notifications with truncated error messages (500 char limit) |
| packages/server/src/utils/notifications/database-backup.ts | Added Google Chat support for database backup notifications (success/error) with status emojis and error message handling |
| packages/server/src/utils/notifications/volume-backup.ts | Added Google Chat support for volume backup notifications including backup size and error information |
| packages/server/src/utils/notifications/dokploy-restart.ts | Added Google Chat support for Dokploy server restart notifications |
| packages/server/src/utils/notifications/docker-cleanup.ts | Added Google Chat support for Docker cleanup notifications with cleanup message details |
| packages/server/src/utils/notifications/server-threshold.ts | Added Google Chat support for server threshold alerts (CPU/Memory) with current values and thresholds |
| apps/dokploy/components/icons/notification-icons.tsx | Added GoogleChatIcon component with official Google Chat branding colors |
| apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx | Added full Google Chat UI support including schema validation, mutation hooks, form fields, connection testing, and notification type mapping |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Summary
Changes
Backend
googleChattable, enum value, and API schemascreateGoogleChatNotificationandupdateGoogleChatNotificationfunctionscreateGoogleChat,updateGoogleChat,testGoogleChatConnectionendpointssendGoogleChatNotificationfunctionEvent Handlers
Updated all 7 notification event files to support Google Chat:
Frontend
GoogleChatIconcomponentTest plan
pnpm --filter dokploy run migration:generateRelated Issue
Closes#3153