cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Harshavardhan22
Frequent Visitor

Creating a flow that sends remainders for Item in a SharePoint list when the status of the Item is in Pending for more than 24 hours

Hello Everyone!!!

I need your help to create flow that sends remainders for Item in a SharePoint list when the status of the Item is in Pending for more than 24 hours. Let me explain you the scenario.....

 

I have created a SharePoint list with multiple columns for approval purpose. Let us say List name is 'Expenses' and columns are Title, Amount, Status and Modified Date. Here Status column is choice column that has 'Waiting for L1 Approval', 'L1Approved', 'L1Rejected', 'Waiting for L2 Approval', 'L2Approved; & L2Rejected as choices. Now when the status is 'Waiting for L1/ L2 Approval' for more than 24 hours based on last modified date, I have to send an remainder email using power automate. 

 

Can you please help me on creating a flow for the process explained above. 

 

Tagging: @Rhiassuring@Heartholme , @Expiscornovus , @Pstork1@eliotcole@codevenkat 

4 REPLIES 4
eliotcole
Super User
Super User

Hi, @Harshavardhan22 , this should hopefully be relatively simple, you just use a combination of the trigger condition of:

@equals(triggerOutputs()?['body/Status']?['Value'], 'Waiting for L1/ L2 Approval')

If your Status field is named slightly differently just be mindful to get it right.

 

The beginning of your flow will then look something like this:

0 - basic flow.jpg

 

The key item being the Get changes for an item or a file (properties only) action, with the following expression in the Since field:

1 - key action.jpg
sub(
    int(
        split(
            triggerOutputs()?['body/{VersionNumber}'],
            '.'
        )[0]
    ),
    1
)

 

Then you just perform a condition on the Changed: Status field from the Get changes for an item or a file (properties only) action, use an expression that consists purely of the word 'true' (lowercase, no quotes) on the other side of the equals, and have a delay for 1 day in the yes side. 👍

 

This will only then fire if the Status field has the desired status, and it will halt if that field hasn't changed from the previous value.

 

After your condition, you can then perform more actions, including (perhaps wise) a check on if the item version number has changed since the version that it triggered with, and if that field has changed since then.

Harshavardhan22
Frequent Visitor

@eliotcole  I am extremely sorry.. I couldn't understand what you are trying to explain as I am very new to power automate...

 

Could you please help me understand where should I use the above mentioned functions. You mean in a scheduled flow or any other?

Like I said, I was editing in the imagery.

 

You should be able to see a clearer idea of what's going on there, now.

 

You will need to use expressions, for this one, but don't be scared of them. Expressions are just like the Flow, but in text.

 

Either way, I'll show you how to do it without them shortly, it'll just be a lot more actions.

OK, and here's a version without any expressions, and I'll tag on that logic I spoke of previously.

 

You *might* have to write one expression, I'll try to give you a value to paste, but it doesn't always work with flow. Either way, it's a really easy expression to put in, and if you make the same Compose actions that I do, you should have no issues with it.

No Expressions ('cept one)

 

SETUP

First up you need to prepare a couple of things, the trigger, and two extra columns in the SharePoint list.

 

Trigger Condition

You need this here to ensure that this flow doesn't run for every single change on the list.

 

Follow these steps to easily create a trigger condition:

1

Add an action

Select a point anywhere in the flow and choose 'Add an action', then 'Data Operation'.

1 - Add an action.jpg
2

Filter array

Select 'Filter array' from the choices.

2 - Filter.jpg
3

Select column

In the left side of the Filter array condition insert a Dynamic Value, and select your desired column.

 

In this example we're choosing 'Status', which is listed as 'Status Value' as it is a choice column on my list.

3 - Pick Column.jpg
4

Enter the condition text

Now in the middle you choose your condition logic, in this case, you wish to ensure that the column is equal to a value that you state, so you choose 'is equal to' here.

 

Then on the right side you want to place the value that you wish the trigger of the flow to fire upon. So here you either type, or copy directly from the list settings the value that you need to match.

4 - Enter text.jpg
5

Edit in advanced mode & Copy Text

Tap 'Edit in advanced mode' and copy or cut all the text from that box using CTRL+A to ensure it's all selected.

5 - Tap 'Edit in advanced mode' and cut all the text.jpg
6

Delete the Filter array

Tap the three dot menu on the Filter array, and select 'Delete'

6 - Delete the Filter array.jpg
7

Go to Trigger Settings

Tap the dot menu on the trigger and select 'Settings'

7 - Tap the dot menu on the trigger and select 'Settings'.jpg
8

Paste Trigger Condition

Look to the bottom of the Trigger Settings you will see the Trigger Condition section.

 

Add a new Trigger Condition and paste the details that you cut from the Filter inside it.

8 - Add a Trigger Condition and paste the details that you cut from the Filter.jpg

 

Congratulations, you have made your first trigger condition!

🏆

 

2 x New Calculated Column in SharePoint List 'versioninteger'

  1. Scroll to the right side of your list
  2. Select 'Add column'
  3. Select 'More...'
  4. You will have the below screen, fill it out exactly as below, and tap 'OK'

Ensure that 'Add to default view' is unticked, as this column does not need to be seen anywhere. Then also ensure that it has the following name, and the formula that is by the side of the image below:

versioninteger

0 - SharePoint Setup.jpg

 

=INT([Version])
previousversioninteger

Repeat the process to add another column, ensure that 'Add to default view' is not ticked, and call it:

previousversioninteger

Place the following formula in the formula box, can you see the slight difference? It has subtracted 1 from the value so the SharePoint list is already providing the previous version number for you!

=INT([Version])-1

 

BUILDING YOUR FLOW

 

Trigger

Your trigger you already know about. You're using the SharePoint list trigger, with the Trigger Condition that you have prepared in advance. (see above)

 

Constants & Changes

The two 'CNST' values are defined once so you can easily use them throughout your flow. Constants are similar to Variables, except a Constant doesn't change (it is constant) and a Variable does (it varies!).

 

These constants use 'Compose' actions, which you can get from the same place as the Filter action that you deleted earlier.

  1. In versionCNST you'll select the SharePoint column that you created in the Prep stage, above, versioninteger. This provides the number that you need in the perfect format.
  2. In previousVersionCNST you will just select the previousversioninteger Dynamic Value and place it in the Input field.
  3. In Get changes for an item or a file (properties only) you simply select the ID from the Trigger, and the output of previousVersionCNST.

1 - Constants and Get changes.jpg

 

Variable

I decided to add some logic in the Yes branch below which needs this, it is a very simple little thing.

 

Just add an Initialize variable action from the Variables connector, which should default to Boolean.

boolean.jpg

Name it itemUpdatedVAR and using the expression builder type in the word 'false' with no quotations around it. Guidance on the expression builder follows.

 

Condition

In the left side of the condition you will want to select the field that you are trying to check for change, in this case mine is called Status, I think yours is the same, so it should look similar.

2 - Condition equation.jpg

In the middle you will need to select 'is equal to' in order to ensure that you are checking that the value in this column matches what you put on the right here.

 

On the right you will need to use the Expression builder, but don't worry, you're just going to type in one word:

2b - Add an expression (Ctrl + S).jpg
true

Condition and Variable.jpg

 

No Branch

Place a terminate action here, you can get this from the Control connector, and then once it's in, use the 'Cancel' option to cancel the flow if it comes to this route.

 

Yes Branch

Here is where you'll place your checking logic.

 

Purely as an example which you can choose to follow (but this is where your path may divert from mine), here is my checking logic.

 

I have used a 'Do until' loop, which will keep delaying by a day, until the ticket is updated.

 

Do until
Do until.jpg

As you can see, this 'Do until' will keep running until the Variable that you created just now reads 'true'. (ignore the undefined, it says that until you run the flow once)

 

So, for each Do until loop this will:

  1. Delay for 1 day.
  2. Then it will check to see if the item has had any changes.
    Here the Since field will use the versionCNST value, which was the version that it came in at. Sooooooooo ...
  3. The condition checks to see if the Since Version Number is equal to the Until Version Number.
    1. Yes - If it is the same, then it will chase the ticket owner to update the ticket.
    2. No - If it has changed it will set the itemUpdatedVAR to true, and the Do until loop will stop.

 

That is the end!

 

You could add further logic, to check how many Do until loops have run, then if it has gone on for a certain amount of days, email the ticket owner's manager to stick a boot up them. 😈

(OK, I'm done now 😅 ... but can you see how much extra needs doing without the expressions? The flip side is that this will be easier for someone else to follow afterwards.)

Helpful resources

Announcements

Copilot Cookbook Challenge | Week 2 Results | Win Tickets to the Power Platform Conference

We are excited to announce the "The Copilot Cookbook Community Challenge is a great way to showcase your creativity and connect with others. Plus, you could win tickets to the Power Platform Community Conference in Las Vegas in September 2024 as an amazing bonus.   Two ways to enter: 1. Copilot Studio Cookbook Gallery:  https://aka.ms/CS_Copilot_Cookbook_Challenge 2. Power Apps Copilot Cookbook Gallery: https://aka.ms/PA_Copilot_Cookbook_Challenge   There will be 5 chances to qualify for the final drawing: Early Bird Entries: March 1 - June 2Week 1: June 3 - June 9Week 2: June 10 - June 16Week 3: June 17 - June 23Week 4: June 24 - June 30     At the end of each week, we will draw 5 random names from every user who has posted a qualifying Copilot Studio template, sample or demo in the Copilot Studio Cookbook or a qualifying Power Apps Copilot sample or demo in the Power Apps Copilot Cookbook. Users who are not drawn in a given week will be added to the pool for the next week. Users can qualify more than once, but no more than once per week. Four winners will be drawn at random from the total qualifying entrants. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once. If they are drawn multiple times, another user will be drawn at random. Prizes:  One Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value, does not include travel, lodging, or any other expenses) Winners are also eligible to do a 10-minute presentation of their demo or solution in a community solutions showcase at the event. To qualify for the drawing, templates, samples or demos must be related to Copilot Studio or a Copilot feature of Power Apps, Power Automate, or Power Pages, and must demonstrate or solve a complete unique and useful business or technical problem. Power Automate and Power Pagers posts should be added to the Power Apps Cookbook. Final determination of qualifying entries is at the sole discretion of Microsoft. Weekly updates and the Final random winners will be posted in the News & Announcements section in the communities on July 29th, 2024. Did you submit entries early?  Early Bird Entries March 1 - June 2:  If you posted something in the "early bird" time frame complete this form: https://aka.ms/Copilot_Challenge_EarlyBirds if you would like to be entered in the challenge.   Week 1 Results:  Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Copilot Cookbook Gallery:Power Apps Cookbook Gallery:1.  @Mathieu_Paris 1.   @SpongYe 2.  @Dhanush 2.   @Deenuji 3.  n/a3.   @Nived_Nambiar  4.  n/a4.   @ManishSolanki 5.  n/a5.    n/a   Week 2 Results:  Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Copilot Cookbook Gallery:Power Apps Cookbook Gallery:1. Kasun_Pathirana1. ManishSolanki2. cloudatica2. madlad3. n/a3. SpongYe4. n/a4. n/a5. n/a5. n/a

Win free tickets to the Power Platform Conference | Summer of Solutions

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**

Celebrating the June Super User of the Month: Markus Franz

Markus Franz is a phenomenal contributor to the Power Apps Community. Super Users like Markus inspire others through their example, encouragement, and active participation.    The Why: "I do this to help others achieve what they are trying to do. As a total beginner back then without IT background I know how overwhelming things can be, so I decided to jump in and help others. I also do this to keep progressing and learning myself." Thank you, Markus Franz, for your outstanding work! Keep inspiring others and making a difference in the community! 🎉  Keep up the fantastic work! 👏👏 Markus Franz | LinkedIn  Power Apps: mmbr1606  

Your Moment to Shine: 2024 PPCC’s Got Power Awards Show

For the third year, we invite you, our talented community members, to participate in the grand 2024 Power Platform Community Conference's Got Power Awards. This event is your opportunity to showcase solutions that make a significant business impact, highlight extensive use of Power Platform products, demonstrate good governance, or tell an inspirational story. Share your success stories, inspire your peers, and show off some hidden talents.  This is your time to shine and bring your creations into the spotlight!  Make your mark, inspire others and leave a lasting impression. Sign up today for a chance to showcase your solution and win the coveted 2024 PPCC’s Got Power Award. This year we have three categories for you to participate in: Technical Solution Demo, Storytelling, and Hidden Talent.      The Technical solution demo category showcases your applications, automated workflows, copilot agentic experiences, web pages, AI capabilities, dashboards, and/or more. We want to see your most impactful Power Platform solutions!  The Storytelling category is where you can share your inspiring story, and the Hidden Talent category is where your talents (such as singing, dancing, jump roping, etc.) can shine! Submission Details:  Fill out the submission form https://aka.ms/PPCCGotPowerSignup by July 12th with details and a 2–5-minute video showcasing your Solution impact. (Please let us know you're coming to PPCC, too!)After review by a panel of Microsoft judges, the top storytellers will be invited to present a virtual demo presentation to the judges during early August. You’ll be notified soon after if you have been selected as a finalist to share your story live at PPCC’s Got Power!  The live show will feature the solution demos and storytelling talents of the top contestants, winner announcements, and the opportunity to network with your community.  It's not just a showcase for technical talent and storytelling showmanship, show it's a golden opportunity to make connections and celebrate our Community together! Let's make this a memorable event! See you there!   Mark your calendars! Date and Time: Thursday, Sept 19th Location: PPCC24 at the MGM Grand, Las Vegas, NV 

Tuesday Tip | Accepting Solutions

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   To enhance our collaborative environment, it's important to acknowledge when your question has been answered satisfactorily. Here's a quick guide on how to accept a solution to your questions: Find the Helpful Reply: Navigate to the reply that has effectively answered your question.Accept as Solution: Look for the "Accept as Solution" button or link, usually located at the bottom of the reply.Confirm Your Selection: Clicking this button may prompt you for confirmation. Go ahead and confirm that this is indeed the solution.Acknowledgment: Once accepted, the reply will be highlighted, and the original post will be marked as "Solved". This helps other community members find the same solution quickly. By marking a reply as an accepted solution, you not only thank the person who helped you but also make it easier for others with similar questions to find answers. Let's continue to support each other by recognizing helpful contributions. 

Reminder: To register for the Community Ambassador Call on June 13th

Calling all Super Users & User Group Leaders   Reminder: To register for the Community Ambassador Call on June 13th—for an exclusive event for User Group Leaders and Super Users! This month is packed with exciting updates and activities within our community.   What's Happening: Community Updates: We'll share the latest developments and what's new in our vibrant community.Special Guest Speaker: Get ready for an insightful talk and live demo of Microsoft Copilot Studio templates by our special guest.Regular Updates: Stay informed with our routine updates for User Groups and Super Users.Community Insights: We'll provide general information about ongoing and upcoming community initiatives. Don't Miss Out: Register Now: Choose the session that fits your schedule best.Check your private messages or Super User Forum for registration links. We're excited to connect with you and continue building a stronger community together.   See you at the call!  

Users online (6,223)