How to Send Automated Emails on Specific Dates Using Power Automate and SharePoint | 2022 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone Michael back with another video in this video I'm going to show you how to send emails on specific days throughout the year using power automate if you enjoy these videos feel free to subscribe I make videos on SharePoint teams power automate and powerapps all right so for my use case I'm going to do a holiday PTO email so I'm going to send emails the day before holiday just to remind the team that you know tomorrow is a holiday and not to report for work so I create a SharePoint list and I have a few holidays here so let me show you so the holiday field is the title field and then I manually entered in these holiday dates first thing is I'm going to do a calculated field just so I don't have to make another field because I will need the day before the holiday to compare in my power automate flow to actually send the email I don't want to send it on this day and I think it's easier just to make another column here so you want to go into your list settings create column and I'm just going to name mine day before holiday so this will be calculated and the formula is just going to be the holiday date minus one so that will give us the day before the holiday and I want to use this data type to be returned as date and time date only is fine add to default view okay so let's go back into our list and just see that it worked correctly as you can see with the holiday date then we also do have the day before the holiday so that's exactly what we want here all right so the SharePoint list is done with the holidays let's go into our power automate so we want to create a new flow and this flow will be a scheduled call Cloud flow because we want this to run every day and compare it to the day before the holiday if it equals that day we want to send an email it doesn't equal that day we don't want to do anything those due holiday reminder email and we could start it today and I will send it we'll send it at noon the day before a holiday and I want to repeat every day so we go ahead and press creates so for the first step we actually want to get the current date and for this we want to do a compose so for this compose statement I want to do a custom expression so the customer expression will look like this so I want to use the Eastern Time Zone so it's going to be convert time zone parentheses and for my string I want to use the UTC now because I need that date and UTC now parentheses comma so this will be the date I'm converting the time zone I'm converting from or UTC it's UTC all capitals within single quotes comma and the next Eastern time zone is eastern standard time and single quotes So we want to use another comma and this is just going to be the format I want to Output the converted time so single quotes I want to do month month and you have to do Capital M's if you do lowercase it's going to get the minute instead of them up FYI so Mach 1 day year year year year in single quotes so I will just toss this in a notepad really quick and make it bigger for y'all to see so that's what it looks like convert time zone UTC now uh comma UTC this is the time zone I'm converting from this time zone I'm converting to and this is the format so let's go ahead and make sure this works press ok so it looks like it took it incorrectly so next thing I want to do is the get items function items action and I want to pull all these items from the SharePoint list and I want to compare that date to every single item date so it's going to be get items and it's in my marketing SharePoint and it is the holiday schedule there's no need for advanced options unless you want to do specific dates but that's all on you so next is I want to do a condition statement so for this condition statement we want to do an expression because the calculated field will return the dates with the time actually and if we do that comparison it's not going to work because this is formatted to do month month day day year year year so we need to get rid of that time so for our expression let's do Dynamic content and we want to do the day before holiday so it's going to put this in and apply to each and that's because we have to go through each of these items so that's why I did that all right so we want to go ahead and press Ctrl a to copy all Ctrl C to copy and we want to go to our expression so the expression you want to do is format date time then you want to paste in the SharePoint column and you want to remove the add symbol So within the parentheses next we just want to do the format so it's going to be the same as our compose so month month day day year year year a single quote and let me just pull that into a notepad so it'll look like format date time and it gets put into an item supplied each and just using something the column that we calculated and this is the format date it's going to Output going press ok so this has got to be equal to our compose so that is our compose outputs down here so if this is yes we want to send an email B2 so if you have like a team you want to have a distribution list for that team I don't have a team I just use single users so I'll just have a one of my users that's on my team and so for the subject we'll just do holiday reminder and we can actually list the holiday here because we have it the information in our SharePoint list we'll know the title the holiday reminder hi everyone this is a reminder that we do that we don't report for work tomorrow enjoy your holiday thanks management if it's no we don't want to do anything so we can go ahead and press save so there's actually no holidays tomorrow so I added a SharePoint item Michael's birthday on my birthday but it will do for the test case and the holiday date is tomorrow so the day before holidays today let's go ahead and run this the test manually run flow let's take a look at our compose so we'll grab the write date with the convert time zone I'll get items we'll click to download just so we can see the output so as you can see the day before holiday so it actually gives the uh the UTC time along with that so that's why we had to do the uh format date let's go ahead into our apply to each select section our 11th item in the SharePoint list so I can go ahead and Skip to that click on the condition as you can see it passed by true send an email so it's not the email so let's go ahead and check my Outlook and as you can see holiday reminder Michael's birthday hi everyone it's a reminder that we don't report for work tomorrow enjoy your Michael's holiday thanks management and that will be the video on how to use power automate to send an email on specific days if you like the video feel free to like comment subscribe if you have any video ideas feel free to leave them in the comments and I will catch you in the next one
Info
Channel: Michael Alex
Views: 36,804
Rating: undefined out of 5
Keywords: Microsoft, Microsoft Forms, Forms, Microsoft SharePoint, SharePoint, Teams, Power Automate, Power Platform, Microsoft Flow, Flows, Automation, Tutorial, Guide, 2022, Microsoft Outlook, Outlook, Email, automated emails, power automate emails, how to automate emails, automate emails on holidays, pto reminder, pto emails, sending automated emails, sharepoint list, list, sharepoint, microsoft flow, flows, send an email v2
Id: cwRjGLHyq9o
Channel Id: undefined
Length: 8min 29sec (509 seconds)
Published: Tue Dec 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.