Skip to content

Conversation

@Divkix
Copy link
Contributor

@Divkix Divkix commented Dec 15, 2025

Summary

  • Adds Google Chat/Spaces as a new notification provider
  • Users can configure a Google Chat incoming webhook URL to receive formatted notifications for all Dokploy events
  • Follows the existing Lark implementation pattern (webhook-only, simplest provider type)

Changes

Backend

  • Database schema: Added googleChat table, enum value, and API schemas
  • Service layer: Added createGoogleChatNotification and updateGoogleChatNotification functions
  • API routes: Added createGoogleChat, updateGoogleChat, testGoogleChatConnection endpoints
  • Notification utils: Added sendGoogleChatNotification function

Event Handlers

Updated all 7 notification event files to support Google Chat:

  • Build success/error notifications
  • Database/volume backup notifications
  • Docker cleanup notifications
  • Dokploy restart notifications
  • Server threshold alerts

Frontend

  • Added GoogleChatIcon component
  • Added full UI support in notification settings form

Test plan

  • Generate database migration with pnpm --filter dokploy run migration:generate
  • Run migrations
  • Navigate to Settings > Notifications
  • Add new Google Chat notification with webhook URL
  • Test connection button sends test message
  • Trigger a deployment and verify notification received in Google Chat

Related Issue

Closes #3153

Add Google Chat/Spaces webhook integration for receiving deployment
and system notifications. Users can configure a Google Chat incoming
webhook 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 handling

Closes Dokploy#3153
Copilot AI review requested due to automatic review settings December 15, 2025 06:37
@Divkix Divkix requested a review from Siumauricio as a code owner December 15, 2025 06:37
Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Google Chat / Spaces as a notification provider

1 participant