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 / Post Adaptive Card: "B...
Power Automate
Unanswered

Post Adaptive Card: "Bad Request"

(0) ShareShare
ReportReport
Posted on by 4
Hi,
 
I'm using a pre-made template and receiving the follow message when my flow is on the step "Post Adaptive Card in a Chat or Channel"
 
{
"error": {
"code": "InvalidBotRequestMessageBody",
"message": "The specified Teams flowbot message's message body is invalid JSON."
}
}
 
I used a JSON online validator to check everything and it all came back as valid so I'm not sure what the issue is. The Adaptive Card is still sent through MS Teams despite the flow failing at this point and I'm not sure where else to look to resolve the issue because it has successfully run in the past and now it is failing every time even though nothing was changed. 
 
Even though it says "BadRequest" it still posts the card in the chat, and it still informs the requestor of approval in MS teams even though it doesn't show that below. 
 
The most confusing part about this is that this flow has run successfully in the past as it is. So I don't understand how it had one or two successful runs and then about 10 failed attempts when nothing changed. 
 
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    The error message suggests something is wrong with the message body. Can you share the adaptive card json?
     
    This will help troubleshooting your issue.
  • CH-27121700-0 Profile Picture
    4 on at
     
    Here is the apply to each, which looks like it's the first action fail: 
     
    {
      "type": "Foreach",
      "foreach": "@outputs('Create_an_approval_(V2)')?['body/approvers']",
      "actions": {
        "Post_adaptive_card_in_a_chat_or_channel": {
          "type": "OpenApiConnection",
          "inputs": {
            "parameters": {
              "poster": "Flow bot",
              "location": "Chat with Flow bot",
              "body/recipient": "@item()?['email']",
              "body/messageBody": "@outputs('Create_an_approval_(V2)')?['body/adaptiveCard']"
            },
            "host": {
              "apiId": "/providers/Microsoft.PowerApps/apis/shared_teams",
              "connection": "shared_teams",
              "operationId": "PostCardToConversation"
            }
          }
        }
      },
      "runAfter": {
        "Create_an_approval_(V2)": [
          "Succeeded"
        ]
      }
    }
     
    Here is the adaptive card:
     
    {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "poster": "Flow bot",
          "location": "Chat with Flow bot",
          "body/recipient": "@item()?['email']",
          "body/messageBody": "@outputs('Create_an_approval_(V2)')?['body/adaptiveCard']"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_teams",
          "connection": "shared_teams",
          "operationId": "PostCardToConversation"
        }
      }
    }
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    Thanks for sharing the below information. It is useful to know you are using the adaptiveCard property of the outputs of the Create an Approval (v2) action.
     
    Can you also share the value of that adaptiveCard property which you used in the failed flow run? Interested to see if that might be invalid json.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard