Power Automate helps to automate many business use cases. A lot of times Power automate behaves as a business layer as well. These blogs discuss the best practices when building Power Automate.
Here are the top 10 best practices
- Naming Convention (Obviously)
- Select Columns only need it
- Use Row Count
- Add Note for step/action explanation
- Use Comments to Collaborate
- Flow Checker
- Expand Query to get related records
- Filter using FetchXml (DataVerse) or OData
- Connection Reference (DataVerse)
- Aware of Limitation
Note: Click the image to view larger
1. Naming Convention
Use a proper naming convention for each step or action. Like when this flow will be triggered, Initialize a variable
2. Select Columns only need it
Always best practice selecting the columns only we need. It helps to retrieve quicker and saves memory.
3. Use Row Count
Use row counts when you are retrieving records with/without the filter. This always helps even when you have any data issues. In some conditions, you know you are expecting to retrieve only one record or few. In the below example, retrieving a user’s lists based on their primary email should be only one.
4. Add Note for Step/Action Explanation
Describe the steps by adding notes. In most cases, conditions or when you have expression is most needed it.
5. Use Comments to Collaborate
We can add comments or mentions to your colleagues to collaborate when developing flow. Colleagues will be notified when you mention them like below
6. Flow Checker
It checked the flow and list the errors and warnings.
7. Expand query to get related records
In some cases, we need to retrieve other related records for that table. Instead of querying a second time, we can use related records to get more information.
8. Filter using either FetchXml or OData
Always make sure to use the filter either using Fetchxml or OData which the system supports. For example, fetch XML is easy to view and used in many places when you work on Dataverse. OData query should be used when using SharePoint.
9. Connection Reference
A connection reference is a solution component that contains information about a connector. Both canvas app and operations within a Power Automate flow bind to a connection reference. You can import your connection reference into a target environment with no further configuration needed after the import completes.
Make sure the connection reference is added to the solution as well.
10. Aware of limitations
We have some limitations when using Power Automate. Please refer MS Article for the updated list.
For example, Flow is active for only 30 days if not completed otherwise it will cancel after that. If you are looking for flow that needs to be active either you can use Logic Apps or some other workaround.
List of limitations
- Flow definition limits
- My flows limit
- Duration limits
- Expiration limits
- Concurrency, looping, and de batching limits
- Throughput limits
- Action request limits
- Runtime endpoint request limits
- Content throughput limits
- Gateway limits
- Custom connector limits