Hi @Adam12345, unfortunately this isn't something which can be done directly using native actions currently in Flow. However, there is a really useful action called "Send a HTTP Request to DevOps" which means that we can use the REST APIs to achieve what we want.
High level approach is:
- Get the work item from DevOps
- Get the attachments from the list item
- Get the content
- Upload it to Dev Ops
- Associate the attachment with the work item

Steps 1 - 3 are all straight forward with Flow, although if you need any pointers with these please shout and I'll be happy to ellaborate.
Let's focus on the first HTTP Request which is going to upload the attachment to DevOps, which in my overview is titled "Send an HTTP REquest to Azure DevOps - Upload Attachment."
This works in a similar way to the HTTP Connector for SharePoint, whereby you don't need to worry about generating tokens as the connection will handle the authentication for you. All you need to do is get your API call right.

Full documentation for this end point can be found here: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/attachments/create?view=azure-devops-rest-5.0
The most important part here is the URI for the endpoint. It will basically take the form of:
/{project}/_apis/wit/attachments?fileName={fileName}&uploadType={uploadType}&areaPath={areaPath}&api-version=5.0
fileName - the DisplayName dynamic content taken from the Get Attachments action
areaPath - the Area Path dynamic content taken from the Get Work Item actions
I will need to use the output of this REST call in my next one, so I need to use the Parse JSON action to transform the output into something useful. It will only return two pieces of information, so you can use this schema to parse it:
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
}
}
}Once the file is uploaded, we need to associate it to the work item so that it shows up in attachments. Again, I'm going to use the "Send an HTTP Request to Azure DevOps" to do this. The difference this time, is rather than being a post, it is going to be a PATCH as I'm updating an already existing work item.

This time the relative URI is much more simple, as all I'm doing is providing the workitem ID (from my workitem action earlier). The majority of the work here takes place in the body of the call. Full documentation for this call can be found here:
https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/update?view=azure-devops-rest-5.0
The only part of the body which will need to change is the url which will come from the Parse JSON step. That is the URL where your attachment has been uploaded to within DevOps.
This has worked for me by attaching a txt file onto a List Item, and watching that flow through into my workitem, and I don't see any reason why it shouldn't work for more complex file types.
Let us know how you get on, and if you need any more help please shout.
If you have found this post useful, please give it a thumbs up. If it has answered your question, please accept it as the solution so others can benefit.
@MattWeston365