Microsoft Teams Spoke will not work with Microsoft Teams Workflows - They will stop working in Oct

Community Alums
Not applicable

I ran across this yesterday and have tried to create a workflow in Microsoft Power Builder for Teams to create a new Webhook and it's not working.

The message I'm getting in Microsoft Teams:

Action Required: O365 connectors within Teams will be deprecated and notifications from this service will stop. Learn more about the timing and how the Workflows app provides a more flexible and secure experience. If you want to continue receiving these types of messages, you can use a workflow to post messages from a webhook request. Set up workflow



Putting the new webhook in Microsoft Team Spoke I'm getting the following 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'."}}. (Process Automation.0e9862431324030039a039ed9344b05f; line 5)

Does anyone know how to deal with this.  We have a lot of flows that call into teams and this would suck to have it just stop working.

Any help would be appreciated.

1 ACCEPTED SOLUTION

Keminda
Tera Expert

The reason for the above error is the webhook is expecting the request payload to be in JSON format.

Currently its sent in a  different format. to achieve this you have to edit the flow action step Post Message and add Content Type: "application/json"  in headers.

 

But the next issue you will face is MS Teams spoke is using connector cards (MessageCards) format for posting cards, which is in a different format from Adaptive cards in Teams workflows.

https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-referen...

 

It Seems, we have to build a custom Flow Action which supports Adaptive card format.

View solution in original post

16 REPLIES 16

Keminda
Tera Expert

The reason for the above error is the webhook is expecting the request payload to be in JSON format.

Currently its sent in a  different format. to achieve this you have to edit the flow action step Post Message and add Content Type: "application/json"  in headers.

 

But the next issue you will face is MS Teams spoke is using connector cards (MessageCards) format for posting cards, which is in a different format from Adaptive cards in Teams workflows.

https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-referen...

 

It Seems, we have to build a custom Flow Action which supports Adaptive card format.

Community Alums
Not applicable

Where would I do that? since I'm using the Teams Spoke.  Do I need to look through the Actions and find the Post Message action?  A Bit of help would be appreciated.

 

Yes you need to look through the actions. Example - Post Incident Details action.

You can copy the Flow action and add Content-Type: application/json in to the Post Message step Headers.

 

Then you need to go to the Build Payload step. There is a class named MSTeamsMessageBuilder.

This class is using MessageCards format for processing payload. But this is not supported for the new MS TeamsWorkflow webhook. So you need to create a similar Script include which processes AdaptiveCard format and use that in the Build Payload.

check - https://adaptivecards.io/explorer

 

Similar to @Community Alums response, we are struggling to understand where to use the most appropriate method. Would you be able to provide some guidance?

 

Update:

Some other new information provided to me in another thread. Hope this helps others out. 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1650148