cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

Hello Everyone! Hoping I can get some help from someone who has done this before. Our organization currently utilizes Teams & Shifts for our Time off Requests. We would like to be able to get an approval notification each time a time off request has been submitted through Shifts. Additionally, we would like to have the approved request integrate with Outlook once approved. 

 

We currently are testing on 'Team' within Microsoft Teams but would like to have this set up for each department. 

 

As I understand, this can only be completed through Power Automate. Does anyone have any experience with Power Automate and Shifts within Microsoft Teams? Any help would be much appreciated. 

 

Thanks!

5 REPLIES 5
Highlighted
Dual Super User
Dual Super User

Re: Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

Hi!

So here you are a link to Teams connector official documentation,  you will find detailed description of Shifts related triggers and action blocks:

 

https://docs.microsoft.com/en-us/connectors/teams/

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
New Member

Re: Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

Ah yes thank you for that. I saw this when looking at connectors, but it seems a couple of them aren't clear on how I can turn it to an approval. I am trying to basically do this:

 

Check for Requests > If there is a request, send an approval email to the following approver: [Names Here]

Check for Requests > If there isn't a request, do nothing. 

 

More would be added, but that's the basics of it. 

Highlighted
Advocate I
Advocate I

Re: Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

Hi,

 

First post on this forum and I hope it will help you getting an idea on how to do what you want.

I've had the same exact experience and I've built a flow a month ago to be able to get requests from SHIFTS, approve/deny the requests and send an outlook notification with an event invite attached with the time-off information. It may be not elegant but it works.

 

Here's an overall picture of the flow:

image.png

 

First I'm using a time trigger to check for new requests every 30 min and filter for only pending Time-off request.

image.png

'TimeOff Request state' is equal to 'pending'

 

Then a few boxes to convert time and prepare for what will be needed for the ICS invite:

image.png

 

Next is a filter to convert the Time-off request reason string to it corresponding text followed by a box to identify the user who has make the request.

image.png

'List of time off reasons associated with a team Single time off' is equal to the filtered output of the pending request 'TimeOff Request TimeOff Reason ID' 

 

Now I'm sending the approval request via email to whom will decide. Take note that some basic html will be needed to get the email body formatted correctly. And the condition box will branch-off accordingly to the approval decision.

image.png

 

If the time-off request is approved, it will be added to SHIFTS, otherwise it will be rejected and a notification will be sent to the user.

image.png

 

If the time-off request is approved, an ICS template and file creation will be done in a temporary placeholder on a sharepoint site. Some data manipulation is needed for DTSTART and DTEND to get the time format to ICS standard.

image.png

DTSTART and DTEND need to be formatted to ICS, I do it with an Expression:

replace(replace(outputs('Request_startDateTime'),'-',''),':','')

 

 

And finally, I'm sending an email notification to the user that his request has been added to SHIFTS and that he can use the ICS invite attached to the email as a reminder in outlook calendar.

image.png

 

I've worked many hours on this as I'm no coder and I hope it may help you or anyone with a similar request.

 

K.

 

Don't forget to mark as a solution and thumbs up if you like.

Highlighted
New Member

Re: Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

@karlberg74 thank you so much for your response! I recreated what you posted and the flow runs successfully, but I think I have the values inputted correctly because nothing happens. For each section, could you post what each value entered is?

 

For example, in the 3rd part right after Recurrence and Shifts: List All Time Off Requests, there is a Filter Array (Pending Request). The Value in From is labeled: 'TimeOff Reque...' but doesn't state the full name of the value. It could be a couple of items based on the available options. Could you provide the full names of all of the entered values/variables?

 

again, thank you for this! I can see this solving our problems and really appreciate all the time you spent on this. 

Highlighted
Advocate I
Advocate I

Re: Microsoft Teams | Shifts >> Creating Approvals Each Time a Request Is Submitted

@Jakewright94 I've edited my previous post with some pointers in italics to help you with what you need but most are self-explanatory within the title of the action or the comment associated with it.

 

Fiddling around with all the choices will help you learn more of what Power Automate can give you and you will be able to make it your own.

 

If you need a more specific answer, just give me a shout.

 

K.

 

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (9,432)