SOLVED

Flow to automate email to user in a list

%3CLINGO-SUB%20id%3D%22lingo-sub-2709393%22%20slang%3D%22en-US%22%3EFlow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2709393%22%20slang%3D%22en-US%22%3EI'm%20trying%20to%20do%20something%20which%20I%20really%20feel%20shouldn't%20be%20that%20difficult.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20an%20MS%20lists%20page%20with%20two%20columns.%20One%20contains%20users%20in%20my%20organisation%20(it's%20not%20just%20their%20name%20in%20basic%20text%20-%20it%20is%20checked%20against%20their%20active%20directory%20record).%20The%20other%20contains%20a%20date%20which%20they%20will%20be%20on%20call.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20I%20want%20to%20do%20is%20use%20flows%20to%20automate%20an%20email%20to%20be%20sent%20to%20the%20user%20when%20the%20date%20assigned%20to%20them%20is%20reached.%20Basically%2C%20notify%20them%20they%20are%20on%20call.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20much%20appreciated!%20Thanks%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2709393%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFlows%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2710251%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2710251%22%20slang%3D%22en-US%22%3E1.%20Setup%20a%20flow%20that%20runs%20every%2024%20hours.%3CBR%20%2F%3E2.%20In%20that%20flow%2C%20grab%20your%20list%20using%20an%20odata%20filter%20for%20today's%20date.%3CBR%20%2F%3E3.%20Loop%20through%20the%20resulting%20output%20and%20send%20an%20email%20to%20each%20record.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20post%20some%20more%20specifics%20about%20your%20list%20I%20could%20get%20more%20specific%20on%20how%20to%20do%20it.%3CBR%20%2F%3E%3CBR%20%2F%3EAre%20your%20users%20in%20azure%20ad%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2710486%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2710486%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1142782%22%20target%3D%22_blank%22%3E%40BrendanE1535%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20how%20my%20list%20looks%20-%20I%20blanked%20out%20the%20names%20but%20when%20you%20click%20on%20them%20it%20brings%20up%20a%20box%20with%20all%20their%20contact%20information%20(email%2C%20phone%2C%20office%20location%2C%20profile%20pic%20etc.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20only%20need%20it%20to%20send%20one%20email%20to%20one%20user%20at%20a%20time.%20If%20today's%20date%20%3D%20the%20date%20in%20the%20%22duty%20begins%22%20column%20then%20it%20should%20send%20an%20email%20to%20the%20user%20next%20to%20that%20date.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20certain%20if%20users%20are%20in%20Azure%20AD.%20If%20I%20click%20a%20user%20then%20I%20get%20to%20see%20quite%20a%20lot%20of%20information%20relating%20to%20them%20like%20recent%20files.%20Is%20there%20a%20quick%20way%20to%20check%20if%20they're%20in%20Azure%20AD%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pb505_0-1630569478671.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307525iBCBB0DDF08EA92A8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Pb505_0-1630569478671.png%22%20alt%3D%22Pb505_0-1630569478671.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2717073%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2717073%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1143940%22%20target%3D%22_blank%22%3E%40Pb505%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20i%20understood%20your%20column%20must%20be%20Person%20Or%20Group%20type%20and%20this%20field%20populate%20from%20Azure%20AD%20well%20not%20directly%20but%20yes%20they%20are%20sync%20with%20Azure%20AD.%3C%2FP%3E%3CP%3EYou%20want%20to%20trigger%20mail%20only%20when%20value%20matches%20but%20as%20per%20my%20knowledge%20only%20trigger%26nbsp%3B%20happens%20for%20certain%20action%20like%20item%20created%20or%20deleted%20or%20modified.%20So%20if%20you%20want%20to%20trigger%20mail%20you%20need%20to%20use%20Recurrence(timer)%20which%20will%20execute%20may%20be%20per%20minute.%20I%20hope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2717167%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2717167%22%20slang%3D%22en-US%22%3ECorrect%2C%20the%20column%20type%20is%20%22Person%20or%20Group%22%20and%20yes%2C%20I%20believe%20they%20are%20synced%20with%20Azure%20AD.%20I%20thought%20it%20would%20be%20possible%20to%20have%20a%20recurring%20flow%20(run%20once%20per%20day)%20which%20would%20look%20for%20a%20date%20in%20the%20list%20which%20is%20equal%20to%20today's%20date.%20Then%20it%20would%20send%20an%20email%20only%20to%20the%20person%20in%20the%20cell%20to%20the%20left%20of%20that%20date%20(i.e.%20the%20person%20on%20call%20on%20that%20date).%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20guessing%20I%20need%20to%20use%20a%20filter%20in%20my%20list%20to%20identify%20an%20instance%20of%20today's%20date%20and%20then%20automate%20the%20sending%20of%20an%20email%20to%20the%20person%20next%20to%20the%20date%20in%20the%20list%20(immediately%20to%20the%20left%20of%20it).%20I'm%20not%20so%20sure%20on%20how%20exactly%20to%20use%20the%20filters.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2731949%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20automate%20email%20to%20user%20in%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2731949%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1143940%22%20target%3D%22_blank%22%3E%40Pb505%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWhy%20you%20want%20to%20use%20filters%20in%20list%2C%26nbsp%3B%20for%20sending%20automated%20mail%20Power%20Automate%20will%20do%20rest%20of%20work%20by%20specifying%20correct%20condition%20there%2C%20but%20if%20you%20are%20talking%20about%20Editing%20View%20of%20List%20that%20can%20be%20done%20using%20filter%20option%20available%20in%20Edit%20View.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22suvi15_0-1631096498482.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308930i0AED671827652369%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22suvi15_0-1631096498482.png%22%20alt%3D%22suvi15_0-1631096498482.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
I'm trying to do something which I really feel shouldn't be that difficult.

I have an MS lists page with two columns. One contains users in my organisation (it's not just their name in basic text - it is checked against their active directory record). The other contains a date which they will be on call.

What I want to do is use flows to automate an email to be sent to the user when the date assigned to them is reached. Basically, notify them they are on call.

Any help much appreciated! Thanks
6 Replies
1. Setup a flow that runs every 24 hours.
2. In that flow, grab your list using an odata filter for today's date.
3. Loop through the resulting output and send an email to each record.

If you post some more specifics about your list I could get more specific on how to do it.

Are your users in azure ad?

@BrendanE1535 

This is how my list looks - I blanked out the names but when you click on them it brings up a box with all their contact information (email, phone, office location, profile pic etc.)

 

I only need it to send one email to one user at a time. If today's date = the date in the "duty begins" column then it should send an email to the user next to that date.

 

I'm not certain if users are in Azure AD. If I click a user then I get to see quite a lot of information relating to them like recent files. Is there a quick way to check if they're in Azure AD?

 

Thanks for your reply.

 

Pb505_0-1630569478671.png

 

Hi@Pb505 ,

 

As i understood your column must be Person Or Group type and this field populate from Azure AD well not directly but yes they are sync with Azure AD.

You want to trigger mail only when value matches but as per my knowledge only trigger  happens for certain action like item created or deleted or modified. So if you want to trigger mail you need to use Recurrence(timer) which will execute may be per minute. I hope that helps.

Correct, the column type is "Person or Group" and yes, I believe they are synced with Azure AD. I thought it would be possible to have a recurring flow (run once per day) which would look for a date in the list which is equal to today's date. Then it would send an email only to the person in the cell to the left of that date (i.e. the person on call on that date).

I'm guessing I need to use a filter in my list to identify an instance of today's date and then automate the sending of an email to the person next to the date in the list (immediately to the left of it). I'm not so sure on how exactly to use the filters.

Hi @Pb505 


Why you want to use filters in list,  for sending automated mail Power Automate will do rest of work by specifying correct condition there, but if you are talking about Editing View of List that can be done using filter option available in Edit View.

suvi15_0-1631096498482.png

 

best response confirmed by Pb505 (Occasional Contributor)
Solution
I ended up doing this with a table in Excel instead of using Lists.
My table in excel has two columns. "Name" and "Date on call".
My flow has 3 steps; "recurrence" (once weekly on a Friday), "get a row", and "send an email".
In my "get a row" step, I chose the table and chose "date on call" as the key column. Then for my key value I used the expression "add(44196,dayOfYear(utcNow()))" to create today's date in the format that Excel passes it (I believe this will only work in the year 2021 as 44196 is the number of days between 1st Jan 1900 and the 1st Jan 2021) - I'll need to update it when we hit next year.
Then in send an email I have just been entering fixed email addresses but I will add another column to the table with email addresses for each name and then this will be available as dynamic content in the "to" field.