web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / best practices to be f...
Power Automate
Unanswered

best practices to be followed and re usable components in PAD

(0) ShareShare
ReportReport
Posted on by 5

Good Day all,

can any one please list down the best practices to be followed in  PAD and how to build re usable components in PAD and re use them in other flows?

thanks in advance

I have the same question (0)
  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @sudhakar_Y !

     

    For the best practices part from your question:

     

    Try these best practices:-

    1. Have you tried implementing logging in your flow?

    - If not, try creating a text file or .html file (save as from text file).

    - Use html tags like 'p' (paragraph tag) etc.

    - Also add date and time to see when your flow has executed an action. Example like given below:

    NathanAlvares24_0-1719470945055.png

     

    There are many ways to do logging. There are as follows:

    1. Store logs into a csv file

    - Refer to this video: https://youtu.be/QjrxLPg_TdI?t=3510 to get any idea about it.

     

    2. Store logs into text/html file

    - You can also store in text/html file. Here is an example of how it shows in html:

    NathanAlvares24_2-1719470985285.png

     

    In this I used html, so you need to use html tags like <p>, <h1> (heading tags). I also keep the time recorded when it finished that action.

     

    Like this:

    NathanAlvares24_3-1719470985283.png

     

    These are the actions I use for logging into html files. Make sure to use .html extension to save it as html doc.

     

    3. Store logs into excel file

    This is another I currently use. Take a look of how it shows:

    NathanAlvares24_4-1719470985716.png

     

    I keep detailed logs like this in excel. It shows if a particular file name is a success or not. It even shows how long a flow has taken to execute calculated by total time taken (end time - start time). And errors will be stored in one column. So like if no errors are found, its a success, else failure.

     

    2. Have you tried implementing error handling in your flow? 

    - If not, try using the 'On-block error' action for a block of actions. This will immediately get the error within that block of actions. Use a variable to store that error.

    - You can also use 'Get last error' action which creates a variable to store the last error you got in your flow and then add this to your log file.

    - Use the 'Retry' policy for a particular action where the error occurs.

    - Use 'Continue flow run' in the actions you think are giving an error. Repeat action, Go to next action or Go to label (will be usable if you created a label in your flow). Example like given below:

    NathanAlvares24_1-1719470944197.png

     

    - When logging errors, use a 'style' attribute in your tags with hex code or color red indicating an error has occurred.

     

    There are many more. I have attached a zip file containing the best practices in more detail and for many more use cases.

     

    Also here is one really awesome YouTube link by the infamous, Anders Jensen: Power Automate Desktop: Best Practices for Advanced Users 

  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @sudhakar_Y !

     

    For the part of re-usable components in PAD. Some of them are:

    1. Identify Common Tasks or Actions:

    Start by identifying tasks or actions within your automation processes that are repeated across different workflows. These could be tasks like reading data from a file, updating records in a database, sending emails, or performing calculations.

     

    2. Input and Output Parameters:

    Define input parameters that allow customization of the component’s behavior based on specific requirements. Input parameters can include variables, file paths, credentials, or any other dynamic data needed for the component to execute its task.

    Link: Manage variables and the variables pane 

     

    3. Error Handling and Logging:

    Implement error handling within each reusable component to manage exceptions gracefully. Use try-catch blocks to catch errors and handle them appropriately, such as logging error details or retrying failed operations based on predefined criteria.

    Link: Handle errors in desktop flows 

     

    4. Creating Subflows:

    Group related actions into subflows that perform specific tasks. Subflows can be reused within the same workflow or in other workflows.

    Link for reference: USING SUBFLOWS IN POWER AUTOMATE DESKTOP 

     

    I hope this helps.

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @sudhakar_Y 

     

    I am looking best practices for Power Automate Desktop in various ways:

     

    General Best practices:

     The best practices applicable to UIPath and Automation Anywhere can also be applied here. Additionally, you can refer to the best practices guide by @VJR , which @NathanAlvares24 has attached in his response.

     

    Own Logging mechanism:

    Additionally, you can implement a logging mechanism as a subflow to be utilized across all your processes. For example, you could develop your own logging system using a text file, SharePoint list, Dataverse table, or even an Excel format, depending on what you find most convenient.

     

    Business/Technical Exception email

    Consider establishing business and technical error exception email workflows for your RPA projects, which can be integrated into all your projects.

     

    Other reusable components:

    For example, if you have multiple automation projects related to Salesforce, you can create a separate flow or subflow for the Salesforce login and reuse it wherever it's needed.

     

    Custom Actions:

    You can enhance your Power Automate Desktop actions by utilizing Visual Studio with a custom action module. This option allows you to achieve greater functionality beyond the standard offerings in PAD.

     

    Governance and security:

    Incorporating best practices, one should consider an environment strategy, DLP policies, Tenant Isolation, and PAD governance policies—approximately 30 policies in total. Additionally, focusing on the security aspects of developers and administrators is also crucial.

     

    Error Handling and Re-try mechanism:

    It's also important to consider error handling in Power Automate Desktop at both the action and block levels, which helps in creating more efficient robots. Additionally, a retry mechanism is available for many actions.

     

    Please let me know in case if you require any additional details on any specific topics.


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard