web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding attachments to ...
Power Automate
Unanswered

Adding attachments to ADO WI from Email

(0) ShareShare
ReportReport
Posted on by 27

Hi all,

 

I am currently implementing the solution posted by @TheSwilliam in this thread: https://powerusers.microsoft.com/t5/General-Power-Automate/Adding-the-attachments-to-Azure-DevOps-work-item-in-quot-Create/td-p/308759

 

I have been having some difficulties however actually getting the attachments to upload, and I'm hoping someone here might be able to see the issue with my flow.

 

Error in question:

Unable to process template language expressions in action 'Send_an_HTTP_request_to_Azure_DevOps' 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.'.

 

I believe the issue is because ContentBytes doesn't exist (anymore?). @nerfherder has an apparent solution in this thread: https://powerusers.microsoft.com/t5/General-Power-Automate/Adding-the-attachments-to-Azure-DevOps-work-item-in-quot-Create/td-p/308759/page/3 - but I'm not sure I understand what is happening as the structure looks entirely different. I'd also prefer a solution that doesn't involve handling every possible extension type, but it if it's what is required so be it.

 

The file I am trying to upload is a test .xlsx file, which I've attached to this topic. However, it won't always be this file type. It could be an image of any format, or it could be a PDF.

 

Below I will include each section of my flow up to the point it fails. The flow works perfectly when there isn't an attachment.

 

Trigger:

1.png

 

Condition checking the subject (not relevant, the bug was present before I added this):

2.png

 

Parse JSON:

3.png

 

Schema:

 

 

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

 

 

 

Send an HTTP Request to Azure DevOps:

4.png

Binary Function:

 

 

binary(body('Parse_JSON')?['ContentBytes'])

 

 

 

Entire Flow Overview:

5.png

 

Let me know if there is any further information required.

 

Any advice that could point me in the right direction would be greatly appreciated.

 

PB

Categories:
  • tippytipperton Profile Picture
    4 on at

    I'm having the same issue - did you ever get this solved? Thanks!

  • pburk Profile Picture
    27 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard