cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow Action send MS Teams message: get channel/link from owners

r_weber
DynaMight Champion
DynaMight Champion

Hi,

I understand that you can set up ownership teams and include their contact information:

r_weber_0-1705093697191.png

At the same time for the "send message" workflow action you need to create a teams connection webhook that you then can select in the configuration of the workflow step to decide where to send the message to.

I seem to miss a link there - well I can send to teams in a general workflow e.g. send all Davis Problems to a channel and even add the owner information. But how would one:

  1. get the owners information for impacted entities from a problem (solved)
  2. get the notification configuration from the owner info (solved)
  3. on the fly select the correct MSTeams connection to send a notification to? (it seems the two configs (ownership/teams workflow action) are disconnected.

Since the webhook URL for sending is secret I could think of something like this:
From the ownership get the teams "config" name, and then use this in the send message action to dynamically select the configured webhook config?

My usecase: lots of different ownership teams that should be able to manage their contact information/webhooks but only one generic workflow that sends notifications based on ownership to the right channels.

Any ideas?

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net
5 REPLIES 5

michal_zawislak
Dynatrace Advisor
Dynatrace Advisor

 

Hi @r_weber,

Thank you for bringing up this interesting use case. I understand you want to dynamically select the correct MS Teams webhook based on ownership information to send notifications to the appropriate channels.

Currently, the functionality to dynamically select a Teams connection in the "send message" workflow action based on owner information is not supported. I can see how this would be a valuable feature for managing notifications with changing contact information across multiple ownership teams.

I've briefly discussed this with the owners of the workflow actions, and while it's not currently possible, there is interest in exploring ways to support this kind of dynamic selection. We're considering extending the functionality to accommodate use cases like yours. The following steps will involve a detailed discussion with a broader team to assess such a feature's feasibility and potential impact. While I can't provide a specific timeline right now, I assure you that your feedback is taken, and we will keep the community updated on any progress. 

Thank you for your patience and for contributing.

Your AutomationEngine ally!

This is an important feature for us as well and it's been almost a year, is this still being evaluated?  Is the only workaround right now to use javascript to send messages directly to the Teams webhook that we send in to the step after ownership information?

We are working on a change on Workflow Actions where the Connection can be customized using an expression:

christian_kreuz_1-1736332997412.png

You will then need to use the expression "connection(...)" - you can find more details about the expression here: https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/reference#connection

Note that this is not yet available for all Workflow Actions (MS Teams does not have it as of January 8th, 2025).

 

Another suggestion / recommendation is within the ownership feature itself, in the contact details information you can only add the Team Name along with the url. A nice addition would also be the channel ID in the ownership. This will work much easier with the new connector and integrating into Power Automate. As power automate does allow for a workflow like system and parse values out of the payload to use dynamically, you could pass in the ownership information like the channel ID within the MS teams channel payload and that can then route it dynamically to the right channel, or additionally a field in the Teams send message action to choose the channel or pass in the channel ID similar to slack.

Additionally, trying to accomplish something like using the Davis Problem template, but also trying to include ownership information is difficult to parse out of the message Dynatrace sends to Power Automate.

tyler_ouellette_1-1736542011305.png

 

 

It ends up being:

body:

  attachments:

     content:

        body:

           text

tyler_ouellette_0-1736541825525.png

 

Featured Posts