We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Sending Incident created notifications to Teams

Jason Nicholas
Tera Expert

Hi

 

I am trying to set up a process that whenever a certain incident type is created, a messages is sent to a teams chat or channel.

 

Researching this it looked quite simple, set up a webhook on the channel, paste the URL into a Flow Action and the message will be sent when the flow runs.

The issue is that Webhooks are no longer available (demised this month) and I now need to use Power Automate instead.

 

I have a premium license for Power Automate so I can establish the connection to ServiceNow and create a flow here to talk to teams. I have then tried to configure a Flow to push the incident details to Power Automate however I am failing every time

 

If I add the following into the Power Automate flow 

 

JasonNicholas_0-1780416105807.jpeg

 

 

when I run the flow in ServiceNow I get the error

Error: 400. Message: {"error":{"code":"InvalidRequestContent","message":"The input body for trigger 'manual' of type 'Request' must be of type JSON, but was of type 'application/octet-stream'.","messageTemplate":"The input body for trigger '{0}' of type '{1}' must be of type JSON, but was of type '{2}'."}}. (Process Automation.0e9862431324030039a039ed9344b05f; line 5)

 

 

If I remove the Json and run the flow, it does send something to the teams channel, 

 

JasonNicholas_1-1780416105807.jpeg

 

However my ServiceNow flow shows

Error: 202. Message: . (Process Automation.0e9862431324030039a039ed9344b05f; line 5)

 

Does anyone have any experience of sending messages to teams, should I be doing it this way or instead of a Flow should I be using 'Rest Message ' and Business Rules. 


Google search also mentions a ServiceNow connector in Power Automate but mine does not have this


I am new to this so any guidance would be appreciated.

6 REPLIES 6

Hi

I am still confused as to where I add this. I am trying to use the action 'Post Incident Details', the Webhook I have entered is the one for the Power Automate flow and I have used the data pil picker to select the Incident picked up in the trigger

How and where do I add the header

JasonNicholas_0-1780476866153.png

 

Tanushree

 

Did you see my question about where to add the header