Error Handling in Power Automateeee .pdf

abwajid38 10 views 12 slides Sep 15, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

error handling


Slide Content

Mastering Error Handling in
Power Automate
BY - SURABHI MISHRA
Building Resilient Workflows

In this guide, we will explore various exceptional handling
mechanisms within Power Automate. Understanding and
implementing these strategies will enable you to build more robust
and resilient workflows, ensuring that your automated processes can
gracefully manage errors and unexpected situations.
By mastering these techniques, you can enhance the reliability and
efficiency of your automation, making it better suited for complex
business scenarios.

Use "Configure
Run After"
Explanation: "Configure Run After" allows you to dictate what
should happen based on the outcome (success, failure, skipped,
or timed out) of a previous action.
Example: Imagine you have an action that sends an email. If this
action fails (e.g., due to an incorrect email address), you can
use "Configure Run After" to run a subsequent action that
sends a notification to the admin team about the failure.
By Surabhi Mishra

Explanation: This technique mimics traditional
programming's try-catch blocks by using two
Scopes: one for normal operations ("Try") and
one for error handling ("Catch").
Example: In the "Try" Scope, you attempt to
retrieve data from an API. If the API request
fails, the "Catch" Scope logs the error details
and sends a notification to the support team.
This ensures that your flow continues to handle
errors gracefully without causing a complete
breakdown.
By Surabhi Mishra
Try-Catch with Scopes

Terminate Action
Explanation: The "Terminate" action immediately stops
the flow and allows you to specify the status
(Succeeded, Failed, Canceled) and a custom message.
Example: If your flow is processing an order and detects
that a crucial piece of information is missing, you can
use "Terminate" to stop the flow and mark it as
"Failed," sending a custom error message.
By Surabhi Mishra

Add Parallel Branches
Explanation: Parallel branches allow
multiple actions to run simultaneously,
which can be useful for handling different
outcomes of a process.
Example: If you're uploading files to two
different locations (e.g., SharePoint and a
cloud storage service), you can use parallel
branches to do this simultaneously. If one
upload fails, you can handle the failure in its
respective branch without affecting the
other.
By Surabhi Mishra

Timeout Settings
Explanation: Timeout settings allow you to specify how long an
action should run before it is considered failed, preventing your
flow from hanging indefinitely.
Example: Suppose you have a flow that fetches data from a slow
API. You can set a timeout for the API call so that if it takes longer
than expected (e.g., more than 30 seconds), the flow will
proceed with a fallback plan, like using cached data or notifying
the user that the data retrieval failed.

Use Do Until Loop
Explanation: A "Do Until" loop repeatedly
performs actions until a specified condition
is met, or a timeout occurs.
Example: If your flow involves waiting for an external
process (like an approval) to complete, you can use a "Do
Until" loop to keep checking the status until it's either
approved or the maximum wait time is reached. If the
approval isn’t received in time, the loop can exit and
trigger a timeout action, such as notifying the approver
again.
By Surabhi Mishra

Apply Retry Policy
Explanation: Retry policies automatically retry an action
that fails due to transient issues (e.g., network problems or
temporary service unavailability).
Example: If a flow involves sending data to a web service
and the service temporarily fails, the retry policy can
automatically attempt to resend the data up to three times,
with a delay between attempts. This increases the
likelihood that the operation will eventually succeed
without manual intervention.
By Surabhi Mishra

Use Default Values
Explanation: Assigning default values
ensures that your flow can proceed even
when some data is missing or incorrect.
Example: If you're sending out a report and the
recipient's email address isn't provided, you can set
a default email address (e.g.,
"[email protected]") to ensure the report is still
sent. This prevents the flow from failing just because
of a missing optional input.
By Surabhi Mishra

Exception Handling
with Switch
Explanation: The "Switch" control is used to handle
multiple potential outcomes based on a single input, like
different error codes.
Example: If your flow involves calling an API that might
return different status codes (e.g., 200 for success, 404 for
not found, 500 for server error), you can use a "Switch" to
handle each status code differently. For instance, you can
log a "404 Not Found" error, retry on a "500 Server Error,"
or proceed normally on a "200 Success."
By Surabhi Mishra

Thank you!