Error Handling and Creating a Detailed Log
Intro Make sure your flows can handle when things don’t go as expected: Error Handling and write a Log. Learning Objectives Description Hints Code (expression) to get the link (URL) to a Microsoft Power Automate flow: Video
Table of Contents
Intro
Make sure your flows can handle when things don’t go as expected: Error Handling and write a Log.
Learning Objectives
- Error Handling
- Write a log
- JSON Parsing
Description
- Create two number variables, A and B
- Compose
- Add the two variables to each other
- Expression: add(variables(‘A’),variables(‘B’))
- Add the two variables to each other
- What happens if you change B to a text?
- Error we need to handle
- Use the Configure run after setting and create the rest of the flow, that
- Write a log with the status and an error message, if it appears
- In case of an error send an email with
- The flow name
- Time of the flow run
- The status
- The error message
- The link to the flow
- Set the status of the flow to Failed
- Create a Scope with three Scopes in
- Try Catch
- Try
- Catch
- Finally
- Let it handle exceptions in our flow
- “Configure run after” in the following action
- Try Catch
- Advanced
- Download the Excel data for the lesson
- For each row fill in the missing (create a log)
Hints
Code (expression) to get the link (URL) to a Microsoft Power Automate flow:
concat('https://make.powerautomate.com/environments/',workflow()?['tags']?['environmentName'],'/flows/',workflow()?['name'],'/runs/',workflow()?['run']?['name'])