Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Attachments to Azure DevOps


So i've been working on a scenario where i have to upload an attachment coming from email to Azure DevOps ticket,

I've read a lot of similar threads but didn't got any success anywhere, after some discussions and research i've finally developed 2 flows ( since i'm just researching on it, will combine them later ) one which gives the URL of the attachment uploaded and the other one which actually uploads the attachment as can be seen below : 


I've taken the help of Microsoft docs :


The problem i'm facing is that i'm passing "Attachment Content" in the body of the http request while uploading the attachment. Thus the final uploaded attachment after the running of 2 flows is in encoded format also can be seen below :Attachment.PNG

Flow 1.PNGFlow 2.PNG

Community Support
Community Support


Hi @SaifAli ,


It seems that what is needed here is the binary file. Please consider using base64ToBinary() function to convert the string.


Image reference:


Hope it helps.


Best Regards,

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

@v-bacao-msft, Thanks for your help, but unfortuanately it didn't worked somehow.


When i tried with the compose step and used below expression there


can be seen below in the screenshot after one refresh it got changed to "Attachment Content" in place of expression. and then the input and output becomes same again also can be seen below 


Later i tried to directly pass the base64 string to the function but it is giving me expression invalid error, seems to me that it is because the base 64 string is really long. Any suggestions here??


Added the expression "base64ToBinary(Items('Apply_to_each')?['ContentBytes'])"Added the expression "base64ToBinary(Items('Apply_to_each')?['ContentBytes'])"Automatically changing to "Attachment Content"Automatically changing to "Attachment Content"while directly putting the base 64 encoded stringwhile directly putting the base 64 encoded string

Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,018)