cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Flow Email Attachment Content as varbinary(max) parameter to stored procedure

Hello,

Idea is Flow listens for emails and inserts attachments to a SQL Server FileStream filetable as such:

2019-05-26 16_41_29-Window.png

 

The stored proc executes with the following error: 

400 - Invalid binary encoding
 
This is the cleanest way for me to do the insert for each attachment but comes down what is the binary type sent? I 
 
4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @Bukester ,

 

FileSystem is not a datatype and is enabled as an attribute on a Varbinary (max) column.

 

Please use the conversion functions to convert the value’s type to see if it will work:

Base64ToBinrary

 

Best regards,

Mabel

 

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

Thanks Mabel! Do we agree that its the "Attachment Content" that is the file itself? The payload so-to-speak? It has to be. I'll try your suggestion and update the post. It would be great if it was. Otherwise, I'd have to copy to the directory presented by the FileTable, which is not so bad anyhow.

Highlighted

 

No luck. It still doesnt like the "Invalid binary encoding." I can also see that the stored procedure is never called, so Flow is not capable of constructing the RPC call at all. Its failing within flow. 

 

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Add-support-for-binary-data-types-in-SQL-Server-...

 

This is saying its available in PowerApps but not in Flow. But thats as of August 2018.

 

2019-05-27 09_35_09-Window.png

Highlighted

Hi @Bukester ,

 

Please try to input your function in the following way under Expression tab:

1.PNG

 

Best regards,

Mabel

 

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (14,005)