Reputation: 15372
Given:
Question:
Upvotes: 0
Views: 381
Reputation: 26
You should use Power Automate. Teams Connectors are being retired in the next few weeks: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
Here is a working Webhook sent from PowerShell. My application only supports top level JSON keys, so I am using the "text" key:
$WebhookUri = "https://prod-157.westus.logic.azure.com:443/workflows/..."
$adaptiveCardJson = @"
{ "type": "messagecard",
"text": "Test 9" ,}
"@
Invoke-RestMethod -Method POST $WebhookUri -Body $adaptiveCardJson -ContentType 'application/json'
Here is the Power Automate flow. You would change the "Post in" to "Group Chat".
Upvotes: 1