cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxTampa
Level: Powered On

Send attachment by email from a document library

I am trying to build a flow where when a new document is created or edited in a document library; an email is sent with the new document attached. The email address for the sender is contained in the document library metadata.

 

I have gotten the flow to work, but it sends an email individually for all the documents in the library.

 

How would I filter, so it only sends the email for an individual document when its either created or modified.

 

See flow below-

 

Max -

 

Capture.PNG

 

 

5 REPLIES 5
Community Support Team
Community Support Team

Re: Send attachment by email from a document library

Hi MaxTampa,

 

Please try to add a Condition to filter by using the dynamic content File name.


Dynamic content “File name” is from the trigger “When a file is created or modified in a folder”, dynamic content “Name” comes from the action “Get files”.


When “File name” contains “Name”, send the email with the created or modified file.

3.PNG

Please try it on your side and let me know if it will work for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MaxTampa
Level: Powered On

Re: Send attachment by email from a document library

@v-yamao-msft

Thanks for the reply, I tried the condition but the flow ran on all items in the document library. see the screen shot of my flow.

 

Thanks 

Max

 

Capture.PNG

Super
Level: Power Up

Re: Send attachment by email from a document library

Hi MaxTampa, I am experiencing the same problem, did you manage to find a solution? thx! Per

MaxTampa
Level: Powered On

Re: Send attachment by email from a document library

@Super

 

I have not been able to get this flow to work

Flow Staff merwan
Flow Staff

Re: Send attachment by email from a document library

Hi @MaxTampa, you'll need to build a flow like the below where you trigger on "When a file is created (properties only)" then fetch the file content using the "Get file content" action and finally send the file as an attachment in the "Send an email" action. 

Send attachment flow.png

 

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 377 members 4,995 guests
Recent signins:
Please welcome our newest community members: