Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Combining text and json in a body

Like (0) ShareShare
ReportReport
Posted on 14 Jan 2025 08:56:06 by 46
We have a system to which we can perform API-calls, but the system expects the following in the body:
  • input_data= Json-context
 
I have tried already several things, but Power Automate always removes the Json formatting:
 
I've tried this:
  • concat('input_data= ',string(variables('vJsonData')))
 
But the destination system always returns an error that it cannot parse the Json :-(
 
If I use e.g. Postman and manually perform the call with a properly formatted Json, it works correctly.
 
Any advice highly appreciated!
  • KrAck Profile Picture
    KrAck 46 on 14 Jan 2025 at 19:20:15
    Combining text and json in a body
     
    Have done some further testing and it's working now. Seems I overlooked 1 detail in the Json file that caused the error :-(
     
    But thanks anyway for your suggestions, it helped me in finding the error in my json file!
     
    Wkr,
     
    Kris.
  • Mark Nanneman Profile Picture
    Mark Nanneman 831 on 14 Jan 2025 at 16:56:45
    Combining text and json in a body
    I love the Star Trek theme, I use Jean-Luc Picard for many of my tests as well!

    If you're trying to do this in a Power Automate HTTP Request have you tried using just your JSON and removing the "input_data="?

    I.e.

    Just put a well formed json object like
    {
    "request": {...}
    }
    Into the body of the HTTP Request action?

    Also, do you have access to documentation for your API? 
    Sometimes if your HTTP Request headers are wrong or missing that could cause errors.  Do you have a Content-Type header? E.g. Content-Type: text/plain or Content-Type: application/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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,593

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,403

Leaderboard
Loading started