Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Modify JSON value without changing order of the JSON payload?

(0) ShareShare
ReportReport
Posted on by
Edit: nevermind, I figured it out
 
 
With the upcoming deprecation of Teams connectors, I've been working on turning our old Webhook alerts into Power Automate flows. I'm having an issue converting our old Graylog Teams notifications.
 
Grayload sends a JSON payload to a "Request - When an HTTP request is received" trigger. That JSON payload looks like this:
 
{
  "@type": "MessageCard",
  "@context": "http://schema.org/extensions",
  "themeColor": "#FF0000",
  "text": "**Alert Event Definition Test Title triggered:**\n",
  "summary": "Event Definition Test Title",
  "sections": [
    {
      "activitySubtitle": "_Event Definition Test Description_",
      "activityImage": "",
      "text": ""
    }
  ]
}
 

When I input the body from that trigger to a "Post card in a chat or channel" action, I get an error message saying that "@type" needs to be set to "AdaptiveCard"
 
I've tried parsing the payload with a "Data Operation - Parse JSON" action and then a "Data Operation - Compose" action with setproperty() to change the value. The problem is it moves "@type" to the bottom of the JSON and then the card posts into the Teams channel is blank.
 
How can I modify that value without reordering the JSON? Or is there another way to accomplish my goal here?
 

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 >