Rebuild Teams Alerting to be able to create AdaptiveCards instead of ConnectorCards
Is your feature request related to a problem? Please describe.
In https://github.com/elementary-data/elementary/pull/1397 a very basic implementation of a connection with a MS Teams webhook is introduced so elementary alerts could be sent to a Microsoft Teams Channel. It uses pymsteams to create this connection with MS Teams. This package is very limited in formatting messages and it's use cases in terms of what messages it can create.
The formatting could be implemented a lot easier if another kind of package is used, for example msteams_webhook. Since this package is not deployed on pypi I think it would be best to implement pieces of the code they have in this repo. Another option would be to take a look at pyadaptivecards or adaptive-cards-py.
Describe the solution you'd like
Modify elementary/clients/teams/client.py to something like this.
Modify elementary/monitor/data_monitoring/alerts/integrations/teams/message_builder.py to something like the AdaptiveCard as placed in here.
Then the combination of these should be implemented in elementary/monitor/data_monitoring/alerts/integrations/teams/teams.py.
Describe alternatives you've considered N/A
Additional context
Implementing the Adaptivecard in this project allows for more flexible ways of formatting the message that is sent to MS Teams. This could also have the added advantage that if a new type of Teams client is created (MS Teams bot?) it could reuse the AdaptiveCard and the way the message is formatted and sent.
This opens the door for mentions in the MS Teams alerting, see for more info this. I will open a new ticket for this.
Not entirely sure but it could be a possibility to use edr send-report to MS Teams when an AdaptiveCard is used instead of a ConnectionCard.
Would you be willing to contribute this feature?
Don't expect to have any time available for it anytime soon. Testing the new setup is something I would do.