cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Sending an email with attachment

Hello,

Can anyone tell me how to design a flow which sends an email with attachment when a task is created?

 

I'm performing the following actions resulting in my flow to fail:

What should I put under attachment name and attachment content?

Is there any thing else that needs to be changed?

 

 

flow_error.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @flowuser-21 

 

Glad that it worked. Please note that this will send multiple emails for multiple attachments. To send a single email for all attachments, you will have to move the email action out of the apply to each loop. 

 

Hope this helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User III
Dual Super User III

Hi @flowuser-21 

 

Please see the screenshot below:s1.PNG

 

S2.PNG

Expression used in the append variable:

body('Get_attachment_content')['$content']

Note: Get Attachments is a list of attachments that are returned from the item. We have to parse each of those and create an array of attachments and then pass that array in the attachments option of the send email action. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted

@yashag2255 

The flow runs fine but the email is sent *without* attachments.

The path to the folder where the attachments are present do contain some word files and images.

 

Highlighted

Hi @flowuser-21 

 

Can you please share a screenshot of the flow. Just want to check if we are not missing any refrence. 

Highlighted

Hello @yashag2255 ,

The flow is working fine after making a few changes.

1. Get attachment wasn't able to fetch files from another list so I changed it's path to the list where item is created and flow is triggered. 

2. The final step of sending an email was merged with the body from the previous step. 

 

flow_done.PNG

 

Thanks a lot for your help @yashag2255 .

Highlighted

Hi @flowuser-21 

 

Glad that it worked. Please note that this will send multiple emails for multiple attachments. To send a single email for all attachments, you will have to move the email action out of the apply to each loop. 

 

Hope this helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Helper I
Helper I

Im having trouble with this. It will send the email but no attachment. need help please

Flow1.PNG

 

Flow 2.PNGflow3.PNG

Highlighted
Dual Super User III
Dual Super User III

Hi @Soko19 

 

In the append to array variable action what is the expression that you are using for content bytes? You can simply choose the attachment content from the dynamic selector under the Get attachment content action outputs. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted

Hello,

 

This is what i have.

 

body('Get_attachment_content')['$content']

 

 

Highlighted

Update: It sent only 1 of the 3 attachments. Do i have to do the apply for each multiple time in order to send multiple attachments

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (11,637)