web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting document (P...
Power Automate
Answered

Extracting document (PDF/Docx/xlsx) from SharePoint and passing it to REST API with Power Automate

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I am trying to extract documents from SharePoint and pass them to the REST API, which takes the files as input. I am facing challenges in specifying the body. Getting an error: Unsupported media type. Same is working fine from POST Man. Please help

Even I tried the below.

{
"method": "POST",
"url": "https://azureblobuploaddemo.azurewebsites.net/api/AzureBlob",
"headers": {
"Content-Type": "multipart/form-data"
},
"body": {
"$multipart": [
{
"name": "file",
"filename": "textfile.txt",
"body": {
"$content": "This is the content of the text file.",
"$content-type": "text/plain"
}
}
]
}
}

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at

    Hi @Pardha 

     

    You are setting it up as Multipart, but I see no multipart usage. You said it works in Postman, so re-review what you have there, and as it executes.

     

    Right now there are no multi-part headers dynamically generating and you aren't creating boundaries etc.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey 

  • Pardha Profile Picture
    on at

    Dear Michael,

    Thank you for your quick response. The above snippet was tried to post simple Text file.

    Sharing complete details below.  Please help us as we got stuck.

    We tried to follow various solutions that are shared in the net but no luck.

  • Pardha Profile Picture
    on at

    I have modified this and now getting different error. Please help.

    "Failed to read the request form. Multipart body length limit 16384 exceeded.

     

    Pardha_1-1698596710638.png

    Pardha_3-1698597030861.png

     

     

     

  • Pardha Profile Picture
    on at

    Still I am looking for help. Please someone help on above request.

  • Verified answer
    Pardha Profile Picture
    on at

    This issue is solved. In body part missed the name and file name. Below is the SS for the working solution. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard