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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting "JSON malforme...
Power Automate
Answered

Getting "JSON malformed" error when trying to PUT data via HTTP

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm trying to send a simple JSON via HTTP "PUT" command, but keep getting the following error:

 

{
  "errortext""JSON malformed in line 1, position 1. JSON malformed. Was expecting: \" 0-9 null true false { [.",
  "errornumber"7
}
 
The very original JSON which have worked on other software is (host censored):
 
PUT /connector/relations/handleRelation HTTP/1.1
Host: XXX.XXXX.fi
Authorization: Basic c29hcDpzb2Fw
Content-Length: 145
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
 
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="data"
 
{"company": "Test Company"}
----WebKitFormBoundary7MA4YWxkTrZu0gW
 
I have tried to simply copy/paste this into body field, and also tried to type the headers into the "Headers" field on HTTP task but no change whatsoever.
 
Does anyone have idea what could cause the "JSON malformed" error, and what would be the right structure for the JSON?
 
Thanks in advance!
Categories:
  • joe_hannes_col Profile Picture
    1,843 Super User 2024 Season 1 on at

    Hello @Anonymous,

     

    I think the body of your request should contain

    {"company": "Test Company"}

    The rest, like Content-Type, Content-Dispostion etc. should go into the headers.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @joe_hannes_col !

     

    Thanks for the reply, but I just actually found a "workaround" to this with my colleague.

     

    We used POST instead of PUT and used the webhook to get things working:

     

    http.png

    Data is taken from chat bot working on our ms teams (objects are in Finnish)

     

    Seems like this HTTP tool doesn't support form-data as it is?

  • joe_hannes_col Profile Picture
    1,843 Super User 2024 Season 1 on at

    Great you made it work, @Anonymous!

    I'm not aware of any limitations regarding the use of form-data, but my requests have always been in JSON so far 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard