Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

HTTP request to upload file Base64

(0) ShareShare
ReportReport
Posted on by 14

Hi, this si my first post so i say hello to everyone.

I'm trying to upload a file using HTTP action.

the spcification are:
2 parameters:

id = Item unique id (i.e. 7813)

images = array of objects with 2 nodes: "name" = name of the file and "content" = base64 file content

I'm trying the following flow:

 

vigand_3-1665847110460.png

 

I receive the following error:

Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: <. Path '', line 0, position 0.'

 

Where is the error?

Thank you very much for your help.

 

Regards

 

Andrea

 

  • Nimash_Eshan Profile Picture
    2 on at
    Re: HTTP request to upload file Base64

    Get file content action are already base64

    Nimash_Eshan_2-1717757273851.png

    You can simply use,

    body('Get_file_content').$content

     

    Nimash_Eshan_0-1717756943214.png

  • vigand Profile Picture
    14 on at
    Re: HTTP request to upload file Base64

    Hi,

     

    just a quick update.

     

    I was able to get the http action working only with the form-urlencoded Content-Type and passing the various parameters by replacing the special characters using the encodeURIcomponent command.

     

    No success using multipart conte-type. Obviously the formatting to be put as Body must be particular and I don't know how I have to manage it.

     

    I can confirm that urlencoded just work.


  • vigand Profile Picture
    14 on at
    Re: HTTP request to upload file Base64

    Hi,

     

    unfortunately this doesn't solve the issue. Still receiving the same error message.

    I've tried to use Postman to send the same request and it works.




  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at
    Re: HTTP request to upload file Base64

    @vigand 

    Hi there.  Did you already try wrapping the Output dynamic value in quotes?  Kind of like this:

    edgonzales_0-1665927294555.png

    If not, give that a go and let us know how it works out.

    Good luck!

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

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