cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
timlewis1989-uk
New Member

Teams shifts holiday entitlement functionality with Sharepoint lists

Hi all,

 

I like the features of Teams Shifts however it is missing the functionality to track annual leave for individuals for me. I want to create a flow but before i delve into the details I wanted to sense check the idea as I am new to automate and done know what the limits are (I've learnt JS and python so hoping the size of the project is not too much of a reach).

 

High-level concept

Setup:

1. In Teams Shifts create a time off categories 

2. In lists have user ID (MS email needs to be the same as the shifts trigger ID), Hours_Annual_leave

3. I need to look at the user flow for deleting leave 

 

Flow:
-Trigger > update/create, delete time off request

-Action > get user ID 

-Var reqHours> get hours requested from shift request

-Var Allowance > sharpoint list user_ID.Hours_Annual_leave

-Var decrementAllowance > Allowance -reqHours

-Var incrementAllowance > Allowance -reqHours

- Switch/conditional > /*to determine the type of time off request*/ 

Case ADD :

-condition> if (decrimentAllowance>=0) post adaptive card for the user to continue and show remaining hours else reject request and post message with reason. 

-Response from adaptive card

- Switch > 

Case CONTINUE: Update users holiday allowance in Sharepoint lists & notify mgr ready to approve (if rejected by mgr it will need another flow to update the Sharepoint list with old values) 

Case CANCEL: Reject leave and post message of confirmation.

Case: DELETE:

-Action update list 

-Action delete a Time Off instance

-Action post confirmation to user 

-Action notify mgr

 

0 REPLIES 0

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,959)