Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

O365 connectors within Teams will be deprecated

(1) ShareShare
ReportReport
Posted on by 2

I've been using Webhook connector to post messages from my CRM into Teams Channel. I'm now trying to migrate to the new WorkFlow. 

 

I have created a new workflow as per the below steps:

1. Apps > Workflow > All Templates > Post to a chat when a webhook request is received

2. Microsoft Teams [NEXT]

3. Selected the TEAM & Channel [Add WorkFlow]

DONE

 

Now, I'm using the following PHP code to post a message to Teams Channel.

 

 

 

 

<?php

$msg = "Please ignore: " . date("Y-M-d");

$url = 'https://prod2-20.centralindia.logic.azure.com:443/workflows/3357f.....w7gGwDU8';
$data = array("@context" => "http://schema.org/extensions","@type" => "messagecard","text"=>$msg);
	
$postdata = json_encode($data);

$ch1 = curl_init($url);
curl_setopt($ch1, CURLOPT_POST, 1);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch1, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result1 = curl_exec($ch1);
curl_close($ch1);

?>

 

 

 

 

When executing the above code, I get the following error:

 

Error
Action 'Send_each_adaptive_card' failed
 
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.

 

Someone please help me fix this issue..

 

Thanks

 

  • SandhiyaSiv Profile Picture
    2 on at
    Re: O365 connectors within Teams will be deprecated

    It seems the workflow based notification supports Adaptive Card Format whereas you have used Message Card in your code.

    Ref: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/comment-page-3/#comment-629

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492