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 / How to use invoke web ...
Power Automate
Answered

How to use invoke web service Request body formdata()?

(0) ShareShare
ReportReport
Posted on by 55

I want to upload a file using Request api.

 

I successfully tested it as a Postman program.
But I don't know how to use the invoke web service action in the power automate desktop.

Please refer to the setting method below.

 

[postman-Request]
let formData = new FormData();
formData.append("subject_id", ‘14’);
formData.append("uploader", el.files[0], el.files[0].name);
formData.append("id", ‘testmaster’);
formData.append("password", ‘testmaster00’);
 
fetch('http://testurl/', {
    method: 'POST',
    body: formData
})
.then((response) => response.json())
.then((data) => {
    console.log(data);
});

 

song_coach_0-1698386033467.pngsong_coach_1-1698386082995.png

 

I referred to the link below.
https://ashiqf.com/2021/07/25/how-to-use-form-data-and-form-urlencoded-content-type-in-power-automate-or-logic-apps-http-action/

 

[Result Error message]

HTTP Status 500 – Internal Server Error

Message
Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found

Description
The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found

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

    Try following this walkthrough: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Walkthrough-How-to-use-Invoke-Web-Service-with-multipart-form/m-p/981388

     

    It presumably doesn't really work too well with file uploads, but the comments under the post also include a description of how to do it via the Run DOS command action.

    -------------------------------------------------------------------------
    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.

  • song_coach Profile Picture
    55 on at

    Hi, @Agnius
    Thank you always for your answer.

    I've tested it in many ways
    The conclusion was that the invoke web service had no file upload function, so it kept failing.

    Let's test the Run dos curl.
    Thank you.

    same question
    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Power-Automate-Desktop-Invoke-web-service-send-file/td-p/1872399

  • Verified answer
    song_coach Profile Picture
    55 on at

    I succeeded in uploading the file through the test.

    (I struggled with small quotes and big quotes.)
    Share the successful query below.

     

    curl -X POST %str_url% -H "Content-Type: multipart/form-data" -F "subject_id=%str_subject_id%" -F "id=%str_id%" -F "password=%str_pw%" -F "uploader=@%fileP_uploader%"


    Many people look forward to being helped.
    Thank you @Agnius 

  • Greggy11 Profile Picture
    4 on at

    Hi, how did you generate the curl -X POST query? what application did you use?

  • song_coach Profile Picture
    55 on at

    Hello. I didn't understand the meaning of the question. What does query creation mean?

    I used curl to post the created api.

    The program was handled by CMD(Run DOS action).

  • Greggy11 Profile Picture
    4 on at

    I want to upload a file using Request api.

     

    I already test this postman and its working great however when Im using the invoke web service in power automate desktop im getting this kind of error.: failed to extract params: id: error parsing form
    multipart: NextPart: EOF
    version: error parsing form
    multipart: NextPart: EOF

    This is my request body:

    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="id"

    27
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="version"

    4
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="file"; filename="test.txt"
    Content-Type: application/octet-stream

    VEVTVCBURVNUIFRFU1QgVEVTVCBURVNUIFRFU1QgVEVTVCBURVNU
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="name"

    text
    ------WebKitFormBoundary7MA4YWxkTrZu0gW--





    name: error parsing form
    multipart: NextPart: EOF





    Capture.PNG
  • song_coach Profile Picture
    55 on at

    File upload api is not available with invoke web service action, refer to curl -x and test with rundos action.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard