cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DougL
Level: Powered On

Formats that Microsoft Flow Handles to Receive a File

Hello,

       I am building a custom REST API on Azure Functions to retreive data from another REST API that doesn't use an authentication provider that Microsoft Flow supports (It uses one-legged OAuth 1.0A). My idea was to basically make a REST proxy, where Microsoft Flow calls my Azure Function, which adds the OAuth 1.0A headers and makes a call to the original API, getting the data back and giving it back to Microsoft Flow. However, before I do this; I wanted to make sure this concept would fully work. One of the important things I want to do is retreive files from the API, and I haven't found any clear details of what formats Microsoft Flow can consume files or what the limits are on files.

 

The way I see it there are three ways that Microsoft Flow could possible consume files:

  1. With an API returning a Content-Disposition Header and the file being the full body of the response.
    • This is how the API I'm working with does it, and would be the easiest to do with a proxy/like concept if Microsoft Flow supports it.
  2. As multi-part form data, potentially carrying multiple files.
  3. As a base64 encoded string.

 

So, here are my questions:

  1. Does Microsoft Flow support all of the above methods of retreiving a file to then put in OneDrive/ etc or do I have to stick to one or the other?
  2. What are the file-size limits of the above options, if supported?
    • Is there a size limit on an individual file in Content-Disposition / Multipart-form / base64?
    • Is there a size limit on the entire request when multi-part forms are sent?
  3. Is there any place where the above and similar types of data is documented? 
  4. Is there any other method I should be considering that I haven't outlined?

 

Thank-you for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Formats that Microsoft Flow Handles to Receive a File

Hi DougL,

 

About the methods of retrieving a file then save it on OneDrive, etc. it should be based on how your Swagger file is configured.

 

About the file size limits, the limit has been increased to 100 MB maximum for a single message/file. Please take this thread for a reference:
https://powerusers.microsoft.com/t5/General-Flow-Discussion/How-large-file-size-do-File-System-servi...

 

Hope this blog could be your reference:
http://blog.marcinbudny.com/2014/02/sending-binary-data-along-with-rest-api.html

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Formats that Microsoft Flow Handles to Receive a File

Hi DougL,

 

About the methods of retrieving a file then save it on OneDrive, etc. it should be based on how your Swagger file is configured.

 

About the file size limits, the limit has been increased to 100 MB maximum for a single message/file. Please take this thread for a reference:
https://powerusers.microsoft.com/t5/General-Flow-Discussion/How-large-file-size-do-File-System-servi...

 

Hope this blog could be your reference:
http://blog.marcinbudny.com/2014/02/sending-binary-data-along-with-rest-api.html

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

DougL
Level: Powered On

Re: Formats that Microsoft Flow Handles to Receive a File

@v-yamao-msft So you're saying that you can handle getting a file any valid way I can define within a Swagger file?

 

If that's so then there is a world of options, and that is amazingly flexible. I'm kind of surprised.

cleon169
Level: Power Up

Re: Formats that Microsoft Flow Handles to Receive a File

DougL,

 

Did you succeed in accomplishing what you outlined doing with the REST Api and Flow? I'm trying to do the same thing and I'm curious if this worked out.

 

Thanks,

Chris

Highlighted
DougL
Level: Powered On

Re: Formats that Microsoft Flow Handles to Receive a File

Yes, this worked out very well. I simply returned the file in the body of the HTTP Response and defined the swagger as follows:

 "responses": {
          "200": {
            "description": "A successful request",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        },

Then within my OneDrive Create File flow I set "File Content" to the Body of that request.

 

 

 

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users online (4,856)