Welcome to post number four in my series on learning Power Automate. The first post covered menus and navigating. Post two introduced triggers and actions. Post three provided the things you need to know for your first build. This post discusses troubleshooting in Power Automate. Read on to learn what to do when your flow isn’t flowing.
Blog or Video
Are you a reader or a watcher? All blog content also exists on my YouTube channel. Please like and subscribe if you learn something!
Analyzing A Current Test
You’ve started building your first flow. It contains a trigger and an action. Now, it’s test time. Will it flow? There’s a saying that 80% of data science is data prep. Similarly, I would argue that 80% of automation work is actually just testing and 20% is building. So, let’s show you how to test and troubleshoot flows in Power Automate.
Testing a Flow
When ready to test, click the Test button in the top right-hand corner of the screen. If you don’t save before going to Test, Power Automate will tell you to Save & Test. Tests only execute after saving.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/test-it.png)
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/save-and-test-1.png)
Triggering a Test
When it comes to testing a flow, how it’s triggered will vary depending upon the type of trigger. Manual triggers are the easiest. You can choose either Manually or Automatically and then click Test or Save & Test.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/manually-test-flow-1024x253.png)
When using an automated trigger, there are more options. If this is the very first time the flow has been run, you will be forced to select Manually. Automatically will be grayed out.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/never-triggered.png)
This means you must manually engage the trigger. In the screenshot below, my flow sends an email when a new message is posted in a Teams channel. The first time I test the flow, I must go to the Teams channel and post a message.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/flow-to-test.png)
After the first test, I can reuse previous triggers. Power Automate will list triggers available for reuse and tell you if the trigger was successful or not. This may be good information or it might not matter. Reusing triggers saves a whole lot of time and movement between applications.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/reuse-a-trigger.png)
Troubleshooting a Flow
As it executes, Power Automate will show the success or failure of each step in the flow and how long the action took to execute. The execution time can be handy. If you know a given action usually takes 10 seconds but is now taking 1 second, odds are something is wrong even though the action completes.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/after-a-run.png)
Error Details Panel
To get more information, click on the action. When you click, the Error Details panel appears on the right-hand side of the screen. Sometimes the information is helpful. Sometimes it is not, but it is the best starting point. The panel also includes a hyperlink to community posts regarding the error generated. I’ve intentionally not highlighted the How to fix section, as I don’t think I’ve ever fixed an error with the information provided there, but the community link is helpful.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/error-details-1.png)
What’s Going In & Coming Out
If Error Details aren’t helpful, take a look at what’s entering and exiting an action. To illustrate, I will run the flow shown above and walk thru each action.
The first action is When new email arrives. In this case, you have to click Show More, Show raw inputs, and Click to download to get more information.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/what-you-see-after-run-2-1.png)
Show raw inputs provide a little bit of information. In the event that your flow was looking for an attachment, this could confirm whether Power Automate was able to find the attachment or not.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/show-raw-inputs3.png)
Show more information shows mostly the same content as Show raw inputs.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/show-more-information.png)
Click to download will open a new browser tab and show you the JSON behind the action. While this might not mean much now, my next example will show how this content can be helpful.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/click-to-download.png)
Here is the JSON from FireFox.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/firefox.png)
Here is the JSON from Chrome. Clearly, FireFox is easier to read. I don’t know if there is a Chrome setting that could be changed to make this consumable.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/chrome.png)
In order to work with email content, which is formatted as HTML, I must convert it to text. I can see the HTML tags coming in from the email, and what comes out is just text without the tags. Thus, this step was a success.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/html-to-text.png)
The next action is called newLine. I’m not going to show a screenshot of it because this action is a Compose action that is just a placeholder for a carriage return. I then use the dynamic content from this action in the next step, which is also a Compose action to split lines. Thru the course of writing this post, I realized I didn’t actually need that step, so we’re going to skip over it and look at filterLength.
filterLength is an array filter that removes blank lines. We can see in the inputs that I have blank lines, and the outputs show that I only have blank lines coming out, and my flow failed at the next step, so something is wrong and I need to investigate.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/no-body.png)
After fixing my flow and rerunning the test, I see blank lines going in and no blank lines going out, which is the desired result.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/view-what-went-in-and-what-went-out-2.png)
And, in the next 3 steps, I use expressions to find specific pieces of data in the email. This is one example of the three. I can see the data is found in the email and exits the action.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/expression-parsing.png)
So, that explains how you can walk thru a flow to see what enters and exits each action. Next, let’s talk about a problem I ran into this week that illustrates how you can troubleshoot dynamic content.
Troubleshooting Dynamic Content
This shows one action in a flow that pulls content from DocuSign. It was working fine until last week. Then, this action started.
Now, under every piece of dynamic content lies a viewable expression. Access it by either hovering over the content or clicking on the content and then hitting Ctrl + C and paste into NotePad.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/dynamic-content-copy.png)
This is the expression pasted from Notepad.
@{triggerOutputs()?['body/DocuSignEnvelopeInformation/EnvelopeStatus/EnvelopeID']}
So, what this means is that our flow is expecting the receive something called EnvelopID from DocuSign. The content in front of EnvelopID is a hierarchy. EnvelopeID sits at the third level of the hierarchy under DocuSignEnvelopeInforamation and EnvelopStatus.
We investigated the JSON associated with the action (using click to download). As you can see below, in the body of the JSON, envelopeId exists. But, it exists on its own level and is not part of a hierarchy. We know from the expression that envelopeId should live below EnvelopeStatus, which is below, DocuSignEnvelopeInformation. It should be a part of a hierarchy, but for some reason, it’s now on its own level.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/inputs-investigate.png)
In theory, this shouldn’t happen, but it did so we fixed the flow by writing an expression instead of using dynamic content. The screenshot below shows the old expression (from dynamic content) and the new expression.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/modification-1.png)
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/fixed.png)
So, this explains how you can connect dynamic content to the JSON Power Automate provides, which helps clarify what enters and exits a flow.
Troubleshooting Looping Actions
If you are looping or using an Apply to each action, the action will give you the option to move forward or backward to see the details of each piece of information processed.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/apply-to-each.png)
Next, let’s talk about how to find past test results.
Analyzing Past Tests
Now, what happens if you navigate away from your test results or need to come back to them later? Can you still get back to all that information? Of course, you can! All tests and details live on the main screen as shown here.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/test-screen-1-1024x756.png)
Clicking on the date and time will take you to the exact same details as noted above.
Remember!
- Start by understanding what’s entering and exiting an action.
- Sometimes, the problem is a bug in the software. This isn’t uncommon. If you can’t find an answer reach out to Microsoft support.
- You will inevitably run into random or seemingly nonsensical errors and limitations. For example, there is a 256-row limit when pulling data from Excel. Or, in SharePoint, if list has more than 12 columns, you have to create a view and reference the view instead of the list. You build up this knowledge over time.
![Angry Chicken GIF by happydog](https://media2.giphy.com/media/lQCV6K36nJfJYNxXbC/giphy.gif)
Google Solves Problems
I couldn’t end this post without noting that Google is your friend. Google the error message. Look it up on Community. Post a question on Community. Modern developers solve problems with Google. And if all else fails, you can try this advice.
![](https://www.bigmountainanalytics.com/wp-content/uploads/2022/05/advice.png)
In conclusion, troubleshooting can be frustrating. It can also be incredibly rewarding when you figure out the source of the problem. I’ll be posting more complex troubleshooting in the future. For now, you are prepared to start troubleshooting flows in Power Automate.
Pingback: Getting Oriented with Power Automate » The Analytics Corner
Pingback: Exploring Power Automate Triggers & Actions » The Analytics Corner
Pingback: Building & Developing in Power Automate » The Analytics Corner
Pingback: SharePoint Site Missing in Power Automate » The Analytics Corner
Pingback: What Can Power Automate Do On Mobile? » The Analytics Corner