Set a timeout for long-running actions
Quiz question
What does the timeout value P2W on an action mean?
Solution
- A) The action only starts after two weeksWrong. A timeout delays nothing. It defines when a running action counts as timed out.
- B) The action runs twice a weekWrong. A timeout does not repeat an action. Repetitions are handled by the Retry Policy.
- C) The action waits for two weeks at mostCorrect. P2W is a duration in ISO 8601 format and stands for two weeks.
What it is about
An approval or another action that waits for people can take longer than planned. In the action settings you define under Timeout how long it may wait at most. You write the duration in ISO 8601 format: P1D is one day, P2W is two weeks, PT2H is two hours. When the time runs out, the action counts as timed out. So that the flow does not simply fail, add an action whose Configure run after is set to has timed out only. There you send a reminder, escalate or start a new request. On top of that, every flow run is limited to 30 days.
The expression from the tip
P2WWhen to use it, when not
Use it
For approvals and other actions that wait for a response whose duration you do not know.
Better not
When the process can exceed the run duration limit of 30 days. A timeout is not enough then, because the whole run ends before.
Most common mistake
Setting the timeout but building no path for has timed out. The run then fails anyway.
License
Standard Runs without a premium connector, so the license from Microsoft 365 is enough. Source on Microsoft Learn: Power Automate licensing FAQ. For your whole flow: License check.
Share
Short link: powerautomate.ninja/en/109
Source: PowerPlatformTip #109, Microsoft Learn: Limits of automated, scheduled, and instant flows.