Power Automate can seem intimidating at first, but gradually, it becomes easier. Part of learning this platform is knowing how to have the best Power Automate development and debugging practices. And that’s what we’re going to discuss in this tutorial.
With Power Automate development expanding rapidly, it’s important for the administrators in this field to keep an eye on the best practices that we can incorporate into our business processes.
Analytics For Power Automate Development
The first thing that we’re going to talk about is the Analytics feature in Power Automate. If we have a lot of flows and we’re responsible for administering those flows, Power Automate has an automated Analytics page that shows some key things about our flows.
Let’s open this sample automated flow which can be triggered when there’s a tweet that contains the words “Power Automate”. It then sends out an email and processes approval for the tweets.
Click Analytics.
From there, we’ll see a deliberate display of results using Power BI. It shows relevant information such as the total number of runs per day as well as the number of cancelled, failed, and successful runs. We can also change the time period here.
Hence, we can get some relevant insightful analytics from it. If we click Errors, we’d get some useful information, especially for developers in this field. From here, we’ll see why and when there was an error, the type of error status code, and other error details. It also shows a chart of the number of errors by day and the error types.
We can filter the results based on Action, Trigger, and Error Type.
This is indeed a useful tool for us to use in our workflows. It’s also automatically available for every single flow that we make. So, I’d highly recommend using it, especially for administrators in this area.
Copy And Paste Feature For Power Automate Development
Another good development practice to use is the copy and paste feature. For example, let’s click Edit to open up the flow diagram for this sample flow.
This flow contains nested conditions.
Let’s say there are conditions that we want to perform the same action. For example, we want to do a Retweet action within the first If yes pathway. What we can do is to copy the current Retweet action that we have under the second If yes pathway. To do that, click the three dots, then choose Copy to my clipboard (Preview).
After that, click the Add an action button.
Then click My clipboard.
From there, choose the action that we previously copied.
This is quite useful if we’re trying to use the same actions from one section of our flow diagram to another.
However, it’s even more powerful if we have another flow diagram that we want to move. For example, if we want to copy this action to another flow, just click the three dots then choose Copy to my clipboard (Preview).
After that, we can just go to the other flow where we want to add this and do the same procedure. That makes things a lot easier especially when we’re creating flows that do the same things over and over again.
Duplicating Power Automate Flows
If we want to start with a flow and then make variations on it, we can create the base flow diagram and then just keep creating a copy by clicking Save As.
Then change the name of the flow and click Save.
Go to My flows to see the duplicated flow.
And that’s how we can make copies of a flow diagram.
Sending A Copy Of A Flow
Another good feature that we can use in our development practice is sending a copy of a flow. This allows us to send a copy of the flow diagram that we’re working on to others. If we’re collaborating with someone else, we can simply send a copy of the flow diagram to that person. We don’t really need to export it. Just type in their email address and they’ll be able to look at it on their page.
We can also export it as a zip file.
Nevertheless, sending a copy works much better when collaborating with someone.
Proper Naming In Power Automate Development
The next best practice that we’ll discuss is naming and commenting. This is usual in every programming language. It’s best to name our variables and actions in a good and objective way. We should also make sure to add comments so if we go back to the flow diagram at a later date, we’d still know exactly what’s going on within the process.
As an example, let’s edit this flow that we previously duplicated.
The flow diagram contains default names for each section. However, some of those names are too general. For example, we don’t really know what this condition does unless we click and analyze it.
As a good development practice, we need to edit the names of these actions to be more specific about what they actually do. To do that, just click the three dots and choose Rename.
Then change the name into a more objective one.
Let’s also rename this one to be more specific. Change Send an email notification (V3) to Send an email to Henry with the tweet details.
Then change the name of the first condition to Check if the tweet contains the word “issue” or “problem”.
We can do this to the sections that are quite vague. So when we look at the actual flow, we’ll be able to easily discern what’s going on even without checking and looking through each of them. This makes it a lot easier to read and understand.
Adding Comments In A Power Automate Flow
Another good practice that we can do is adding comments. Just click the three dots on the right side of the item, then choose Add a comment.
Then, we can put more information here such as a description of how this option works. If someone else works on this later on, they’ll easily know what’s going on or what needs to be done with that certain part.
Conclusion
All in all, these are some good development practices in Power Automate. Utilizing the analytics feature will allow you to quickly gain insightful information and ideas about your workflows. Knowing how and when to use the copy-paste feature and being able to send flows to people is also useful.
Of course, proper naming and commenting is a great and essential habit as well. This habit will be beneficial when checking your flows later on as you’ll easily know what each thing actually does. In a nutshell, learning these practices will certainly help you when creating and maintaining flows.
All the best,
Henry
***** Related Links *****
Power Automate Environment: Setup And Overview
Flow Diagrams And Flow Detail Page In Power Automate
Scheduled Workflows In Microsoft Power Automate
***** Related Course Modules *****
Microsoft Power Automate Masterclass
Power Apps Masterclass
Power Platform
***** Related Forum Post Links *****
Power Automate & Paginated Reports
Power Platform Books
Export Filtered Results From Published Report
For more Power Automate development support queries to review see here….