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

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

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

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**   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.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       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. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (3,551)