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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Teams Workflow - Post ...
Power Automate
Unanswered

Teams Workflow - Post to a channel when a webhook request is received is'nt working

(5) ShareShare
ReportReport
Posted on by 30

Hi with the recent news that 
"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"

I was then trying to set up workflow as an alternative, it seems easy at first since Microsoft already has an inbuilt workflow just for webhooks.

Screenshot 2024-07-09 at 7.28.38 PM.png


However i keep facing the same problem that results in the flow to fail, this is the error i keep recieving

Screenshot 2024-07-09 at 7.30.06 PM.png

Its so weird that such a simple flow has problems running, and further more this is suppoedly the new solution so i dont know whats wrong, really seeking all helps and advice, thanks!!

Categories:
I have the same question (1)
  • alexteo Profile Picture
    30 on at

    So i realized the problem is that: attachment is null when it shouldnt in order for the flow to work,

    However looking at the output there isn't a 'attachment' parameter in the first place... Any experts able to help with this issue? Thanks in advance 

    Screenshot 2024-07-09 at 8.43.25 PM.png

    Screenshot 2024-07-09 at 8.43.02 PM.png

  • alexteo Profile Picture
    30 on at

    Someone please help why is my Attachment always null T_T

  • Pete7 Profile Picture
    16 on at

    Same issue here. They are forcing us to use something in a month where there is no documentation, and it doesn't work.

     

  • alexteo Profile Picture
    30 on at

    Im so glad im not alone in this, for a moment i thought i was struggling with this by myself :,)

  • Pete7 Profile Picture
    16 on at

    I got it to work by sending a POST using json formatted this way:

     

    {
    "type":"message",
    "attachments":[
    {
    "contentType":"application/vnd.microsoft.card.adaptive",
    "contentUrl":null,
    "content":{
    "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
    "type":"AdaptiveCard",
    "version":"1.2",
    "body":[
    {
    "type": "TextBlock",
    "text": "Sample Text!"
    }
    ]
    }
    }
    ]
    }

     

    The only other issue is the post is always from the user that created the flow...

  • alexteo Profile Picture
    30 on at

    Im so sorry as im new to Power Automate, is it okay if you can send a picture as it'll help me understand better, thanks!!

  • alexteo Profile Picture
    30 on at

    And also Im currently using Webhook with Gitlab so any new issues in Gitlab posts as notification adaptor cards in the Teams channel, not sure if the problem is only in Gitlab or other platforms for webhook - just FYI

  • Dima09072024 Profile Picture
    3 on at

    I tried @Pete7 JSON, but I'm getting the same error: "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."

  • gavinc Profile Picture
    31 on at

    I'm in the same boat, using webhooks for deployment notification from Azure DevOps and Octopus.

    I got a sample working:

    gavinc_0-1720541626412.png

    On the input for the adaptive card json

    gavinc_1-1720541655791.png

     

    I put this (example from PA docs):

     

     

    {
     "type": "OpenApiConnection",
     "inputs": {
     "parameters": {
     "poster": "Flow bot",
     "location": "Channel",
     "body/recipient/groupId": "REDACTED",
     "body/recipient/channelId": "REDACTED",
     "body/messageBody": "@{item()?['content']}\n\n\n\n"
     },
     "host": {
     "apiId": "/providers/Microsoft.PowerApps/apis/shared_teams",
     "connection": "shared_teams",
     "operationId": "PostCardToConversation"
     }
     },
     "runAfter": {
     "Post_card_in_a_chat_or_channel": [
     "SUCCEEDED"
     ]
     }
    }

     

     

     

    The to test, Postman patload as the following:

     

     

    {
     "type": "message",
     "attachments": [
     {
     "contentType": "application/vnd.microsoft.card.adaptive",
     "contentUrl": null,
     "content": {
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "type": "AdaptiveCard",
     "version": "1.2",
     "body": [
     {
     "type": "TextBlock",
     "text": "Hello Darkness my old friend....."
     }
     ]
     }
     }
     ]
    }

     

     


    However, I am struggerling with more adaptive Postman payloads.

  • alexteo Profile Picture
    30 on at

    thanks alot @gavinc - i will try out your solution and see if its fixed for mine

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard