Hello Power Platform ,
I'm facing an issue while using Power Automate to upload email attachments from Outlook into an Azure DevOps work item.
Scenario:-
My flow currently does the following:
- Triggers when a new email arrives.
- Retrieves attachments using Get Attachment (V2).
- Uploads the attachment to Azure DevOps Work Item using the Send an HTTP request to Azure DevOps (POST: "https://dev.azure.com/{organization}/{project}/_apis/wit/attachments?fileName=file.zip&api-version=…)
- Updates the work item with the uploaded attachment URL using Send an HTTP request to Azure DevOps (PATCH: https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1)
Issue:
The attachment upload is succeeding, and the file is getting attached to the Azure DevOps work item. However, the attached files appear to be corrupted / blank when opened from Azure DevOps.
For example:
- PDF files open with the correct number of pages but the pages are blank.
- in some cases, files appear empty or unusable.
- Also it seems that any .msg attachments are totally skipped by Power Automate. It is not considering the .msg files as attachments.
What I have already tried
I tested multiple approaches in Power Automate, including:
- Using Get Attachment (V2) output directly
- Using Compose with:
base64ToBinary(...)
- Setting the Azure DevOps upload request header to:
Content-Type: application/octet-stream
- Ensuring the attachment is later added to the work item using the returned attachment URL
Do you know or have already a working solution where the email attachments could be successfully attached to ADO Work Items?
Any sort of guidance would be much appreciated
Regards,
Soumik

Report
All responses (
Answers (