cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
burliad
Helper III
Helper III

Team Shifts email notification

Hi All,

 

I am trying to create a flow that will send out an email notification to the team member assigned to the shift when a shift is created, updated, or deleted.  Not sure where to start with this one.  Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
burliad
Helper III
Helper III

 ok, I see the real problem.  I checked my sent items in my outlook and the flow is still sending the email to ALL MEMBERS of the team, even people who did not have any changes to their shift.  It also looks like there are 2 emails going out.  There is only one email in the whole bunch that has the dynamic info of the shift listed in it.  I have posed some screen shots.

pic1.jpgpic 2.jpg

View solution in original post

19 REPLIES 19
Expiscornovus
Dual Super User
Dual Super User

Hi @burliad,

 

I have created a example for you below.

 

1. Add the When a shift is create, update or deleted trigger action. Select your Shifts Team

2. Add a Get a Shift action, use the Resource Id dynamic value for the Shift ID

getashift.png

3. Add a Get user action, use the Shift Assigned To User ID for the User Id field

getuseraction.png

4. Add a Send an email (V2) action, use the mail for the To field. You can of course change the subject and body fields of that e-mail action to whatever you want.

sendanemail_mail.png

 

The end result should look something like this.

endresult_shiftsexample.png

 

Hope this helps a bit to get you started?

burliad
Helper III
Helper III

Works perfectly!  Thank you so much!!!  I was on the right track but need some direction.  Thank you again for all your help!

burliad
Helper III
Helper III

It looks like everything is working but I am also getting emails along with the team member who has the shift

Expiscornovus
Dual Super User
Dual Super User

Hi @burliad,

 

Maybe you can add a condition action to filter out your email address?

burliad
Helper III
Helper III

Ok I will give it a try thank you.

burliad
Helper III
Helper III

 ok, I see the real problem.  I checked my sent items in my outlook and the flow is still sending the email to ALL MEMBERS of the team, even people who did not have any changes to their shift.  It also looks like there are 2 emails going out.  There is only one email in the whole bunch that has the dynamic info of the shift listed in it.  I have posed some screen shots.

pic1.jpgpic 2.jpg

I can not find that "get user"  action step. Is there something special you looked up? 

Expiscornovus
Dual Super User
Dual Super User

Hi @rw58265,

 

Look for Azure AD connector first, select that connector and then look for get user action.

 

azureadconnector.png

 

getuser_azuread.png

burliad
Helper III
Helper III

Should I try and use Azure connector as well?  I am still having problem with my flow and I have it turned off right now

thank you! 

@burliad, yes it's probably easier to use the Azure AD get user action, since that one supports using the user id field. As far as I am aware with Get User Profile action you have to use the user principal name instead.

 

Btw, below is an example how you could exclude one email address by using a condition action.

userdoesnotequal.png

isagha
New Member

Hi all.
I am trying to do the same, but I don't get any changes or details in the email except the writing.
Please see the screenshots below.

Hi.PNGwhat I recieve.PNG

 

Many thanks, 

Ismail 

Kaczi
New Member

We’ve been trying to achieve that same flow. What appears to be the problem for us is that when changing a shift, it counts as an update for every member of the team and the Flow subsequently running once for every team member and sending as many mails.

Since we couldn’t yet figure out a way to not have shift changes be counted more than once yet, we’re trying to limit the number of times the flow runs. I’ll get back to this thread once we’ve figured out a solution or given up.

 

Regarding the 2 Mails mentioned above, if a shift is deleted an recreated, it counts as 2 changes, ergo 2 Mails.

Runner55552
Helper IV
Helper IV

I have a flow working that can send emails when a shift is updated or created. However, would also like to send an email with some data about a shift when it is deleted. But after the trigger, the get a shift action returns an error that the shift is not found when a shift is deleted. Any workaround to this?

Can you post screenshots with settings so I can see how you got it working? I cannot get mine working here so I'm hoping someone with recent experience can show me!

Runner55552
Helper IV
Helper IV

Yes, I can. Likely later this week. In fact, I worked out a system to perform a delete action, but it does require someone to type the word delete or Delete into the notes column.  The process also required an HTTP request to get some of the values that you cannot get with the out of the box actions.

Thanks! I am just trying to get it working with the created/modified but delete would be great too!

Runner55552
Helper IV
Helper IV

See screenshot for the basic flow.  The delete option is a bit more complicated, and is not shown below.  I used the Notes field, and typed the word "deleted" in the notes. The flow can then check the notes field for that word, and if found, it can implement the delete action, otherwise, proceed with the update action.

 

Runner55552_0-1655125718271.png

 

Thanks! I'll keep in this mind for later. Turns out, Teams connector is not yet available for GCC licensing, which is why I couldn't get it working at all

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,074)