Debian Codegraph @

pkg/services/chat/teams/doc.go

raw
1 // Package teams provides a notification service for sending messages to Microsoft Teams
2 // via Power Automate workflow incoming webhooks using the Adaptive Card format.
3 //
4 // # Service Configuration
5 //
6 // The Config struct supports the following settings:
7 //
8 // - Host: The full Power Automate workflow webhook URL (required)
9 // Example: https://prod-00.westus.logic.azure.com:443/workflows/{id}/triggers/manual/paths/invoke?api-version=...
10 // - Title: The notification title displayed as a bold header in the card (optional)
11 // - Color: Reserved for future use (optional)
12 //
13 // # Adaptive Card Format
14 //
15 // Notifications are sent as Adaptive Cards wrapped in the Power Automate
16 // webhook message envelope (type: "message" with attachments array).
17 // The message body is rendered as TextBlock elements within the card.
18 //
19 // # Usage Example
20 //
21 // service := &teams.Service{}
22 // err := service.Initialize(serviceURL, logger)
23 // if err != nil {
24 // // handle error
25 // }
26 // err = service.Send("Your message here", nil)
27 //
28 // For more information about Power Automate workflow webhooks, visit:
29 // https://learn.microsoft.com/en-us/connectors/teams/#microsoft-teams-webhook
30 package teams