admin

How to share desktop flows created on Microsoft Power Automate Desktop

How to share your desktop flows in Microsoft Power Automate Desktop

How to share desktop flows created on Microsoft Power Automate Desktop

With the announcement by Microsoft that they are making their Robotic Process Automation (RPA) software – Power Automate Desktop – free for all Windows 10 users, many have started using this versatile low-code/no-code RPA software to automate the mundane and menial tasks at work, freeing themselves up to focus on more interesting or important stuff (or perhaps to enjoy a cup of coffee 😊).

In fact, some have created bots that eliminate drudgery and tedium not only for themselves, but for their entire department! After all, sharing is caring!

This begs the important question – how does one share the desktop flows that he/she has created in Microsoft Power Automate Desktop? 

Today, we will cover 3 ways of sharing your desktop flows. The first 2 methods will require a paid subscription, namely the per user with attended RPA plan. While you can’t technically share desktop flows without a paid subscription, our third method is absolutely FREE.

Let’s check out the 3 methods! 

We’ve made a video that shows you all 3 methods. You can check it out below. Or if you prefer text instructions, scroll past the video, and you’ll see the step-by-step instructions.

Method 1: Using the sharing function in the Power Automate portal

You can share a desktop flow with other users in your organization, giving those users specific permissions to access your flows. In this scenario, we assume the users have access to the same Power Automate environment.

Select My flows from the navigation bar on the left, then select Desktop flows. Then, select the desktop flow that you want to share, and click on the share button.

Accessing the flow to share in Microsoft Power Automate Desktop

Under the Add people field, enter the name of the person in your organization you would like to share the desktop flow with. Select Give access, and choose the permission level that you want to assign to this person.

There are 2 different permission levels you can assign when sharing desktop flows:

  1. User: Editing, deleting or sharing the desktop flow is not possible with this access. The user can only use the desktop flow in a cloud flow.
  2. Co-Owner: This access level grants the user full permissions, including editing, sharing and deleting the desktop flow.

Click the Share button once you are done.

Entering who you want to share your desktop flow with and what access they get

If you wish to review details of a desktop flow, including the persons whom you have shared the flow with, click on More commands, then selecting the Details option.

Reviewing details of a flow, including whom you have shared the flow with

The section Shared with displays the list of users whom the desktop flow has been shared with. To make changes, click on Manage access.

How to make changes to the people you share the desktop flow with

Under Manage access, you have the ability to add people, modify the current permissions granted, or to remove their access to the desktop flow.

Managing access to your shared desktop flow

Now the user who has been granted access should be able to see the shared desktop flow under My flows >> Desktop flows.

How the user who share your desktop flow with will see the flow

Note that it is possible for the user to create a copy of that desktop flow by clicking on More commands, then selecting the Save as option.

Making a copy of the shared desktop flow

Next, rename the desktop flow (if you wish to), and click on the Save button. This will save a copy to your Desktop flows page.

Renaming the desktop flow

And if you login to Power Automate Desktop, you can find the saved desktop flow in the Console where you can make further edits to the flow.

Method 2: Exporting a solution

Alternatively, it is also possible for you to export a solution as a zip file. Then, another user can import this zip file into their own Power Automate environment.

But first, you need to create a solution. A solution is essentially a mechanism for managing the application lifecycle.  When you host your desktop flows in a solution, they become portable, i.e. you can migrate them from one environment to another easily.

Do note that in order to create solutions, you need Dataverse (which comes with a paid plan) and an environment with version 9.1.0.267 or later.

To create a solution, click on Solutions on the navigation bar on the left. Next click on New solution, and provide all the required information including Display Name, Name, Publisher and Version. Click on the Create button when you are done.

Next, select the solution that you have just created by clicking on it. Click on Add existing, and then select Desktop flow.

Adding the desktop flow you want to share to the solution

Select the desktop flow that you want to add into the solution, and click on the Add button. Note that it is also possible to create a desktop flow directly in a solution, in which case they are known as solution-aware flows. Also, you can add multiple flows in a single solution, including non-desktop flows.

Adding the desktop flow you want to share to the solution

Now, select Export. The Before you export pane will appear on the right. Click on the Run button under Check for issues. This will run the solution checker to detect for performance or stability issues, so make sure that no issues are reported. Then, click on the Run button under Publish all changes. You will need to publish all components that needs to be exported later on. Once these 2 steps are completed successfully, click on the Next button.

Checking for issues before exporting your solution

The Export this solution pane appears on the right. Update the Version number if required, and select the Unmanaged option under Export as. Click the Export button when you are done. 

Note: a solution can be either managed or unmanaged. As a simple rule of thumb, developers work in development environments using unmanaged solutions, then import them to other downstream environments—such as test—as managed solutions.

Exporting your solution

This export can take several minutes to complete. Once finished, the solution will be exported as a zip file which you can find in the default download folder specified by your web browser.

Indications of a successful export

After you’ve sent or shared the zip file with your friend of colleague, they can import the solution to use it. To import a solution, select Import. The Import a solution pane will appear on the right. Select the zip file which you have exported in the previous step, the click the Next button.

Importing a solution

Next, click on the Import button to begin the import. Note that this import can take several minutes to complete. Also, you are not able to import a solution that already exists in that environment.

Importing a solution part 2

When the import is completed successfully, the imported solution will be displayed under Solutions.

Indications of a successful import

Now, if you navigate to My flows >> Desktop flows, you will be able to find the desktop flow there.

Method 3: Sharing desktop flows by copying and pasting the actions

This third method that I’m going to share with you does not require any paid subscription plans at all — it is a really simple and neat solution. Let’s get started.

What you see here is this flow I have created, called “RPA challenge”. You can see that there are actually a number of different actions, and if you look at the UI elements pane on the right, there are actually some UI elements created as well. Likewise, in the variables pane there are also some variables created.

Microsoft Power Automate Desktop workspace with the RPA Challenge flow

What I’m going to do here to start sharing is this: I’m going to go to my workspace, select all of the actions by using the hotkey Ctrl+A and Ctrl+C to copy them.

Pasting the actions copied from Microsoft Power Automate Desktop to Notepad

Next, I will open a text editor, like Notepad, and I will paste the actions which I’ve copied into my Notepad. You can send these actions that have been copied to Notepad to the friends or colleagues you want to share the desktop flow with.

Creating a new flow in Microsoft Power Automate Desktop

When they receive your Notepad file, they can go to their Microsoft Power Automate Desktop, create a new flow, then go to their main workspace and paste all the actions you have copied into Notepad. To paste, go to Edit >> Paste, or use the hotkey Ctrl+V.

Going to the main workspace to paste the actions copied from Notepad

Voila! You’ll notice something really special: not only does it copy all the actions, but if you go to the variables pane, you’ll see that it has all the variables and UI elements, including the screenshots of the UI elements.

Microsoft Power Automate Desktop workspace with actions pasted from Notepad, showing the variables pane

That’s it! We have successfully copied one desktop flow to another. If I were to run this flow, it should work just like my original desktop flow.

Conclusion

Congratulations! In this article, you have learnt how to share a desktop flow between users in the same environment by using the Share feature, as well as through exporting and importing a solution for users across different environments. We also shared a method of sharing flows without any paid subscription.

Feel free to share this article if you think it might benefit someone else.

Happy  automating and start sharing!

Learning Resources

https://docs.microsoft.com/en-us/power-automate/desktop-flows/manage#share-desktop-flows

https://docs.microsoft.com/en-us/power-automate/export-flow-solution

https://docs.microsoft.com/en-us/power-automate/import-flow-solution

How to share your desktop flows in Microsoft Power Automate Desktop Read More »

Latest update on Microsoft Power Automate Desktop - Jun 2021

Latest updates on Microsoft Power Automate Desktop – Jun 2021

Latest update on Microsoft Power Automate Desktop - Jun 2021

The latest Jun 2021 update of Microsoft Power Automate Desktop has been released! Today, we are going to highlight some of these new features. 

To check the software version that you have, go to the Console and click on Help, then About

How to check your Microsoft Power Automate Desktop software version

The version installed will be displayed as shown below. The latest available version (as of this writing) is 2.10.36.21161.

If you have an older version and would like to upgrade to the latest version to enjoy the new features, go to this link to download the software installer.

In this article, we will go through 4 changes that comes with this latest version of Microsoft Power Automate Desktop.

Run desktop flows from another desktop flow

Previously, users can create subflows within a desktop flow (by default, each desktop flow will always have a Main flow), and trigger the required subflow using the Run subflow action. All the flow variables defined in the desktop flow is also accessible within the subflows.

Now, with the introduction of the new action Run desktop flow, users are able to run other desktop flows (or child desktop flows) from the current desktop flow (or parent desktop flow). Unlike the Run subflow action, you will need to make use of input and output variables in order to pass data from one desktop flow to another. Do note that while the child desktop flow is being triggered, the parent desktop flow will be paused.

You may be wondering why we even want to split the automation process into several desktop flows in the first place. Well, it is a best practice to design your flows in a modular manner. That means breaking down your complex process and segregating it into smaller, independent flows, each of which typically performs only one specific function or task. Doing this achieves multiple benefits including making your flow more readable and manageable, as well as promoting flow reusability.

Auto-switching to image-based recorder for RDP and Citrix environments

In the April 2021 update, we highlighted that the desktop recorder now supports image-based recording and optical character recognition (OCR). Guess what? The desktop recorder has been enhanced such that it will now intelligently detect a Remote Desktop Protocol (RDP) or Citrix environment, and automatically switch to image recording mode. Nice!

Note: For the uninitiated, automating processes within RDP or Citrix environments using UI elements is not possible. Instead, you will need to rely on methods such as image recognition, text extraction with OCR or hotkeys.

Enhancements in Windows-related actions

The actions Set Windows environment variable and Delete Windows environment variable have been enhanced such that it will automatically retrieve the Windows environment variables and display them in a drop-down for ease of selection.

Set windows environment variable automatically retrieve the Windows environment variables and display them in a dropdown

Similarly, the actions Start service, Stop service, Pause service and Resume service have been enhanced such that it will automatically retrieve the Windows services and display them in a drop-down for ease of selection.

Start service with automatically retrieved Windows services in a dropdown

Finally, the actions If process, Wait for process and Terminate process have been enhanced such that it will automatically retrieve the Windows processes and display them in a drop down for ease of selection.

If process with Windows processes displayed in a dropdown

Deprecation of action Create MODI OCR engine

The ability to initialize and utilize the MODI OCR engine will be removed starting from the July release. Moving forward, the default OCR engine type will be Tesseract. Accordingly, it will also no longer be necessary for you to use the Create Tesseract OCR engine action (i.e. this action will also be deprecated) as you would directly initialize the Tesseract engine in the OCR related actions (i.e. Extract text with OCR), If text on screen (OCR), Wait for text on screen (OCR) and Move mouse to text on screen (OCR)) where the engine instance is used.

Extract text with OCR

Important: If your existing desktop flows use the MODI OCR engine, do replace it with the Tesseract OCR engine and perform the necessary testing (as the change in OCR engine might affect the behaviour of the actions) before deploying the desktop flow to a production environment. For more information, please refer to this blog post.

Conclusion

By the way, the enhancements are not stopping here. Based on the 2021 Release Wave 1 Plan for the Microsoft Power Platform, there are a number of exciting new capabilities in the roadmap, including:

  • Connect to desktop flows without the on-premises data gateway
  • Support UI automation with Citrix
  • Web automation to access cross-domain iFrames
  • Power Automate Desktop inclusion with Windows

Now that you have learnt some of the new features and enhancements made in Jun 2021, why not download this latest version of Microsoft Power Automate Desktop and start automating?

 

Learning Resources

https://flow.microsoft.com/en-us/blog/power-automate-desktop-june-2021-update/

 

Previous Updates

April 2021

May 2021

Latest updates on Microsoft Power Automate Desktop – Jun 2021 Read More »

Configure Flow Control in Microsoft Power Automate Desktop

How to Configure Flow Control in Microsoft Power Automate Desktop

Configure Flow Control in Microsoft Power Automate Desktop

When designing flows, controlling the order in which actions and subflows are run is important for complex flows with multiple functions and error handling.

This can be done by using flow control actions in the application. It ensures a more efficient flow.

Learning objectives:

  • Learn how the flow works.
  • Learn how to use the flow control group of actions to direct and manipulate the flow.
Watch the video below, scroll past it for text instructions.

Comment

Comment facilitates flow design, allowing users to make notes and explain the logic of a set of actions. This action is recommended if you are designing a complicated flow so that the next developer or user will be able to understand before going through the sets of flow.

Inserting a comment in Microsoft Power Automate Desktop

Label

We can control the flow by creating a label, a label acts as the destination of a go to statement

Go To

This transfers the flow execution to another point indicated by a label so you have to select which label that you have created.

For example, create multiple labels (1, 2 and 3).

Configure flow designer

Display a message for each label 1, label 2 and label 3.

Deploy the Go to action at the start. For this example, we would like it to go straight to label 3.

However, if Label2 is selected, it will be directed straight to Label 2. After that, as the flow continues,  the display message box for label 3 will pop out.

This is how you can make use of the Label and Go to action.

Run subflow

This action allows you to execute an existing flow. When the subflow completes, the flow continues with the next action

  1. Select Run subflow

2.  Select Subflow_1 (or the name of the Subflow you have created). Next, if you were to run the flow, it will execute subflow_1 and after that it will continue the next action.

How can we stop a subflow? To do so, use the Exit subflow action or the Stop flow action.

Differences between these 2 actions:

Exit Subflow

  • To stop the subflow and go back to the point where it was run
  • Exit subflow action is not required at the end of a subflow

Stop flow

  • To stop running the entire flow
  • There is also an option to stop the flow with an error message

Example:

Following will be an example of how to use the Label, Go to and Run subflow Action. 

Create a flow where the robot asks the user if they would like to store a list of fruits into a text file. They will have an option to press the button, “Yes’ or “No”.

If the user selects “No” it will end the flow using the Label action. If the user selects “Yes”, the flow will continue by creating a list of fruits (Strawberry, Mango, Banana and Apple) and writing it to a text file using the Write text to file action. This file can be found in the desktop folder.

To improve this flow, use the Run subflow action. Create a new subflow (in this example, we named the subflow as WriteTextFile

Configure flow designer_example 8

Next, copy the flow and paste it in the subflow you have just created. Delete the flow in the Main workspace. Deploy the Run subflow action in your main workspace and select the subflow you have created. This will help you categorize different sets of actions into a categorized subflow which will allow your flows to look neater and more organized.

For better understanding, Run this flow and you can see that it behaves exactly the same as before.

On block error

This is an error handling action It will help to control your flow, not to stop the process. You can choose to set a new variable or run another subflow or throw an error.

  1. Deploy the On block error action.
  2. Name it “TryWriteTextFile”

3.  Save action

4.  Create a New variable and name it as %Filename% with a value of “-”

5.  Deploy write text to file action. File path of %Filename%. On Text to write, type “Hello”. Disable the Append new line function.

6.  Save action 

If we run the flow in this example, it will display an error message saying that “invalid directory specified”.

The downside of this is that we are not able to get the exact error message to continue the flow. So in this case, we cannot make use of this On block error action as there are certain actions that have the On block error action in it. For example, in the write text to file action, there is an On Error option. Here you can indicate your own new sets of rules by clicking on  Advanced

 Set a new variable under Failed to write text to file.

Click on Continue flow run where the flow will continue running and go to the next action.

Likewise for Invalid directory for file, set a new variable and Continue flow run.

When you run this flow, it will behave the same as before.

It depends on the process, whether to use the On block error or make use of each action’s exception handling (On error). However, this is limited and not all actions provide the On error option.

How to Configure Flow Control in Microsoft Power Automate Desktop Read More »

Latest updates on Microsoft Power Automate Desktop – April 2021

The latest April 2021 update of Microsoft Power Automate Desktop has been released! Today, we are going to highlight some of these new features. 

To check the software version that you have, go to the console and click on Help, then About

The version installed will be displayed as shown below. The latest available version (as of this writing) is 2.7.49.21099.

If you have an older version and would like to upgrade to the latest version to enjoy the new features, go to this link to download the software installer.

Refresh button is available in console

A refresh button has now been added to the Power Automate Desktop console. When clicked, the flows inside My flows and Shared with me will be updated with the latest changes made from the web portal.

For example, if a colleague has shared a desktop flow with you from the web portal, you will longer need to logout of and login back to Power Automate Desktop in order to see the recently shared flow.

Save as new flow functionality is available in the flow designer

Previously, in the flow designer, you can only save the changes made to a flow by overwriting the original flow.

Now, a Save as option has been added, allowing you to save the changes under a new flow instead. 

This is a useful feature to have, especially since desktop flows currently do not support versioning. Hence, you might want to have different versions of the same flow saved. In this way, you have the ability to revert to an earlier version of your flow when required.

The action copying mechanism has been improved

Do you know you can copy and paste actions from one flow designer to another?

In fact, it is possible to copy the actions into a text editor (e.g. Notepad), and then paste these text into a flow designer.

Previously, when performing this action, all the stored UI elements and Images will be lost. And you will need to painstakingly re-create all the UI elements and Images. But not anymore, with the latest April 2021 updates. Wonderful!

Desktop recorder now supports image-based recording and optical character recognition

The desktop recorder now provides users with the option to record using image recognition, instead of using UI elements. To do so, make sure you turn the toggle on for Image recording.

When you start recording, the recorder will automatically capture actions such as Move mouse to image.

In fact, when you hover over the image icon, you can actually see the image that the action will be performed on.

Note that when Image recording is not being used, the recorder will use UI elements by default. Following is the recorded action for the same activity being performed.

While image recognition can be very useful in certain situations, as a general rule of thumb, it is recommended to use UI elements instead of images when interacting with applications. This will ensure the robustness and reliability of your desktop flows.

In addition, to extract text from images during the recording, perform a right click and select Extract text from image.

Use the cursor to define the text area when OCR extraction is required

Next, use the cursor to define the anchor area that is not expected to change. This will help to locate the image from the previous step.

An example of the recorded action can be seen below:

Improved interaction with Java-based apps and applets

Finally, the existing mechanism to support Java applications has been rebuilt and enhanced, providing greater visibility over UI elements that are needed to automate and interact with these applications. What this means is that you are now able to automate Java-based applications more easily and reliably.

Conclusion

By the way, the enhancements are not stopping here. Based on the 2021 Release Wave 1 Plan for the Microsoft Power Platform, there are a number of exciting new capabilities in the roadmap, including:

  • Connect to desktop flows without the on-premises data gateway
  • Support UI automation with Citrix
  • Web automation to access cross-domain iFrames
  • Power Automate Desktop inclusion with Windows

Now that you have learnt some of the new features and enhancements made in April 2021, why not download this latest version of Microsoft Power Automate Desktop and starting automating?

 

Tags

Robotic Process Automation, Microsoft Power Automate Desktop, Monthly Updates, April 2021

Learning Resources

https://flow.microsoft.com/en-us/blog/power-automate-desktop-april-2021-update/

Latest updates on Microsoft Power Automate Desktop – April 2021 Read More »

Microsoft Power Automate Desktop May 2021 update

Latest updates on Microsoft Power Automate Desktop – May 2021

Microsoft Power Automate Desktop May 2021 update

The latest May 2021 update of Microsoft Power Automate Desktop has been released! Today, we are going to highlight some of these new features. 

To check the software version that you have, go to the Console and click on Help, then

The version installed will be displayed as shown below. The latest available version (as of this writing) is 2.9.29.21133.

If you have an older version and would like to upgrade to the latest version to enjoy the new features, go to this link to download the software installer.

Software updates

Users can now be automatically notified whenever a new version of Power Automate Desktop is available in Microsoft’s download center. To enable the update notification, click on Settings and navigate to the General tab.

Then, select the checkbox Show update notifications. That’s it. When a new version is available for download, you will receive a notification that looks like this:

Alternatively, you can also click on the Check for updates button to see if there’s a new release.

Additional options under the Help menu

Besides Documentation and About, the following online resources have been added to the Help menu:

  • Support – See below.
  • Learn – Microsoft Learn is a free online academy where you can learn new skills at your own pace through the step-by-step guidance provided. At last count, there are 34 modules and learning paths related to Power Automate Desktop, so you should be able to find something useful no matter your level of expertise.
  • Community – This is the Power Automate Desktop forum board where you can post discussion and questions. There is a vibrant and growing online community of users, including practitioners and experts, whom you can seek guidance and advice. This is also a good starting point to look for solutions to problems or issues that you are facing, especially if you do not have access to (paid) support.
  • Blog – Get all the latest product updates here.
  • Troubleshoot (preview) – See below.

Raise new support requests

By clicking on Help, then Support, you will be redirected to the Power Platform portal. Thereafter, scroll down to the Ask for help section and click on Contact support.

You will be redirected to Power Platform admin center where you can create a new support request.

Do note that in order for you to perform the above steps, you need to have a security role that is enabled for creating support requests, as well as a valid support plan – Subscription Support, Professional Direct Support or Unified Support. To learn more, please go here.

Troubleshoot (preview)

The troubleshoot tool allows you to change the account which your machine’s cloud connectivity service (i.e. UIFlowService) is running as. By default, UIFlowService uses the virtual account NT SERVICE\UIFlowService. In the event your environment restricts the usage of this account, you can change the account using this tool. Do note that this account needs to be given the rights to “Logon as a service”.

In addition, the tool allows you to easily export all of your machine’s configuration and service logs to a single .zip file. This is useful as support may request for these machine logs when you raise a support request.

Enhancement to Launch new Browser actions

The Launch new Internet Explorer/Firefox/Chrome/Microsoft Edge actions have been enhanced to include a Timeout parameter which determines the maximum amount of time to wait for the browser to launch before the action fails. The default value is 60 seconds.

For this to work properly, do remember to also specify rules to execute when the action fails:

Language support

Finally, the UI of Power Automate Desktop has now been localized in 41 languages, while the Documentation is translated in 23 languages, reaching parity with Power Automate service supported languages.

Conclusion

By the way, the enhancements are not stopping here. Based on the 2021 Release Wave 1 Plan for the Microsoft Power Platform, there are a number of exciting new capabilities in the roadmap, including:

  • Connect to desktop flows without the on-premises data gateway
  • Support UI automation with Citrix
  • Web automation to access cross-domain iFrames
  • Power Automate Desktop inclusion with Windows

Now that you have learnt some of the new features and enhancements made in May 2021, why not download this latest version of Microsoft Power Automate Desktop and starting automating?

Tags

Robotic Process Automation, Microsoft Power Automate Desktop, Monthly Updates, May 2021

Learning Resources

https://flow.microsoft.com/en-us/blog/power-automate-desktop-may-2021-update/

Previous Updates

April 2021

Latest updates on Microsoft Power Automate Desktop – May 2021 Read More »

Solved: Get first free column/row from Excel worksheet is not returning the correct values

One of the most common actions you will use in Microsoft Power Automate Desktop is the Read from Excel worksheet action. To read all the data from a particular worksheet in Excel, we will usually make use of the Get first free column/row from Excel worksheet action. However, at times, we have encountered cases where the first free row and first free column variables obtained are not correct. 

In this post, we will go through an example case that returns incorrect first free row and first free column values, and provide you with a solution to overcome the problem.

The following examples will be based on the Excel spreadsheet shown in the image down below:

In the Excel spreadsheet example, it contains 7 columns and a total of 10 rows of data.  So in this case we assume that we know the number of columns which are fixed but we are not quite sure how many rows of data it has.

Watch the video below, or scroll past the video for step-by-step text instructions.

Reading the data from Excel

  1. The first action we will deploy on our flow designer would be the Launch Excel action. From here, we will open the Excel file which contains the data we want to read.

2.  Usually we will use the action Get first free column/row from Excel worksheet to find out the number of rows in the data. This will store the first free column inside the variable called %FirstFreeColumn% and store the first free row inside the variable called %FirstFreeRow%.

  •  If we look back at the Excel file data, we expect that the first free column is actually column 8 and the first free row is actually row 12

3.  Next, deploy the Read from Excel worksheet action. Here we will specify to read the values from a range of cells. The Start column and row will be 1. The End column will be the variable %FirstFreeColumn-1%  and the End row will be the variable %FirstFreeRow-1%.

Note: Remember to put “-1” at the end of FirstFreeRow/Column as we want to read the last filled row/column only.

Note: An additional thing to know is that because in this case we have a header row, we need to select this option First line of range contains the column name.

The Problem: incorrect first free column and first free row values

After we run the flow, we see in the variables pane that the first free column value is 9 instead of 8 and the first free row returns a value of 1001 instead of 12.

You may be wondering why this happens. If we were to look at the Excel data in *csv format (shown in image down below), the reason why it is reading the wrong values is because the Excel file is not sanitized. You can see all the additional rows of data we have below row 11. That’s the reason why Power Automate Desktop is actually returning these values for the first free column and the first free row.  

Solving the issue

To overcome this issue, especially when you know that you have a dirty Excel file, an option you can do is to deploy the Get first free row on column from Excel worksheet action instead of Get first free row/column from Excel worksheet. (at step 2)

In this example we will use the first column, so type “1”  in column.

Next, when you look at the Read from Excel worksheet action (step 3), choose the %FirstFreeRowOnColumn% variable. Do remember to add “-1” at the end like this %FirstFreeRowOnColumn-1% because we want to read the last filled data. In this case, we assume that we know how many columns there are so we will just put it as column 7.

When you run this new flow, you can see that now it reads the correct number of rows which is 12.

Conclusion

You may run into certain issues when developing your flows when dealing with an Excel file on Microsoft Power Automate Desktop, as the way you view the data and the way the application views and reads the data may be different. In this situation where the Get first free column/row from Excel worksheet action is not giving you the correct values, replace that with the Get first free row on column action instead.

Solved: Get first free column/row from Excel worksheet is not returning the correct values Read More »

How to use conditionals in Microsoft Power Automate Desktop

Microsoft Power Automate Desktop provides you with conditional actions to develop flows when you want to automate your tasks. 

What are conditionals? Conditionals allow you to modify a flow’s behavior based on certain conditions. Conditions may include the comparison of two values, or more specific information, such as the existence of a file or the contents of a web page.

There are 2 groups of conditional actions:

  • The If group of actions
  • The Switch group of actions

 

The If group of actions

The If group of actions allow users to evaluate whether a certain condition is true. The structure of the If conditions are:

  • Initial conditions (which includes all the If conditions)
  • Alternative condition (which may be added using the ‘Else if’ action) This condition will only be considered if all the previous conditions were false.
  • An Unconditional alternative may also be added, using the ‘Else’ action. This will run only if all the conditions before it has failed
  • All conditional blocks in the ‘If’ group end with the ‘End’ action

In this example, we will deploy some of the available If actions to understand what functions they have.

  1. Use a Get special folder action to retrieve the path to the desktop.
  2.  To check if a folder named Records exists in the desktop, use the If Folder Exists action, and configure its input (refer to image below):              

3.  Add an If File Exists action inside the If block to check if the Expenses Excel file exists inside the Records folder. Configure its input (refer to image below):

4.  If the file exists, move it to the desktop folder using the Move Files action. Otherwise, the user should be notified.

5.  Add an Else action inside the second if block, and a Display Message action to inform the user that the file has been moved.

6.  Finally, in case the folder itself does not exist, add an Else action inside the first If block, and a second Display Message action to inform the user that the Records folder does not exist.

Note : Remember to save your file.

When you run your flow, you should see this display message box stating that the Records folder does not exist when the condition falls under the Else statement.

Note : Do try this out with different scenarios to get a better understanding of the If action.

The Switch group of actions

The Switch group of actions is used when a flow’s next steps depend on the value of a specific variable.

Let’s go through an example to see the Switch group of conditions in action.

  1. Get the Current date time using GetCurrentDateTime action

2.  To get the current day of the week, use Switch action and enter the following inputs (refer to image down below)

The value indicated in the Switch, will be used for conditional checking

3.  To check if the day is Saturday, use the Case action. Use the Display message action to display the message box title “it’s Saturday” along with the message “Make the most of it!” when the CurrentDateTime action detects that it is a Saturday.

4.  Repeat these steps (using Case action and Display message action) for when it is a Sunday.  Use the Display message action to display the message box title “it’s Sunday” along with the message “Make the most of it!” 

5.  For other days, add display message “Let’s get cracking” with title “it’s weekday’ by using the Default case action

6.  Once you are done, save the file and run the flow. If it is currently a weekday, this will be how the display message box will look like.

Conclusion

To conclude let us go through the differences between the different conditional actions. An If Else statement can test expression based on range or values or conditions. Whereas a Switch statement is based only on a single integer, a numeric value or a string object. Using a Switch statement is usually more efficient than a set of nested If.

How to use conditionals in Microsoft Power Automate Desktop Read More »

Actions for text manipulation in Microsoft Power Automate Desktop

Microsoft Power Automate Desktop – Text Manipulation

Actions for text manipulation in Microsoft Power Automate Desktop

Microsoft Power Automate Desktop allows you to manipulate text and date time. Maintaining consistent text, numerical and date values are very important. This is especially true in some fields such as finance and logistics. 

In this article, you will be learning how to use a text group of actions to manipulate your text and date time values. 

All of the text group actions can be found here. When you want to perform actions with text type variables, you would need to specify the text either by entering it as input, or as a text variable. The actions store the output in a new variable.

We’ve made a video showing you all the text actions in Microsoft Power Automate Desktop, which you can see below. If you prefer to read about them, you can scroll past the video, and you’ll be able to read all about Microsoft Power Automate Desktop text actions.

Append line to text:

Firstly, we have the Append line to text action. This is to add a line of text to a single text value or list of text values. This action stores the resulting text as a new text variable. It is useful when you want to combine information into a single text or variable. For example, when you have system generated email, you might need to append(add) multiple information in the email body.

Quick tip A quick tip for beginners is that, whenever you are unsure of what an action does, and you would like more information, you can actually hover over the (i)  icon and read more. As u can see, it will be displayed in the black box to let you know more about the different parameters.

Get subtext action

Next, we have the Get subtext action. This is a very powerful action as we can extract a specific portion of a text or a list of text values. The variables produced here are stored as a text variable

  • Start index: Set the start index property to retrieve text starting at a specific   character position or at the start of the text. 
  • Length: Set the length property to end at another position or at the end of the text
  • Number of chars: Number of characters to retrieve. 
  • Note: that the character position uses a zero-based index, which means you start counting with the first character having the index 0.

Pad text

Pad text increases the length of text to a certain value. For this, you can add whitespace, word or phrase before or after the text or list of text values. This action will add characters that are fixed by you to the text so that the final text reaches your desired length. The action stores the padded text as a new text variable. 

  • Pad: Option to add to left or right side of text.
  • Text for padding: Character or text that will be added to lengthen the original text. 
  • Total length: The total character length of the final padded text. This means that the text for padding will be repeatedly added until the final text is of the specified length.

Trim text

The Trim text action allows you to remove whitespace from a text string. This includes whitespaces like space, tab, or new line. You can do so to the beginning, end or both of a text string. This is very useful, as your data might have an accidental space at the back at times and it could potentially affect the accuracy of your data. It is recommended as a best practice to use the trim text action to clean the data before performing text comparison. 

  • What to trim: Specify where white space characters will be removed from. 

Change text case

Use the Change text case action to change the case of the text value. You can do so to a single text value or list of text values. You may change the casing of a text to uppercase, lowercase, title case or sentence case. Upper and lower are pretty straightforward. For the title case, it is for when you want every word to begin with capital letters, and for sentence case, only the first word will start with capital letters.

Quick tip: When you are more familiar with the actions and know what actions you want to deploy, an alternative way to deploy these actions will be to use the properties. So for example, you want to change the text case or trim the text. You can just click on ‘Select variable’, look for the variable you want the action to be deployed on, click on the small arrow here and you can choose from the list of properties here which the application has for text values. So you can choose from the .trim property or change text case etc.

Create random text

The Create random text action helps generate random passwords according to your preferred text length, whether or not to include uppercase and lowercase letters, digits, and symbols. 

Split text

Use Split text action when you want to separate a single text value into a text list of items. Enter a value or a text variable as the input. Ideally, the text should include recognizable delimiters that separate the items. Select one of the standard delimiters or enter a custom delimiter.

  • Text to split: Enter a value or a text variable as the input here (The text should include recognizable delimiters that separate the items, such as comma in the example down below. The action will split the text separated by a comma and store them into a list)
  • Delimiter type: You can choose between standard or custom. 

‘Is regular expression’ is used when you want to specify whether the delimiter will be a regular expression. However, this is a more advanced topic, so I will not be going through this here. 

Replace text

Use the Replace text action to identify a string in a text and replace it with another string or character. You can customize the search to be case-insensitive, or to contain regular expressions. As mentioned earlier, regular expression is a more advanced topic that we will not cover here

Datetime actions

Now, onto datetime actions. You can find these actions under datetime at the actions panel.

Get current date and time

This action can be set to only get the current date or both date and time. You may also set the time zone property to the system default (which is what you have configured on your computer) or you can set a specific time zone which you will have options to choose from.

There are many properties you can choose from as well, like year, month or day. To view these properties, click on select variables (the {x} symbol), type CurrentDateTime, and click the small arrow beside CurrentDateTime, and you will see a drop-down list of all the properties for CurrentDateTime and you may choose the one you prefer.

Add to datetime

Use the add to datetime action to add a specific amount of the selected time unit to a datetime variable. It can be in seconds, minutes, hours, days, months or years. You may also just add a negative sign in front to subtract from the datetime. 

Subtract dates

The subtract dates action gives you the difference between 2 datetimes. You may choose to get the difference in days, seconds, minutes or hours. And that difference will be stored as the new variable. 

  • From date: The datetime to subtract the first datetime from. This will be the base datetime, so generally put the later date/time in this attribute. 
  • Subtract date: The datetime to subtract

What’s the difference between the add to datetime action and the subtract dates action? Overall, to find out  the difference between 2 datetimes, use subtract date. If you want to get the datetime after adding or subtracting a specified amount of the selected time unit to a datetime variable, use add to datetime.

Convert datetime to text

Converts a datetime value to text using a specified custom format. It has properties that contain several options regarding the format of the datetime input.

For example, convert a datetime variable that was created with the ‘Get current date and time’ action to text. Using this action, you can choose between a standard or custom format. When you choose a standard format, you have all of these options shown down below. 

When you choose custom format, just ensure that your combination is in a compatible datetime format. 

What do I mean by formats? The image below shows the various date formatting if you want a standard datetime format.

When you choose a custom format, you can specify the exact format you want using  different combinations of the representations shown below.

A way you can use this action is to add the new FormattedDateTime to the name of your new folders or files. This is especially useful when you generate many versions of the same files regularly, as is often the case with RPA, and you don’t want to overwrite the files.

Convert number to text

The Convert number to text action is used when you want a number or a numeric variable to convert to a text variable. You will have the option to set the number of decimal places to include as well. ‘Use thousands separator’ is for you to specify whether or not to use punctuation as a thousands 1000 separator, for example expressing “1000” as “1,000”.

Conclusion

Ensuring uniform data and text formats are important in many business processes. We hope that from this article, you were able to learn all about automating text processes and data manipulation using the text and datetime actions on Microsoft Power Automate Desktop.

~~~

Microsoft Power Automate Desktop – Text Manipulation Read More »

Everything you need to know about variables – Microsoft Power Automate Desktop tutorial

If you are new to Microsoft Power Automate Desktop and you do not have a programming background, a huge obstacle you will face is to fully understand various terms that you will encounter frequently. A very common term used in Microsoft Power Automate Desktop is “variables”.  To ensure a smooth process while developing your flow, it is vital to have a full understanding of how to handle variables.

While automating your tasks on Microsoft Power Automate Desktop, you will see yourself using the same information over and over again for different actions. For example, sometimes, you might want to store customers’ data, like the name and email that you have retrieved, and process them later in your flow.  

What are variables?

In short, variables allow you to store data/information from one action to use in another action when you need it later. Variables are like tags that you attach to data with a descriptive name of your choice, which you can then easily refer to when needed. 

Variables are like storage containers that store and save information while a flow is running. This information can be of any type, such as numbers, text, dates, files, folders and text. 

To use variables in actions, the name of your variables has to be enclosed in percentage(%) characters. For instance, you have a variable called ClientName, the proper way to express it as a variable is: %ClientName%. If the % sign is excluded, the application will read the value as a hardcoded content and not as a variable.

Create and Use variables

Microsoft Power Automate Desktop will create your variables automatically that the deployed actions require. This is to avoid the creation of any nonessential variables. However, you are able to create the variables manually and disable the automatically produced variables. 

So how does the application automatically produce variables, and how do you identify them? Microsoft Power Automate Desktop will automatically produce variables that hold the results of the action whenever you add a new action to the main workspace. Over here in blue text is the variable that is automatically produced.

To change the name of the variable to something easier for you to identify, click on the variable and change as desired. 

If you know that you will not be using the variable produced by a certain action, you can choose to disable the automatic production of that variable. This will allow your variables pane to look more organized and less convoluted. 

To disable the production of variables you don’t need, simply click on the toggle switch icon to disable that particular variable. When the text changes to grey, it means that you have successfully disabled the variable.

Once you have created your variables, you may need to use the information stored in the variable as input in other deployed actions in your flow. To do this, click on the {x} icon next to the field you would like to input the variable and pick the desired variable.

Note:  You have the option to use existing variables as outputs in other actions, but Power Automate Desktop will overwrite the previous content. This may cause confusion, so we don’t recommend it. 

Variables pane

The variables pane is located on the right side of the flow designer. It displays all the variables that have been created, along with additional information and controls to manage all of your variables.

There are two different forms of variables located in the variables pane to allow you to manage all the variables in your flow: input/output variables and flow variables.

Input/Output variables – With this, you can move data from other platforms to the Microsoft Power Automate Desktop or vice versa. Automation options are endless with this inbuilt feature. This is just a brief definition of input/output variables. We will go more in depth in future articles. 

Flow variables – List of all the variables that are available in the particular flow. This includes all the variables in the main and subflows. It does not include variables from other flows in your console. 

To display additional information on the variables, you can just double-click on the variable name. 

You can use the variable pane to see all the available properties of your variables. Properties contain parts of the information stored in the variable or extra attributes describing the variables.

While you are debugging your flows after facing errors, you can check each variable’s current value through the variables pane. Seeing how the flow changes the variables’ contents allows you to locate the source of error and correct it accordingly. 

To view more information or rename variables in the variables pane, just simply right click on the name of the variable or the vertical Ellipsis. You will be given the options to View, rename or Find Usage.

View – View Variable value

Rename – To change the name of a variable

Find Usage – Additional information will be displayed regarding that particular variable. You will be able to know which subflow it belongs to, which line(s) it belongs to and more information about the action it belongs to. When you double click on one of the results, it will direct you to the specific line that the variable is used in. 

If you have developed a very complicated flow with many variables, you can filter the variables based on Text value, Datetime, List of general values, General value, Numeric value. This allows you to be more efficient.

Data types

Microsoft Power Automate Desktop will categorise your variables to a specific variable data type based on the content.

There are over 40 data types on this application, but the more common data types are numbers, time and boolean. 

Quick tip: If you are new to Microsoft Power Automate Desktop, it is advisable to use different variables instead of converting variables type as you have to constantly keep track of which content you overwrite. This is to avoid any mistakes and confusion along the way. 

Some of the built-in data types have properties that are related to the value stored in the variables.

With these properties, you will be able to obtain information about the variables without the need for additional actions or complicated conversions.

This information can describe the content of the variable or be a part of a multi-component content. For example, you can get the day part of a date or the size of a list with files.

To access the value of a property, you can use the following notation: %VariableName.PropertyName%.

For example, if the flow contains a list of files called Files, you can get the number of the stored files using the expression: %Files.Count%.

If you don’t know what properties are available for a particular variable and what the correct notation is, you can click on {x}, find your variable, and click the arrow beside it, as shown in the picture below.

Advanced data types

Advanced data types need specific treatment and handling. In this article, we will only go through two advanced data types: Lists and data tables.

Lists – A list is a collection of items that must be of the same data type. Use a list when you want to store and collate many information of the same data type. For example, you can create a list of text values, numbers, files, etc.

To create a new list, go to variables, click on the arrow beside it, and look for the action Create new list. A simpler way to do this is to search Create new list action on the search bar of the action pane. Then, add the action Create new list to the main workspace. 

Another way that is slightly different is to create lists through actions that generate lists as output, for instance Get files in folder action that returns a files list.

If you want to find a specific item in the list, you can use the following notation: %VariableName[ItemNumber]%.

For example, you can rename the first folder of the previously displayed folder list using this notation. Keep in mind that the ItemNumber should be 0 for the first item of the list. 

Data Tables – Use data tables if you want to store data in a table form. It is similar to excel—a data table has both rows and columns.

Each item stored in it can be retrieved through its unique row and column number. Consider data tables as lists that have other lists as items.

There is no direct way to create a data table, but you can create data tables through the Read from Excel and the Execute SQL statement actions.

If you want to find a specific data table item, you can use this notation: %VariableName[RowNumber][ColumnNumber]%.

For example, you can save Apple’s price inside a new variable (which we named %ApplesPrice%) using the following action. 

Note:  Keep in mind that the RowNumber and the ColumnNumber should be 0 for the first item.

Variable Manipulation

Earlier in the video, we learned that it is important to enclose your variables with % so that the app can identify them as variables. Some of you might wonder, what if I want to use the percentage sign as a simple character in a hardcoded text? All you have to do is to use double percentage signs like this: %%.

Hardcoded text – You might want to use hardcoded text values. To do so, use quotes to enclose your text values. Microsoft Power Automate Desktop will identify any value between quote characters as a text value and not a variable name. 

Variable Names – You might want to use multiple variables in an expression. To do that, simply add their names to the expression without further notation.

Basic Arithmetic – If you want to use mathematical operations, you can use plus (+), subtract (-), multiply (*)  and divide (/). You can use the addition operator to join strings. However, this does not include arithmetic operations with numerical values and variables. Adding numbers and text strings in the same expression will convert the numbers into text and join them with the other text strings.

Comparisons – Besides arithmetic operators, you can also make comparisons using the following relational operators:

Logical Operators – In many flows, you might need to check if a value meets some particular standards. To check conditions and implement more complex logic in a single expression, you can use the logical operators. The supported operators are AND and OR.

Parentheses  While creating complex expressions, you might want to prioritize some specific parts of them. To change an operators’ priority, use parentheses. Power Automate Desktop handles parentheses the same way as algebra and programming languages.

Conclusion

While developing your flows on Microsoft Power Automate Desktop, you will always be in contact with variables. Hence, it is important for you to understand what variables are and how to handle them when developing your flows. Just remember that variables allows you to store and reuse data and to use the variables pane to control or make changes to your variables.

Tags: Microsoft Power Automate Desktop, Robotic Process Automation, Console, Flow designer 

Learning resources: https://docs.microsoft.com/en-us/learn/modules/pad-variables/

Software Version: Microsoft Power Automate Desktop 2.7.49.21099

Everything you need to know about variables – Microsoft Power Automate Desktop tutorial Read More »

Microsoft Power Automate desktop tutorial for beginners – Interface tour

We’ve all heard about the power of automation, and how it is possible to automate mundane tasks we face in our everyday lives to boost our productivity and efficiency. Microsoft Power Automate Desktop is now free for all Windows 10 users, and if you can take some time out to learn how to automate business processes using this app, this could potentially be a huge deal for you.

Now that you have downloaded and installed Microsoft Power Automate desktop, let us take you on an interface tour to guide and help you get started with the platform.

The Microsoft Power Automate Desktop platform contains two main components which allows you to create flows: The Console and the Flow Designer. 

Console Overview

The console is the first window you will see once you launch and sign in to Microsoft Power Automate Desktop. The main feature of the console is to allow you to create new flows or manage your existing flows.

To create a new flow, click on the “+ New Flow” button at the top left of the screen. You will be prompted to name your flow.

Decide on a name for your new flow and click on “Create”.

This will direct you to the Flow Designer<hyperlink to Flow designer>  which we will be covering at a later part of this article. 

The console also allows you to select and manage a specific existing flow. To do that, right-click on the flow and you can choose any of the options provided. You can Start, Stop, Rename, Edit or delete the flow. 

Start – To run your flow

Stop – To stop your flow from running

Edit – This will direct you to the Flow Designer

Rename – If you would like to change the name of your flow

Delete – Delete your flow

Another alternative to manage your flows would be to use the icons next to the name of the flow. Likewise, you will be able to run, stop and edit your flows. If you click on “More Actions”, it is essentially the same as when you right click on the flow.

Tip: A faster way to start editing your flow would be to double click on the selected flow.

So, what happens when you run your flow from the console? When you click on “Start”, you should receive a notification at the bottom right as shown. In my case, I also have a display message box because the flow I ran involved a “display message” action. In your case, depending on the actions in your flow, you may or may not have any.

There are 2 ways to stop running the flow from the console: the stop icon and the “Stop” button on the notification box at the bottom right corner.

Flow Designer Overview

Now that you have an understanding of what the console is, let’s find out what the Flow Designer is and how it works.

Flow designer will be launched whenever you create a new flow or edit an existing flow. 

You may be wondering what a flow is. In the Power Automate universe, a flow is simply a series of actions that are run sequentially. By defining and then executing these actions, you are able to automate mundane and menial tasks and/or business processes which you used to perform manually.

The Flow Designer is the main workspace where development takes place. By using the workspace, you can develop flows that run in sequence or alter them using conditionals, loops, and flow control actions.

Flow Designer summary:

Action Pane

To utilize or search for actions, go to the actions pane located at the left hand side of the Flow Designer.

The actions are categorized into groups based on their functionality. You can find the actions you need by clicking the arrow next to each category, or you can search for a specific action on the search bar at the top of  the action pane.

There are 2 ways to deploy an action. 

You can double click on the action or drag and drop action to the main workspace.

For Microsoft Power Automate Desktop, the more common actions used include Excel and web automation. For example, you can send an email to a contact in a selected row in an Excel spreadsheet. The sequence of actions of your flow is very important to ensure your development runs smoothly without any errors. If you are faced with a situation where you need to reorder the actions, simply click and hold on the action and drag it accordingly.

There are many actions in Microsoft Power Automate Desktop that is really useful. For example, there are actions to work with texts and conditionals like if and else.

Main VS Subflows

At the top of the main workspace, you will see “Subflows” and “Main”. You may be wondering, what is the difference between the Main flow and subflows? And why is there a need to create subflows? This is to simplify complex flows that require many actions—maybe hundreds of actions. With subflows, it will be easier and less confusing to test out certain flows. 

To create a subflow, Click on “Subflows”, followed by the “(+)” icon.

You will be prompted to name your subflow, after you are done, click “Save”.

Variables Tab

Over at the right hand side of the flow designer, you will see the “{x}” sign. This is an indication for the variable pane. In short, a variable is a container to store data. This data is needed later on for the flow. 

UI elements Tab

The UI elements tab allows you to define UI elements. When you define UI elements, you can combine them with actions. This is used for websites and apps.

Note: UI stands for User Interface. For example, a button you can click on on your website.

Images Tab

This tab stores all the images that are used in the deployed actions, allowing you to access and manage them effortlessly.

Errors

While developing your flow, you may be faced with errors that will disrupt the entire automating process. An error pane will pop up at the bottom when there are any inconsistencies with the flow. Use the error pane to identify and rectify/debug those errors in your flow. 

Desktop/Web Recorder

Next, you will come across two features located at the top of the called Desktop and Web Recorder. Recorders are useful, because instead of building one action at a time, you can show Microsoft Power Automate Desktop how you would normally do the tasks that you wish to automate, and the app will translate it into a series of actions in the flow. 

If the tasks are desktop based, use the desktop recorder. If your tasks are web-based, you will need the web recorder. For example, when you use Microsoft Excel app, you will use the desktop recorder. However, if your data is situated in Google Sheets, then you’ll be using the web recorder. So to put it simply, as long as the task is done using a web browser, it should be recorded via the Web Recorder.

This seems like a huge game changer and it might feel like there is no point putting in so much effort learning about flows and different actions. However, do note that the recorder is not perfect, and there are situations which will require you to correct and make changes to the actions in the flow. 

Saving your Flow

Most importantly, it is good to develop a habit of saving your flows whenever the flow is complete or if you would like to take a break from automating the task. There are 2 ways you can do that:

  • Click on the save icon
  • Click on file and save accordingly

Conclusion

Hopefully this post has gone some way in expanding your knowledge and understanding of Microsoft Power Automate Desktop and its interface. What we’ve covered today was just the tip of the iceberg; there’s a lot more to automating your business processes. The main purpose of this article is for you to familiarize yourself with Microsoft Power Automate Desktop’s interface and gear yourself up for more in-depth lessons ahead!

Tags

Microsoft Power Automate Desktop, Robotic Process Automation, Console, Flow designer 

Learning resources

https://docs.microsoft.com/en-us/learn/modules/pad-first-steps/3-flow-designer-overview 

Software Version

Microsoft Power Automate Desktop 2.7.49.21099

Microsoft Power Automate desktop tutorial for beginners – Interface tour Read More »