Skip to main content

Notifications

Power Automate - Building Flows
Answered

Flow to filter distinct people picker emails for reminders

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. 

  • Re: Flow to filter distinct people picker emails for reminders

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

  • Verified answer
    Re: Flow to filter distinct people picker emails for reminders

    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

  • v-litu-msft Profile Picture
    v-litu-msft on at
    Re: Flow to filter distinct people picker emails for reminders

    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.

  • Re: Flow to filter distinct people picker emails for reminders

    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

  • RezaDorrani Profile Picture
    RezaDorrani 12,141 on at
    Re: Flow to filter distinct people picker emails for reminders

    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.

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,473

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,659

Leaderboard