Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

HTTP Post multipart/form-data

(0) ShareShare
ReportReport
Posted on by 29

Hi,

 

I am trying to post SharePoint files to a 3rd party via their API.  Their API uses multipart/form-data.  After some trial and error, I can POSTcontent, but only text files come out correctly on the destination.  Other files (Excel, Word, jpg, etc.) post, but the data is not readable. What do I need to do to the file content to format it properly?

 

Thanks!

 

http post.png

 

  • franciscooa Profile Picture
    78 on at
    Re: HTTP Post multipart/form-data

    Hi @JonathanM ,


    I did the request with the same format you did and I got the error:

     

    {"description":"Validation failed","errors":[{"field":"file","message":"Unexpected/invalid field in request","code":"invalid_field"}]}


    franciscooa_0-1704735476733.png

     

    Can anyone help?

    Thanks!

  • DACIT Profile Picture
    3 on at
    Re: HTTP Post multipart/form-data

    Thank you so much for posting this! I was experiencing the exact same thing and could not figure out what was amiss.

  • matthew12333333 Profile Picture
    162 on at
    Re: HTTP Post multipart/form-data

    Thank you, that was the point!!!!

  • WillPage Profile Picture
    2,060 on at
    Re: HTTP Post multipart/form-data

    What exactly are you converting to base64?. It might be that the input to that is already in the right format and you're doing an extra step that breaks it

  • matthew12333333 Profile Picture
    162 on at
    Re: HTTP Post multipart/form-data

    The pdf is sent, but is still corrupted. (I cannot open it).

  • WillPage Profile Picture
    2,060 on at
    Re: HTTP Post multipart/form-data

    What error?

  • matthew12333333 Profile Picture
    162 on at
    Re: HTTP Post multipart/form-data

    Hi @WillPage,

    I followed your web page. I'm with email attachment and I would like to send pdf file. Do you know what i'm doing wrong?

    matthew12333333_0-1669379320882.png

     

  • matthew11111112 Profile Picture
    19 on at
    Re: HTTP Post multipart/form-data

    I have a error and I have to put X-NomFichier. How should I change that:

    matthew11111112_0-1669317522731.png

     

  • matthew11111112 Profile Picture
    19 on at
    Re: HTTP Post multipart/form-data

    matthew11111112_0-1669294934680.png

    Invalid request for me, any idea? @Anonymous 

  • matthew11111112 Profile Picture
    19 on at
    Re: HTTP Post multipart/form-data

    Hello,
    I'm able to send my file, put I cannot open it. Do you know how I can do it please?

    matthew11111112_0-1669293258074.png

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1