cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fvamaro
Helper I
Helper I

Microsoft Flow | Custom Connector Issues

 

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).

 Att1.PNG

However, when an email is flagged, Flow returns the error:

Att2.PNGAtt3.PNG

 

 

Att4.PNG

 Att5.PNG

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:Att6.PNG

 

 

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

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Fvamaro,

 

You should use the

"multipart/form-data"

For file upload.

Take a look at the following example:

File uploader for image  

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

Community Support Team _ Michael Shao
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
Fvamaro
Helper I
Helper I

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:

Flow.PNG

 

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:
Containers OP.PNG

 

 

 

 

 

 

 

 

 

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: 

Flow Error.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

 

 

v-micsh-msft
Community Support
Community Support

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

 

 

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

Hi @v-micsh-msft,

There you have, thank you for your help.

 

Capture.PNG

 

Regards, 

Filipe

Hi @Fvamaro,

 

You should use the

"multipart/form-data"

For file upload.

Take a look at the following example:

File uploader for image  

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

Community Support Team _ Michael Shao
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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,619)