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

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
Community Support Team
Community Support Team

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

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.
Bukester
Level: Powered On

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

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.

Bukester
Level: Powered On

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

 

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

Community Support Team
Community Support Team

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

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 (Last 30 Days)
Users online (5,250)