Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Create Workflow to replace existing webhook connector

(1) ShareShare
ReportReport
Posted on by 11
Hi everyone ,
 
 
I tried to create a workflows to replace existing webhook connector but webhook connector will be stopped until october so we try to configure worklfow to replace it.
 
The main objective of the workflow is to post adaptive card in a specific chanel when we receive alerting from cloudAMQP for example.
 
 
When i try to post with this example message :
 
-----
{
"title": "Publish Adaptive Card Schema",
"description": "Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.",
"creator": {
"name": "Matt Hidinger",
"profileImage": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg"
},
"createdUtc": "2017-02-14T06:08:39Z",
"viewUrl": "https://adaptivecards.io",
"properties": [
{
"key": "Board",
"value": "Adaptive Cards"
},
{
"key": "List",
"value": "Backlog"
},
{
"key": "Assigned to",
"value": "Matt Hidinger"
},
{
"key": "Due date",
"value": "Not set"
}
]
}
----
 
I receive this error
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.
 
I don't understand why can you help me ?
Many thanks in advance
Kind Regards
  • Verified answer
    NT-24071319-0 Profile Picture
    11 on at
    Create Workflow to replace existing webhook connector

     Hello everyone,

     

    After some research and several attempts, I finally managed to create the connector I wanted. I'm sharing what I learned as it could be useful to others ;-)

    My use case was as follows:

    • We use incoming webhook connectors so that our third-party tools (such as cloud aqmp, instana, and others) send us a notification in a Teams channel when an alert is triggered.
    • Incoming webhook connectors will soon be deprecated.
    • The goal was therefore to use Power Automate to recreate this functionality.

    The diagram below shows the workflow as it should be initiated.

    The different steps/actions should be:

    • Trigger → When a request is received
    • Action 1: Analyze the JSON to retrieve the variables to be used in the adaptive card of action 2
    • Action 2: Publish the adaptive card in which the variables will be dynamically filled

    Implementation details:

    • Trigger → When receiving a request from the Teams webhook
      • Who can trigger the flow → Everyone (at this date I haven't managed to use authentication)
         
      • HTTP URL → it is generated when creating the flow, once we have created and saved the flow.

         
    • Action 1 → Analyze the JSON
      • Content → this is the body of the incoming message, i my case it should always be Body → triggerBody()
         
      • Schema → it is obtained by sending an alerting message from the third-party tool that sends notifications and by setting up to receive this message on this kind of site https://webhook.site/
        Receiving the message does not directly give the schema, you have to write this schema based on the message.

    • Action 2 → Publish the adaptive card which the variables will be dynamically filled

       
      • Publish as User - at this date this is the only option that works
      • Publish in Channel
      • Select the team and the channel
      • Adaptive Card: this is where we will format our card and where we will pass it the variables retrieved in the JSON analysis of the previous action.
    Now this is the notification i receive in teams chanel


    I hope this will help people like me who are discovering Power Automate.
    Have a nice day

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 >