Trigger filters help manage when a trigger should fire and execute the underlying action(s). In Microsoft Power Platform, you can apply filter conditions to control the firing of triggers based on your specified conditions.
For example, you might only want to execute a trigger when an email with a specific subject line arrives. In this case, the filter condition will be set on the email subject. If the incoming email subject matches your condition, then the Flow will be triggered.
Consider the following Power Automate example:
- Create an automated flow for when an email arrives (Office 365 Outlook -> When a new email arrives).
- In the “Subject Filter” box, enter your preferred subject line. This sets the condition that the trigger will only fire if the incoming email has a matching subject.
Remember that you can use the expression tab in Power Automate to create more complex conditions.
Retry Policies
Retry policies determine how and when the platform should retry a failed action. This is particularly beneficial as it improves the robustness of your data management and processing.
While configuring a Retry Policy, three properties should be considered – Retry Type, Count, and Interval.
- Retry Type: This specifies the type of retry pattern. You can choose between fixed interval, exponential backoff, or none.
- Count: This determines the number of retry attempts.
- Interval: If your Retry Type is fixed, this is the interval between retries.
For instance, if you have connectivity issues while retrieving data from a SQL Server, you may want to set a retry policy.
To set this up, edit the SQL Server action configuration and navigate to Settings. Under Retry Policy, you can configure your preferred policy. If you choose “fixed interval”, specify the retry count and time interval.
Here’s a comparison of the Retry types:
Retry Type | Description |
---|---|
Exponential Backoff | The interval time will double after each retry attempt until it hits the maximum limit. |
Fixed Interval | The interval time between retries remains consistent throughout the retry attempts. |
None | No retry is performed. |
Remember, configuring trigger filter and retry policies is an essential step to ensure efficient and reliable application operations. Prioritizing thorough understanding of these topics will not only enhance your problem-solving skills, but also boost your performance in the PL-400 Microsoft Power Platform Developer exam.
Practice Test
True or False: Trigger filters in Power Automate can be set up to specify a set of conditions that must be met for a flow’s trigger to start the flow.
- 1) True
- 2) False
Answer: True
Explanation: Trigger filters allow the configuration of a flow trigger to only initiate if specific conditions, defined in the filter, are met.
True or False: Retry policy can only be configured after the execution of the trigger.
- 1) True
- 2) False
Answer: False
Explanation: Retry policy is configured before the execution of the trigger to handle intermittent issues that might occur during the trigger execution.
What is the permissible range of the retry interval in Power Automate?
- 1) 5 seconds to 1 hour
- 2) 10 seconds to 30 minutes
- 3) 1 second to 1 hour
- 4) 1 minute to 60 minutes
Answer: 5 seconds to 1 hour
Explanation: The range of intervals for a retry policy in Power Automate is between 5 seconds and 1 hour.
How many times can Power Automate retry the execution of a trigger when it fails?
- 1) 1
- 2) 5
- 3) As many times as set in the retry policy
- 4) 10
Answer: As many times as set in the retry policy
Explanation: Power Automate can retry a failed execution as many times as specified in the retry policy.
True or False: You can configure a trigger filter to use any data from previous steps in the flow.
- 1) True
- 2) False
Answer: False
Explanation: Trigger filters can only use data available at the trigger point, not data from subsequent flow steps.
What are the two types of retry policies in Power Automate?
- 1) Fixed and Progressive
- 2) Constant and Progressive
- 3) Fixed and Variable
- 4) Constant and Revolving
Answer: Fixed and Progressive
Explanation: The two types of retry policies available in Power Automate are Fixed and Progressive.
Which of the following statements is true about Power Automate Retry policies?
- 1) Retry policies can be used to specify the action to be taken if a trigger fails.
- 2) Retry policies determine the maximum number of times Power Automate will try to run a trigger before marking it as failed.
- 3) Retry policies can be set to automatically retry after a user-specified mount of time.
- 4) All of the above.
Answer: All of the above.
Explanation: All options correctly describe different functions of Retry policies available in Power Automate.
Can trigger filters in Power Automate use expressions?
- 1) Yes
- 2) No
Answer: Yes
Explanation: Trigger filters support the use of expressions for setting up more complex conditions.
True or False: A Progressive Retry policy increases the wait time between each retry.
- 1) True
- 2) False
Answer: True
Explanation: In a Progressive Retry policy, the system increases the wait time between retries each time the action fails.
In Power Automate, a _____________ filter is used to prevent unnecessary flow runs by specifying conditions that must be met for the flow to run.
- 1) logic
- 2) trigger
- 3) conditional
- 4) control
Answer: trigger
Explanation: Trigger filters in Power Automate are designed to specify conditions that, when met, will cause a flow to run. This can help prevent unnecessary flow runs.
True or False: A retry policy in Power Automate applies to all flow actions and not just the triggers.
- 1) True
- 2) False
Answer: True
Explanation: A retry policy in Power Automate applies to all actions in the flow, to handle intermittent issues that might occur during their execution.
Interview Questions
What are trigger filters in Power Automate?
Trigger filters in Power Automate are expressions that can restrict a flow from running unless specific conditions are met. They are written in Workflow Definition Language.
How do Retry Policies work in Power Automate?
Retry Policies in Power Automate are used to specify how and when the workflow should attempt to redeliver a message or redo a task if the first attempt was unsuccessful.
How could you configure a trigger filter in Power Automate?
To configure a trigger filter in Power Automate, you would use the “@equals(triggerBody()?[‘FieldName’], ‘Value’)” syntax in the Trigger conditions field for the specific action you want to filter.
What are the different types of Retry Policies available in Power Automate?
The three types are Fixed Interval, Exponential Backoff, and None. Fixed Interval sets a specific time between each retry, Exponential Backoff doubles the time between each retry, and None means the system won’t attempt to retry.
What is the purpose of a fixed interval retry policy?
A fixed interval retry policy, when configured in Power Automate, allows the system to retry a failed action after a specified amount of time.
How to set up an Exponential Backoff Retry policy?
You set up Exponential Backoff Retry policy by selecting the “Exponential backoff” option in the Retry Policy setting. It doubles the time between retries, starting with a quick retry, then delaying longer and longer to give the system a chance to recover.
How will you specify a trigger filter within an existing flow?
Click on the ellipsis (…) in the top right corner of a trigger or action, select Settings, then under “Trigger Conditions” add your expression.
What is the use of the ‘None’ option in the Retry Policy?
The ‘None’ option in Retry Policy setting is used to instruct Power Automate not to make any retry attempts after a failure occurs.
How do you access the Retry Policy settings in Power Automate?
The Retry Policy setting in Power Automate can be accessed by clicking on the ellipsis (…) in the top right corner of an action or trigger, then selecting Settings.
How many times will Power Automate retry a failed action by default?
By default, Power Automate will retry a failed action four times before giving up.
What is the maximum retry interval you can set for a Fixed Interval retry policy?
The maximum retry interval you can set for a fixed interval retry policy is 24 hours.
Are custom Retry Policies supported in Power Automate?
Currently, Power Automate does not support custom Retry Policies.
How do you determine the number of retries in Power Automate?
You can configure the number of retries in Power Automate by modifying the Retry Count setting in the Settings for a particular action or trigger.
Can you apply Retry Policy to all actions in a flow in Power Automate?
Retry Policy can be applied to each action individually, but there’s currently no option to apply the same policy to all actions in a flow at once.
What happens when you set the Retry Policy to ‘None’?
When you set the retry policy to ‘None’, no retries will be attempted if the action fails. It’s effectively turning off retries.