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
Hi, @Harshavardhan22 , this should hopefully be relatively simple, you just use a combination of the trigger condition of:
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:
The key item being the Get changes for an item or a file (properties only) action, with the following expression in the Since field:
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.
@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.
First up you need to prepare a couple of things, the trigger, and two extra columns in the SharePoint list.
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:
Congratulations, you have made your first trigger condition!
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:
Repeat the process to add another column, ensure that 'Add to default view' is not ticked, and call it:
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!
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)
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.
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.
Name it itemUpdatedVAR and using the expression builder type in the word 'false' with no quotations around it. Guidance on the expression builder follows.
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.
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:
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.
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.
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:
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.)
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!