Open sommerf-lf opened 2 months ago
Documentation for new workflow post message: https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1#microsoft-teams-webhook
https://www.theregister.com/2024/07/09/users_rage_as_microsoft_announces/ is also related. Less then 3 months until they drop the functionality seems far too short of a period.
to clearify:
i got a same error
Update from microsoft:
Update 07/17/2024: Due to customer feedback received around the footer message, it will be removed from the cards that are posted within Microsoft Teams.
It will still break, just not show the error warning any more
Deprecation was extended to December 2025 with a URL change, otherwise December 2024.
If other system administrators are having difficulties locating the affected teams: I have written a small tool in Golang that uses the Graph API to output the affected teams.
This has helped us enormously, as Microsoft does not offer its own solution for reading the affected channels and teams. We have over 350 teams in our company, which we would otherwise have had to search through manually.
There is also a neat Powershell Script which could list also other Connectors in Teams: https://github.com/12Knocksinna/Office365itpros/blob/master/Report-TeamsApps.PS1 https://office365itpros.com/2024/07/10/teams-office-connectors/
There is also a neat Powershell Script which could list also other Connectors in Teams:
https://github.com/12Knocksinna/Office365itpros/blob/master/Report-TeamsApps.PS1
https://office365itpros.com/2024/07/10/teams-office-connectors/
That is correct. However, there are various dependencies. Modules must be installed and PowerShell is also required. With the Teams Webhook Finder, all I have is a small config and an executable file. In addition, the cmdlets used to list the app definitions are only in preview, which does not guarantee a reliable application.
You can create a new webhook in workflow
, and it seems that the API is the same, they just added the permission control.
https://support.microsoft.com/en-us/office/post-a-workflow-when-a-webhook-request-is-received-in-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498
The API isn't exactly the same, it seems that the new structure expects the payload to be wrapped in an array. See the following error that occurs when Workflows attempts to create a card:
ExpressionEvaluationFailed. 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.
Annoyingly, teams responds with a 202
and then fails to post the event to a channel. To see the error you need to go into Manage Workflow
and view the event history.
I didn't find any documents about this new webhook api. Does MS have it?
It is not compatibility. So it will be a bug
in the future.
Hello everyone, I was able to find a possible workaround for this problem:
All you need to do is:
1) create the workflow from the template: [When a Teams webhook request is received
].
2) edit the template
3) delete all the steps under the action [When a Teams webhook request is received
].
4) add the action [Initialize variable
] and edit it as in the picture: PS: don't forget the type=object:
5) add the json that extracts the parameters coming from the webhook and converts them to: [AdaptiveCard
] so that they can be printed correctly on teams
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "TextBlock",
"text": "@{triggerBody()?['title']}",
"size": "ExtraLarge",
"weight": "Bolder"
},
{
"type": "FactSet",
"facts": [
{
"title": "Repository:",
"value": "@{triggerBody()?['sections'][0]['facts'][0]['value']}"
},
{
"title": "@{triggerBody()?['sections'][0]['facts'][1]['name']}",
"value": "@{triggerBody()?['sections'][0]['facts'][1]['value']}"
},
{
"title": "Author:",
"value": "@{triggerBody()?['sections'][0]['activitySubtitle']}"
}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View in Gitea",
"url": "@{triggerBody()?['potentialAction'][0]['targets'][0]['uri']}"
}
]
}
6) add the action [Publish card in a chat or channel] and set the message of the previous action as [Adaptive Card] 7) after doing this save and test.
The end result will look like this:
I hope it will be useful for you, Riccardo.
Description
Source Microsoft I couldn't find any mention of this in any issue or PR. Can't be repreduced, as it is not deprecated yet, but the warning already exists: see screenshot However a Workflow can replace this, which needs a change of the payload sent.
Gitea Version
1.22.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
not relevant
Database
None