guilhemmarchand / TA-ms-teams-alert-action

This application provides alert actions for Microsoft Teams messages publication to allows advanced messages publication from Splunk.
7 stars 5 forks source link

Add color to new Teams workflow AdaptiveCard #57

Open roughie opened 4 days ago

roughie commented 4 days ago

The latest version 1.1.7 works fine with the Teams workflow if you tick the "Check if use new webhook" option on the alert. However the color option or teams image do not work. For the color I have made adjustments in the code. modalert_ms_teams_publish_to_channel_helper.py needs minor adjustment.

Change line 146: alert_ms_teams_theme_color = "default" Add after line 195 add: + ' "color": "' + alert_ms_teams_theme_color + '",\n'

this will color the activity title described over here: https://adaptivecards.io/explorer/TextBlock.html

Allowed values for color:

default       Teams default text color
dark           Black
light           Light grey
accent       Primary color of teams
good          Green
warning      Orange
attention    Red