Forum Discussion
Pb505
Sep 01, 2021Copper Contributor
Flow to automate email to user in a list
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
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
- 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.
6 Replies
Sort By
- Pb505Copper ContributorI 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. - BrendanE1535Copper Contributor1. 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?- Pb505Copper Contributor
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.
- suvi-15Copper Contributor
HiPb505 ,
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.