30 Tips & Tricks for Microsoft Power Automate (Part 1)

Power Automate Tips & Tricks - Part 1

We know that navigating Microsoft Power Automate can get quite confusing, hence we have compiled a list of tips to make it easier and more convenient!

By the way, Part 2 is already out! Do check out 30 Tips & Tricks for Microsoft Power Automate (Part 2).

For those of you who prefer to watch the video, you can have a look at the video below. If you prefer to read, just scroll down further for the article.

Power Automate Tip #1: Declare a Data Table Data Type 

Unfortunately, we are unable to create data table data types by searching the “Actions” tab in Microsoft Power Automate. Thus, we will be using the “set variable” action to do so instead.

Firstly, in the “set variable” dialogue box, declare the table name. After that, set your column names using %{^[‘ColumnName’, ‘ColumnName’, ‘ColumnName’]}% .

After running the flow and clicking on “flow variables” in the variable pane, you will be able to view the data table. We have now successfully created a data table data type!

Power Automate Tip #2: Adding Data Rows 

We can add data rows using the set variable action. To do so, add the table name and set the data row as %Table + [“insert value of column names”]. In this case it will be %Table + [‘Earphone’, ‘NA’, ‘20 USD’]% .

 

After running the flow, we have created a row with the Product Name as “Earphones” at a Product Price of “20 USD”.

Power Automate Tip #3: Retrieve specific item from data table

To retrieve specific items from data tables, set a new variable and declare %Table[0][‘Product Price’]%, where the [0] is the row index. The row index of a table always starts with 0. Here, we want the first item, so we indicate the index as 0. “Product Price” is the name of the column where the item is located.

After running the flow, we can check the variable. Clicking on the variable name on the variable pane, we can see that we have retrieved the value that we wanted.

Power Automate Tip #4: Reassign a value of existing table row within for each loop 

To replace the value of a microphone from $10 USD to $5 USD, we will first name a set variable as RowIndex. We will start with 0.

Next, we add a “for each loop” action into the workspace. We will select %Table% from the variable drop down menu (click the {x} button) in the for each dialogue box. We will be setting an if condition for each item in the table.

Insert an “if” action to the workspace. Set the first operand to the current item of the column name. In this case, we are looking for “microphone” in the column “Product Name”.

For cases where the above if condition is fulfilled, we will then manipulate the product price column of that table row to contain the new reassigned value of 5 USD.

We then need to use the “increase variable action” to increase the row index.

Running the flow will show us that we have successfully updated the microphone price!

Power Automate Tip #5: Declare dictionary data type

In Power Automate, it is not called Dictionary, instead it is called Custom Object Data Type.

First, we will need to declare a Custom Object using the Set Variable action. To do this, give your variable a name (in this case we’re calling it NewCustomObject) and type %{{}}% into the “To:” field.

Graphical user interface, text, application Description automatically generated

Next, we will use Set Variable to indicate the property name/key. In this case we will set the key as “Name” and the value as “Jack”.

We have now created a dictionary type with a Name and Value!

 

Power Automate Tip #6: Downloading files from the web 

To download files from the internet, we will be using the action “Download from web”. This is a convenient alternative way to the usual way of downloading using a mouse click of the UI element.

To indicate the URL, go to your web browser with the web page open. Right click the download button/link and select “copy link address” from the dropdown menu of the file you wish to download.

To download the file from Microsoft Power Automate Desktop, paste the URL of the file you want to download into the URL field, setting the “Method” as “GET’, choose “Save to disk” for the save response, and adding the full path to the destination folder.

Run the flow, and when you check your folder, you’ll see that you have now downloaded the file from the internet!

Want to know more about downloading files from web browsers? Check out this video that’s all about downloading files from the web!

 

Power Automate Tip #7: Getting file path part

Assuming we have the following file path:

In order to get the root directory or subfolder, use the “Get file part path” action. Click the {x} button and select FilePath. After running the flow, you can see in the variable pane that this allows you to obtain the FileName, File Extension, as well as the RootPath.

 

Power Automate Tip #8: Clear temp with DOS command 

In order to run DOS command for clearing local temp files through Microsoft Power Automate Desktop, you need to  add  ’%’% to both sides of %TEMP% in your original command.

This is because the format of 2 % signs before and after (e.g. %Example%) represents a variable in Microsoft Power Automate Desktop, and it will recognise it as a variable data type. Without the additional ’%’% there will be an error that says “Variable ‘TEMP’ doesn’t exist”.

The resulting DOS command or application should read:

del /q/f/s %’%’%TEMP%’%’%\*

Running the flow will show that all local temp files have been deleted!

 

Power Automate Tip #9: Export your flows as stacks

Instead of you exporting the flow from the web portal, you can copy the chunk of texts and actions on the flow, and paste them on a notepad.

You can then save them as stacks! You can retrieve them later, or send it to someone else, who can then copy them from the notepad and paste them into Microsoft Power Automate Desktop to use the flow.

If you’d like to learn more about sharing your desktop flows, have a look at this article, which shares 3 ways you can share your desktop flows.

Power Automate Tip #10: View desktop flow logs

To view the desktop flow logs, we will need to navigate to the web portal and look under the “monitor” tab on the left hand-side sidebar.

Under “desktop flow runs”, there will be a list of desktop flows that have been run successfully. Take note that only flows run from the “my flows” page will be recorded.

Clicking on any of the desktop flows in the list will indicate the list of runs. Under “Run History”, you can also click on a run date/time, and it will show you at which stage a failed status was obtained.

More Power Automate Tips & Tricks are coming your way!

We hope these 10 Power Automate Tips & Tricks are useful to you. We have many more tips to share—30 to be exact— and we’re working on bringing them to you really soon.

As of now, Part 2 is already out. Do check out 30 Tips & Tricks for Microsoft Power Automate (Part 2)

Keep a look out for Top 30 Power Automate Tips & Tricks Part 3!