2

I've created a Microsoft Flow, to triggered an event when Outlook email arrived, to create a new "User Story" WorkItem in Azure DevOps, attaching the files from Outlook to the Attachments tab.

Microsoft Flow "When a new email arrives" with the values,  
Importance Any, Has Attachment Yes and Include Attachments Yes.  
The next step is "Apply to each"
Select an output from previous steps: Attachments
"Send an HTTP Request to Azure DevOps"
Filling the required fields
Account Name: myaccountname
Method: POST
Relative URI: myprojectname/_apis/attachments?fileName=Attachments Name&api-version=5.0
Body: "[BINARY FILE CONTENT]"

("Attachments Name" is a dynamic content)

I've added a "Parse JSON" Content: Current item Schema:

The last step

"Create a new work item"
Account Name: myaccountname
Project Name: myproject
Work Item Type: User Story
Title: Subject
Description: Body
Other Fields
Enterkey field: System.AttachedFiles
Entervalue field: Attachments Name (dynamic content) 

For the Schema:

{
    "type": "object",
    "properties": {
        "Id": {
            "type": "string"
        },
        "Name": {
            "type": "string"
        },
        "ContentBytes": {
            "type": "string"
        },
        "ContentType": {
            "type": "string"
        },
        "Size": {
            "type": "integer"
        }
    }
}

Expected result: Attach the Outlook files to Azure DevOps User Story work item into the attachments tab.

Actual result: The file is not attached.

There is not an error message.
First Step

Second step

Last step

mariojho
  • 21
  • 4
  • I just tried this and get this error "No fields found by the name 'System.AttachedFiles' in the work item type 'Task'". Not sure that helps, but I see you mentioning there is no error message when running this. I can see in the previous step that it is finding my attached file under System.AttachedFiles though. – jbwharris Aug 14 '19 at 20:38
  • I have resolved the issue using Sharepoint to add the files. – mariojho Mar 31 '20 at 11:42
  • Could you outline what the process was that resolved this for you? – jbwharris Mar 31 '20 at 18:34

0 Answers0