web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Post to a Teams Channe...
Power Automate
Unanswered

Post to a Teams Channel - why so complicated?

(2) ShareShare
ReportReport
Posted on by 3

Hi, I had a couple of webhooks configured in teams with 365 connectors. Now I'm forced to switch to Workflows. At first look the change doesn't seems too big - instead of Webhook URL I now need to generate Workflow URL. However, till now the following simple code worked 

$json_formated_body = @"
{
"text": "$($body | out-string)"
}
"@

Invoke-RestMethod -Method post -Body $json_formated_body -Uri $webhook_url -ContentType 'Application/Json' and now when I replace the old webhook_url with the new wokflow_url I'm getting an error in the workflow log: ErrorAction 'Send_each_adaptive_card' failed Error Details- The execution of template action 'Send_each_adaptive_card' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['body']?['attachments']' is of type 'Null'. The result must be a valid array.

The workflow is a simple "Post to a channel when a webhook request is received" Flow without any modifications. 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 391

#2
11manish Profile Picture

11manish 276

#3
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

Last 30 days Overall leaderboard