cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Abi-Ola
Frequent Visitor

Send Email (V2) attachment will not open (preview and even when downloaded)

Hi All,

 

Working on a flow that is doing the following-

 

Trigger - When an email is modified

List Row - Activitymimeattachement

Initialise Variable - in an array (in case of more than one attachment)

Apply to each Value -

Compose : Filename

ContentBytes - base64ToBinary(items('Apply_to_each')?['body'])

Append to array Value: The output of compose

Send an Email (V2) - 

Attachment : Outputs

 

Please see - screenshots

 

The flow works as expected with the trigger and sending the email with no problem. 

 

The only problem is the inability to view the attached file in the email either by preview or even when downloaded. Any idea guys just can't think of anything right now.

 

AbiOla_0-1656585715839.png

 

base64ToBinary(items('Apply_to_each')?['body'])

 

AbiOla_1-1656585769309.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Abi-Ola
Frequent Visitor

@edgarsimoes Thank you for your time.

As I said, you can not use 'Download a file or an image' for activitymimeattachment; all effort proved abortive.

I have managed to resolve my issue with the following.

- I removed the composer action the base64tobinary
- Passed the below in my append to array action

- Removed the 'send email v2' from the loop 

{
"Name": @{items('Apply_to_each')?['filename']},
"ContentBytes": @{items('Apply_to_each')?['body']}
}

in my send email v2

My attachment is my variable.

I am happy to paste the step for anyone with the same issue.

View solution in original post

4 REPLIES 4
edgarsimoes
Microsoft
Microsoft

Hello, @Abi-Ola 

 

Please consider the "Download a file or a image" dataverse action to get the files from your dataverse table.

 

You should have something like this:

edgarsimoes_0-1656601632093.png

 

Consider this documentation to understand all the connector from Dataverse that are available: Microsoft Dataverse - Connectors | Microsoft Docs

 

edgarsimoes_1-1656601729973.png

 

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

 

Happy automating,

 

Edgar Simões

 

 

Hi, edgarsimoes,

 

I have tried this with some logic and tweak, which convinced me that the download file or image connector does not work with activitymimeattachment. I believe it will only work when you create a field of type file or image on a custom entity.

How are you storing your attachment content on your Dataverse table?

Abi-Ola
Frequent Visitor

@edgarsimoes Thank you for your time.

As I said, you can not use 'Download a file or an image' for activitymimeattachment; all effort proved abortive.

I have managed to resolve my issue with the following.

- I removed the composer action the base64tobinary
- Passed the below in my append to array action

- Removed the 'send email v2' from the loop 

{
"Name": @{items('Apply_to_each')?['filename']},
"ContentBytes": @{items('Apply_to_each')?['body']}
}

in my send email v2

My attachment is my variable.

I am happy to paste the step for anyone with the same issue.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,117)