Teams Webhooks moving from O365 Connectors to Workflows (Power Automate)

jd-1607
Conversationalist

Teams Webhooks moving from O365 Connectors to Workflows (Power Automate)

Hey all,

 

Has anyone had any luck in migrating from an O365 connector to the new Workflows method for webhooks?
See this for info:
https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-...

6 Replies 6
PhilipDAth
Kind of a big deal
Kind of a big deal

I'm interesting in this as well.

trondve
Conversationalist

Been trying to migrate myself with no luck

amabt
Building a reputation

I tried this today and could not get it  to work ☹️

 

Here is the error I am getting on the Microsoft Flow Side

 

Action 'Send_each_adaptive_card' failed: The execution of template action 'Send_each_adaptive_card' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body']?['attachments']' is of type 'Null'. The result must be a valid array.

 

amabt_0-1725236963845.png

 

amabt_3-1725237143947.png

 

 

The Flow template that I used

 

amabt_1-1725237029531.png

 

Also tried

amabt_2-1725237055171.png

 

Below links are likely useful in getting this working. I will play more with this when time permit.

 

https://blog.rdorman.net/the-new-world-of-teams-webhooks/

https://sysrestarting.blogspot.com/2024/07/teams-incoming-webhook-deprecated-use.html

https://www.reddit.com/r/MicrosoftFlow/comments/1eac9g9/meraki_webhook_alerts_to_teams_via_flow/

 

 https://github.com/prometheus/alertmanager/issues/3920

https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-...

 

jd-1607
Conversationalist

I ended up just parsing the json payload and formatting a simple message to the channel instead. I couldn't get the Adaptive cards working.

jd1607_0-1729125133104.png


Upload a sample payload from the Meraki webpage (I used the Meraki template because it was the most universal)

jd1607_1-1729125209072.png

Convert to your local timezone

jd1607_2-1729125247932.png


Prepare the message:

jd1607_3-1729125292829.png

Made the device URL the hyperlink:

jd1607_4-1729125344436.png

Looks like this:

jd1607_5-1729125412823.png

 

acook04111
Conversationalist

Hello,

 

I have managed to get this working using this link - https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-tea...

 

Follow the instructions for 'Set up an incoming webhook workflow from a template'. 

 

Once that's done you need to create a new template in the Meraki dashboard under the API & webhooks sections (organization wide).

Select Webhooks and then templates - 'create template' 

 

give it a name and then paste the json code into the liquid body section and click save.

 

acook04111_0-1731693171721.png

 

once this is working you can add more lines:

 

acook04111_2-1731693354522.png

 

It's quite basic but it does the job, next I will try to get the actions working so that a clickable button is created which points to the device or network that had the alert.

 

Now create a webhook receiver using the url that was setup in the webhook workflow and use the payload template that was just created. 

 

You should get something like this in teams:

 

 

Screenshot 2024-11-15 at 17.57.47.png

 

Hope this is useful to somebody! 

amabt
Building a reputation

Can you paste the actual code instead of screenshot?

Get notified when there are additional replies to this discussion.