web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to filter distinc...
Power Automate
Answered

Flow to filter distinct people picker emails for reminders

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am using the SharePoint OOTB Task List for one of the implementations where I have Task name, description, due date(renamed to completion date), assigned to (renamed to Resposible Party), below is a screenshot for same.

 

Capture.PNG

 

I want to create a flow that runs every day at 8 am, runs and gets tasks from this list for which due date is today so i guess that would be by get items action. Now as you see in the screenshot attached, considering todays' date, below would be fetched from SharePoint as a result of get items action.

Capture3.PNG 

Then I would like to send an email out to Maddie and Robert letting them know that 'You have a task due please check sharepoint'.

However, if I add send an email, both maddie and robert would receive two emails each. So post get items, I would like to store distinct emails in a variable and then use that in send an email action so they only receive one email each.

 

Email body is pretty simple "You have a task due today, please chec in sharepoint" so nothing dyanmic as far as email body is concerned. Can someone please help me getting distinct emails for responsible party using variable or something and eventually using it in send an email.

 

Thanks in advance. 

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,143 on at

    Hi @Anonymous 

     

    You would need to use expressions to achieve most of this

     

    I have a sample scenario in which I retrieve data from a SP list, group the data based on a category and send emails for each category

    Feel free to customize the below Flow for your needs

    https://github.com/rdorrani/Microsoft-Flow/blob/master/SharePointfilescategorizebyCustomerandsendemail_20190926003902.zip

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    Thanks @RezaDorrani , I used array variable and I am able to get unique emails in array but using it in send an email is now a pain, in send an email action , I used variables('Emails') expression to send emails out but seeing below in failed action

    Capture.JPG

    Of course, its coming in array form so send an email is failing, any thoughts how I can fix this? Below is output of my set variable

    Capture2.JPG

  • v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    You can create a String variable to accept the Email, convert Email array into a plain text, for example:

     

    Annotation 2019-10-24 170401.png

    Annotation 2019-10-24 170344.pngAfter that, you can put the EmailPlain into the Email field.

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I was able to get this to work, turned out that variables and apply to each are your best friends when it comes to flow 😀, please see screenshots below of the flow, hope it helps someone!

    Flow1.JPGFlow2.JPGFlow3.JPGFlow4.JPGFlow5.JPGFlow6.JPGFlow7.JPGFlow8.JPGFlow9.JPGFlow10.JPGFlow11.JPG

  • Community Power Platform Member Profile Picture
    on at

    flow seems to work for me but it gives time out error for my SharePoint list.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Expiscornovus Profile Picture

Expiscornovus 199 Most Valuable Professional

#2
David_MA Profile Picture

David_MA 194 Super User 2025 Season 2

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard