Pular para o conteúdo principal
Versão: main (dev) 🚧

ITLab.Template.DevPack.Notifications.MicrosoftTeams

Provides Microsoft Teams notification message models based on Adaptive Cards.

Componentes​

TipoNomeResponsabilidade
ClassAdaptiveCardAdaptive Card payload model following the Adaptive Cards schema
ClassMicrosoftTeamsMessageWraps an AdaptiveCard with an optional recipient email for direct message delivery

Como usar​

// Build an Adaptive Card and wrap it for delivery.
var card = new AdaptiveCard
{
Body = new[] { new TextBlock { Text = "Order 12345 has been approved." } }
};

var message = new MicrosoftTeamsMessage(card, recipientEmail: "approver@company.com");
await teamsNotificationService.SendAsync(message, cancellationToken);

O que não fazer​

  • Do not embed HTML in AdaptiveCard text blocks — Teams renders Adaptive Card markdown only.
  • Do not set recipientEmail for channel posts; leave it null and configure the channel webhook in the delivery service.

Extensão pelo produto​

  • Products can extend AdaptiveCard with typed Body element builders to avoid ad-hoc anonymous-object construction.