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

Adding the attachments to Azure DevOps work item in "Create a Work item" step

Hi ,


Is there a way to attach a certain file from email directly to the attachments section in the User story of Azure DevOps, I'm currently having a flow that creates a work item whenever tehre is a new email but can't able to process the attachments linked to it. I need those attachments in the user story itself. Can somebody help me??

Regular Visitor

Hi @TheSwilliam @gyegan @Anonymous or anyone else who had luck with this. This looks like an awesome solution and I am really hoping to get this implemented however, I am running into an issue with the second compose action.


My output does not list URL and only output. Any suggestion on how to resolve this? Note - Below is my desired outcome. Thanks in advance!




Were you able to resolve this? I am also unable to see 'url' as an option for 'compose 2'.

Advocate I
Advocate I

@npu_2022 @HerbsterK The 'url' is actually an output function: outputs('Compose')['url'] The outputs function is getting the url property from the response json from Post Attachment. Code snippets for the compose steps: Compose: { "inputs": "@body('Post_Attachment')" } Compose 2 { "inputs": "@outputs('Compose')['url']" }


I've just implemented the flow. Flow isn't showing me the nice 'url' to pick from the Dynamic list, so adding an Expression and just typing in the text as per @TheSwilliam works.  It turned 'pink' after saving/reopening the flow.

New Member

Thank you so much. this worked perfectly for me @TheSwilliam 

I am receiving the below error while running the flow, could you please check 

"Unable to process template language expressions in action 'Post_Attachment' inputs at line '0' and column '0': 'The template language function 'binary' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."






Hello TheSwilliam could you help me, I am trying to create this request for "CHUNKED UPLOAD" but I can't get a return, even if I use the upload type as chunked the activity doesn't return the necessary ID, I can do the flow for the attachments that are smaller but the bigger ones I can't upload. Your example is very similar to the one I did for the smaller file uploads, but I would like to ask for your help to try to verify what I might have done wrong in this step

The documentation says that we should start the upload [POST] and then perform a [PUT] with the ID that the first activity provides, but my flow does not go beyond the PUT activity, the error is related to the size of my file and I need to upload that..




Thanks... going back to a few questions back...

Do you know how to get images in the body of the email to show up in the DevOps bug?




Or its not possible yet?

Advocate II
Advocate II

@TheSwilliam i presume this worked at one point, but now I am getting the same "Unable to process template language expressions in action 'Post_Attachment' inputs at line '0' and column '0': 'The template language function 'binary' was invoked with a parameter that is not valid. The value cannot be converted to the target type" error as @SwathiB et al. Appreciate the detail and effort you put into this. It needs an update.

Advocate II
Advocate II


Here is a screenshot of the outputs of the "Current Item." I don't see the word "ContentBytes" anywhere, presumably that is why the binary (and base64) expressions are failing. Gotta love those updates!


Advocate II
Advocate II

Resolved by creating a control that looks for PDFs, which can be uploaded via HTTP Request to Azure DevOps action. If not PDF, iterates thru the various content types and uploads.



^ The dynamic content in the control is "Attachments Content-Type". Mixed and matched the puzzle pieces from the two resources below.



Image attachments - & 

PDF Attachments - 
@SwathiB fyi this should work for you too
Advocate II
Advocate II

there's nothing special in Compose 4 i was using it to troubleshoot

Advocate II
Advocate II

The PDF attachment link is not to clear, basically do the above procedure, but use base64 expression instead of binary

It was due to a typo and it's working perfectly fine for me after I made the correction.

I corrected my typo error and its working for me now 🙂

Frequent Visitor

Any ideas how I could do something similar, but using http JSON request?  I'm not doing the "create a work item" action so I don't have a dynamic ID I can place in the URL.  Currently, after the "Get Response Details" from MS Form, I have:




Then after this, I tried to add a second one (again I don't have work item ID so I don't know how to do it):




Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,896)