cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SRB82
New Member

Trouble with dynamic email recipients

Hi everyone. I'm new to Power Automate and stuck with having a flow send an email to recipients depending on which site they are responsible for, using a recipient list in Share Point.

 

So far I've managed to:

 - create a flow which is triggered by a new file being created in a Share Point folder.

 - send an email with this latest attachment only to recipients listed in the 'Send an email' action.

 

Ideally I would prefer to manage the email recipients outside of the flows themselves, so I can just keep a contact list 'EmailContacts' up to date instead.

 

As a little bonus I'd also like to have the body of the email dynamically apply the SiteName rather than it be static text, but not a big deal.

 

Here's some screenshots of what lists I have and the flow I've created for the site 'Brookside'. I plan on having a flow for each site so I can just drop files into each folder as and when we receive them. I can then just copy this flow for each new site, and update the EmailContacts accordingly.

 

I tried a 'get items' action to extract the email addresses from EmailContacts where the filter was SiteName eq 'Brookside' but this didn't seem to work. Perhaps there's much more to it than that, or maybe i'm doing something spectacularly wrong.

 

Any help would be greatly appreciated.Documents.jpgEmailContacts list.jpgFlow Part 1.jpgFlow Part 2.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
PrasadAthalye
Community Champion
Community Champion

@SRB82 - I assume that SiteName is a document property. If not, please create that as a property which user can set during checkin.

 

Before SendEmail, you can add GetItem action from SharePoint and Query an item where SiteName eq '<Select site Name from Library Metada>'. This will give you required list item. Then you can use 2nd column in to Recipient. Also I see that you are using Outlook action Send email which will send email from your inbox. If you not wish to send it from your inbox, you can use another action 'Send an Email notification v3'.

 

Like and Mark this as answer if it resolves your issue.

PrasadAthalye_0-1601817246470.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

1 REPLY 1
PrasadAthalye
Community Champion
Community Champion

@SRB82 - I assume that SiteName is a document property. If not, please create that as a property which user can set during checkin.

 

Before SendEmail, you can add GetItem action from SharePoint and Query an item where SiteName eq '<Select site Name from Library Metada>'. This will give you required list item. Then you can use 2nd column in to Recipient. Also I see that you are using Outlook action Send email which will send email from your inbox. If you not wish to send it from your inbox, you can use another action 'Send an Email notification v3'.

 

Like and Mark this as answer if it resolves your issue.

PrasadAthalye_0-1601817246470.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,613)