Integration between a document management application and Microsoft Flow.
I developed an application in Visual Studio using asp.NET, hosted in an Azure Active Directory, using Azure Storage, and successfully integrated with Microsoft Flow.
However, I’m having some problems with file manipulation.
One of the actions I want the connector to do is: when an email is flagged get the attachment and add it to my app personal storage(azure storage), using Microsoft Flow (as you can see).
However, when an email is flagged, Flow returns the error:
I have understood that the ‘Content’ attribute from a flagged email its a Base64 String, wich will allow me to exchange files, but will limit its size.
I tested the custom Flow with a .txt file and it returned the error I descibed above, but when I tested with a pdf (no bigger then 1 page) it returned this:
My main question its how can I manipulate files with my Custom Connector?
->How to send/receive large files?
->How to solve the “x-ms-failure-cause” : “apihub-token-exchange” error?
Best Regards,
Filipe Amaro
Solved! Go to Solution.
Hi @Fvamaro,
You should use the
"multipart/form-data"
For file upload.
Take a look at the following example:
Take a try to modify the "consumes" and the "produces" part in your swagger, assuming your API works correctly with the file uploaded.
Regards,
Michael
I'm integrating a personal App(asp.Net) with Microsoft Flow.
One of the main goals is to have a Custom connector that can send/receive files from my app storage(Azure storage) to the Microsoft applications (OneDrive, outlook, etc) using Microsoft flow.
However I'm getting some issues manipulating Files.
Let me show you an example:
In this Flow when an email is flagged I must save the attachment in my app storage.
Doc_Content : The attachment content;
Cont_ID : The azure container where the file will be save;
Doc_Name : Attachment Name;
And I receive the parameters like this:
Doc_Content is a string because I think that 'Content' its a string base64 (am I rigth?)
When i try my flow it returns this:
I need to know how can I receive and send files between my App and Flow( connectors):
->Whats the type of 'Content'? How can I use it to get a byte[]?
->What can I do to solve the error?
Regards;
Filipe Amaro
P.S- I don't wanna use templates
Hi @Fvamaro,
Would you please share your swagger file here?
The error message should mean the type of the file content input doesn't match the type defined in your swagger file.
Compare it with the File upload part described in the article below:
https://swagger.io/docs/specification/describing-request-body/file-upload/
Regards,
Michael
Hi @Fvamaro,
You should use the
"multipart/form-data"
For file upload.
Take a look at the following example:
Take a try to modify the "consumes" and the "produces" part in your swagger, assuming your API works correctly with the file uploaded.
Regards,
Michael
Did you find some solution?. I am also struggling with same problem. Not able to convert the file attachment to
ByteArray.
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
27 | |
26 | |
24 | |
23 | |
14 |