cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonengland
Helper III
Helper III

Multiple corrupt email attachments - Approval attachments are fine.

Hi - the flow behind my form sends an approval notification to a manager with attachments from a sharepoint list using an array, these arrive ok.

 

I'm also using an array to send the same attachments via email to various interested parties during the life of the form. These are arriving corrupt.

 

Screenshot 2021-02-09 at 17.42.53.png

 

Any help would be appreciated!

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Paste this in again (remove everything you had before):

{
  "ContentBytes": {
    "$content-type": "@{body('Get_attachment_content')['$content-type']}",
    "$content": "@{body('Get_attachment_content')['$content']}"
  },
  "Name": ""
}

 I have now removed the name part. So after you paste it should have everything you need other than the name. You can just put your mouse in the quotes and then select your dynamic content for the name. You had DisplayName before, which should be fine.

View solution in original post

8 REPLIES 8
Paulie78
Super User
Super User

For the email value try:

{
  "ContentBytes": {
    "$content-type": "@{body('Get_attachment_content')['$content-type']}",
    "$content": "@{body('Get_attachment_content')['$content']}"
  },
  "Name": "@{items('Build_attachment_array')?['DisplayName']}"
}
jonengland
Helper III
Helper III

@Paulie78 - thanks!

 

I copied that as is into the append variable value and it came back with an error on save:

Screenshot 2021-02-09 at 18.33.44.png

 

"Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: The repetition action(s) 'Build_Aattachment_array' referenced by 'inputs' in action 'Appejnd_to_array_variable_2' are not defined in the template'

 

Should i be recreating the value using dynamic content?

 

Thanks for your help - much appreciated!

Sorry, that’s the name element generating that. Just get rid of the name and replace it with whatever you had before.

@Paulie78 

 

It's me that should be sorry... sadly I'm still none the wiser.

 

Any chance you could explain it to me like i'm a 5 year old/someone who's first attempt at a form is taking him weeks...?

 

Screenshot 2021-02-09 at 20.59.22.png

Am I right to assume that i keep the $content-type and $content? What do I stick in between the quotes? Or am i barking up the wrong tree?

 

Thanks,

 

Jon

 

 

Paulie78
Super User
Super User

Paste this in again (remove everything you had before):

{
  "ContentBytes": {
    "$content-type": "@{body('Get_attachment_content')['$content-type']}",
    "$content": "@{body('Get_attachment_content')['$content']}"
  },
  "Name": ""
}

 I have now removed the name part. So after you paste it should have everything you need other than the name. You can just put your mouse in the quotes and then select your dynamic content for the name. You had DisplayName before, which should be fine.

jonengland
Helper III
Helper III

@Paulie78 

 

Well that worked! Thanks very much! no real idea why... Is it an easy/quick one to explain?

Paulie78
Super User
Super User

I didn't actually look at your original much, but I would say it is because you were base64 encoding something that was already in base64 to start with. If you feel that strongly about extra bass, you should probably watch Davie504

jonengland
Helper III
Helper III

Thanks for the extra info - yes, I like all kinds of base especially this kind. 

 

Thanks again for all your help!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,705)