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 / Send an HTTP request t...
Power Automate
Answered

Send an HTTP request to Sharepoint - Not well Not well formatted JSON stream.

(0) ShareShare
ReportReport
Posted on by 125

Hello everyone,

any one can help with the following inquiry?
I create a flow sending an automatic email every time a ticket is opened in a sharepoint list. The flow was working fine but lately has been failing randomnly and I do not understand why.

Please find below the error message: 

Not well formatted JSON stream.
clientRequestId: eca8755b-dba5-4c45-a46a-1bcd8a741461
serviceRequestId: 97bcc7a0-607a-3000-fe82-eee5b064e9a1


Body Outputs:

{
  "status"400,
  "message""Not well formatted JSON stream.\r\nclientRequestId: eca8755b-dba5-4c45-a46a-1bcd8a741461\r\nserviceRequestId: 97bcc7a0-607a-3000-fe82-eee5b064e9a1",
  "source""https:///",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}

 

 

 


Headers Outputs:

{
  "Pragma""no-cache",
  "Cache-Control""no-store, no-cache",
  "Set-Cookie""ARRAffinity=9d716053ef092553e7bdd2639d89f002241b80715630c2dbb839c205a5e8d5f8;Path=/;HttpOnly;Secure;Domain=sharepointonline-scus.azconn-scus-001.p.azurewebsites.net,ARRAffinitySameSite=9d716053ef092553e7bdd2639d89f002241b80715630c2dbb839c205a5e8d5f8;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-scus.azconn-scus-001.p.azurewebsites.net",
  "x-ms-request-id""97bcc7a0-607a-3000-fe82-eee5b064e9a1",
  "Strict-Transport-Security""max-age=31536000; includeSubDomains",
  "X-Content-Type-Options""nosniff",
  "X-Frame-Options""DENY",
  "Timing-Allow-Origin""*",
  "x-ms-apihub-cached-response""true",
  "x-ms-apihub-obo""false",
  "Date""Tue, 18 Jul 2023 15:26:58 GMT",
  "Content-Length""371",
  "Content-Type""application/json",
  "Expires""-1"
}
 
Fedegallo_1-1689694665678.png

 

screenshot.png
Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    This might be subtle, but it looks like you are using single ' quotes to show text but then the subject is using double " quote for text. 

     

    I don't know if single ' quote and double " quotes can both be used at the same time. I've always just used one or the other.

     

    Maybe that is creating a difference?

  • YapaYapa Profile Picture
    125 on at

    Hello @wskinnermctc ,

    nope that's not the issue 😞

  • Chriddle Profile Picture
    8,697 Super User 2026 Season 1 on at

    That definitely is an issue. With single quotes it simply isn't JSON 😉

    You may check your JSON with a validator: JSON Online Validator and Formatter - JSON Lint

  • Verified answer
    YapaYapa Profile Picture
    125 on at

    Weirdly enough the flow works with single quotes 🙂

    the flow was failing due to the presence of a apostrophes in a multiline text field.

    I used the expression replace and now went back to work. That's why it was failing randomnly as stated in my inquiry "The flow was working fine but lately has been failing randomnly and I do not understand why.", it was probably encountering some tickets with apostrophes.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Why are the headers in quotes? It is showing "Accept" and "application/json;odata=nometadata" in your example.

     

    I just ran an http request and mine does not have those quotes. When I added the " quotes in the headers it changed the outputs.

     

    HTTP Request Headers Do Not Have " QuotesHTTP Request Headers Do Not Have " Quotes

     

    When the headers are not in quotes, the output is the correct odata=nometadata

     

    HTTP Request Header Have " QuotesHTTP Request Header Have " Quotes

    When I add quotes to the headers the output is incorrect odata=verbose.

     

     

    I think the headers do not need the quotes " around Accept and application/json;odata=nometadata 

     

    But I guess that isn't a problem for a Post/Put type http request now that I think about it. Either way, interesting to know.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 389

#2
Vish WR Profile Picture

Vish WR 331

#3
David_MA Profile Picture

David_MA 298 Super User 2026 Season 1

Last 30 days Overall leaderboard