In my last blog post, I talked about the most essential best practices you should have while working with Power Automate: Flow naming convention. Today I will continue to talk about naming convention because I think this is so important and critical to implement since day one, and people tend to forget. Also, Power Automate has a broader audience than common programming languages like C# or previous technologies or platforms for task automation and integration, such as Windows Workflow Foundation, that generally, you needed a developer to implement or developer those tasks. But now with Power Automate, we have citizen developers that, unlike developers who are used to having good practices in terms of naming conventions, these users are not familiar with these concepts, so it is normal to see implementations that do not follow the best practices we as developers are used to.
#2 Actions Naming Convention
So, why is important to implement a good naming convention in our actions?
Almost for the same reasons we describe in the previous Best practices, Tips, and Tricks:
- It improves readability.
- By setting a proper name in your actions, you can easily identify what action is intended for and what is doing, without the need to enter inside of each action to try to figure it out. So, you not only provide readability but you also save future time (not spending time looking to the details and configurations inside your actions) and frustrations. You may think that this is not important, you have created the flow, you know the logic inside and what shapes represent or are used for, but, once again, trust me after 3 months or a week you will completely forget it!
- It also transfers knowledge between your team or organization.
- Sometimes Flows are shared by a team, or you are a consultant that is creating flows to your client. They also need to be aware of them, they also need to understand them. You may leave the project or the company in the future, and they will need to continue the work or make future changes. Having a proper naming convention and providing a good descriptive name in the actions is also a way for you to auto-documenting your processes.
Basic rules about Action names:
- Power Automate allows you to set a flow name between a minimum of 1 and a maximum of 80 characters!
- You can now use all types of characters.
Basic rules about Trigger names:
- Unfortunately, not all triggers allow you to modify the name, this is a big limitation in my opinion and this behavior should be modified in the future but for now, we need to deal with it.
Once again, I bet if you work on a software house and create a C# project like this:
public class Class
void function1(ref string parm1)
* Implement the logic
you will be fired immediately, so why do the same on Power Automate?
In the picture below I present to you a sample I have on my personal Power Automate environment:
If I need to do a critical analysis or a good practice assessment to my flow I probably get to the conclusion that:
- All the shapes have the default name and based on this picture no one can understand what the flow is doing without going inside each shape to investigate.
- Unfortunately, as I told you previously most of the triggers (first shape) don’t allow you to modify the name, When a HTTP request is received is one of them.
- The branch If true and If false is also one of those cases that don´t allow you to rename the branch “title”, once again, in my opinion, and this behavior should be modified in the future.
By setting descriptive names, like the picture below, you will see that it would be quite easier to identify what action is doing. Of course, in some cases, you need to go inside to get more details about it.
Once again, you can always go into your existing flows and fix all the bad best practices implementations and change the names of your actions even the ones that have dependencies directly without any impact. You just need to be aware of one important trick:
- Never rename action without fixing all the connectors broken inside your flow. If for example, you rename an action that is being used inside an upcoming action with a broken connector as you see in the picture below. The flow designer will not complain and allow you to modify the action, in this sample, if we change the name of “Parse JSON” to “Parse JSON A”. Once you fix the connection on the “Add row to a dataset” action that was been used on what was the previously broken connector it will still have a reference to the previous name: “Parse JSON”.
- If you first fi the broken connection and then rename the action, everything will work fine.
Stay tuned for the next developer approach Power Automate Best practices, Tips, and Tricks.