I'm trying to create a Power Automate flow which takes a file from multipart form data received via an HTTP trigger and then creates this file within OneDrive or SharePoint.
I've found a few older tutorials online which have enabled me to get to the stage where I can access the multipart form data and convert the base64 encoded version of the file into binary. If I run my Power Automate flow with only these steps, then it runs successfully. However, as soon as I add an extra block to the flow to do anything, I get back an InvalidRequestContext error from the flow.
Here's the version of the flow which works:
The first Compose section has an expression of 'triggerMultipartBody(0)'. The second Compose section has an expression of '
The error I receive from this is:
I had the same problem.
What is more - if I delete the creation of file step - flow run with success.
The solution for me was to call child flow (thru HTTP request) with step to create file.
The main reason for the error you get is that trigger "When a HTTP request is received" cannot receive any type but application/json. So in trigger leave JSON Schema empty.
The child flow:
The main flow which I trigger from the button is very simple:
The last step is to send a request to child flow.
In URI you should specify the URI from the trigger of the child flow.
Check out the announcement of Power Platform content at Microsoft Ignite!
Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.
Features releasing from October 2020 through March 2021