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 / Bad Request - The resp...
Power Automate
Answered

Bad Request - The response is not in a JSON format - Cosmos DB

(0) ShareShare
ReportReport
Posted on by

Hi everyone, currently trying to add some items to my Cosmos DB. I keep getting this error, can someone please help me in finding my error?

This is the Json I'm using. I then parse this JSON and try to use the output in the body of the DB Cosmos connector.

{
 "id": 3,
 "name": "John Doe",
 "age": 30,
 "email": "john.doe@example.com",
 "address": {
 "street": "123 Main St",
 "city": "Anytown",
 "country": "USA"
 }
}

 

the errorthe errorthe workflowthe workflow

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    First of all, this question is related to cloud flows, but you posted it in the forum for desktop flows. The correct forum to post this is here: https://powerusers.microsoft.com/t5/Building-Flows/bd-p/BuildingFlows

     

    As to your issue, you do not need to use Parse JSON. If you are using it, you already have a JSON body. You should simply use that. When you parse it, it's an object and not a JSON blob anymore. But you do need it to be JSON. So, simply use whatever you are putting in as inputs into your Parse JSON as the body of the request.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • esilvac Profile Picture
    on at

    Hello, thank you for letting me know! As for the Flow I did what you said but I still am getting the same error.

     

    5.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It seems like it's the response that is not formatted correctly. It might be returning something that PA expects to be JSON, but is not. Not quite sure how that could happen though. Have you tried using Get a document action to pull an existing document and seeing what the contents would look like? Are you sure you're passing in all the necessary fields? See the documentation for the connector to check if you're using the action correctly: https://learn.microsoft.com/en-us/connectors/documentdb/

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Verified answer
    esilvac Profile Picture
    on at

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