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

 

Power Automate Tips & Tricks

As promised in our previous blog post, this is part 3 of Tips and Tricks to make using Microsoft Power Automate more convenient! In our previous post, we covered tips #11 – #20. Today, we will be covering tips #21 – #30. 

Tip #21 Choosing the correct flow

Tip #22 Add new connection 

Tip #23 Using templates 

Tip #24 Passing inputs to cloud flow

Tip #25 Secure input or output

Tip #26 Using expression actions

Tip #27 Increase speed of “Apply to each” action 

Tip #28 Scope action

Tip #29 Exporting or Importing Flows via Web Portal

Tip #30 Manage gateways

 

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 #21: Choosing the Correct Flow

If you navigate to the “My Flows” section on the Power Automate web portal (https://flow.microsoft.com/) and click on the “New flow” tab, you will realise that there are various kinds of flows available. These include Automated cloud flow, Instant cloud flow, Scheduled cloud flow, Desktop flow, Business process flow. Which type of flow should you choose? We’ll explain.

Different types of flows in Microsoft Power Automate web portal

1. Automated cloud flow

You can use this flow when you have a use case that requires a process to be run automatically, such as when a new email arrives or when a file is created.

Building an automated cloud flow in Microsoft Power Automate

2. Instant cloud flow

You can use this to start an automation with the click of a button – manually trigger a flow through the web portal.

Building an instant cloud flow in Microsoft Power Automate

3. Scheduled cloud flow.

You can use this flow if you have a use case that requires you to run the flow at a specific timing.

Building a scheduled cloud flow in Microsoft Power Automate

 

Power Automate Tip #22: Add new connection

If you navigate to “Data”, under “Connections”, you can add new connections with other applications. Click on the “New connections” tab to see all the different applications you can form connections with.

adding a new connection in Microsoft Power Automate

The list of applications you can make connections with in Microsoft Power Automate

Alternatively, you can create new connections with applications via cloud flows. Navigate to the “My flows” and click on the flow you wish to connect. Then click on the edit tab.

Clicking the edit tab to add new connections in Microsoft Power Automate

When you are adding an action, select the particular application. Once it has been connected successfully, it will reflect inside the Connections tab (on the side bar: Data > Connections)

Microsoft Power Automate interface showing a successful connection

 

Power Automate Tip #23: Using Templates

If you navigate to the templates section, you will realise that instead of creating a flow from scratch, there are different types of templates you can use depending on your process.

Where to find the Templates section in Microsoft Power Automate

List of Microsoft Power Automate templates available for use

For example, using the “Notify and Email when a new file is uploaded to OneDrive” template, you will have to sign in to your OneDrive and click “create”. Once you click “continue” you will then be brought to a cloud flow with the OneDrive and notifications applications.

Example of setting up a Microsoft Power Automate template

 

Power Automate Tip #24: Passing Inputs into Cloud Flow

Navigate to “My Flows” on the sidebar. After selecting your desired Cloud Flow, click on “edit”.

How to start passing inputs into Microsoft Power Automate cloud flow

You can create an input variable under “Manually trigger a flow”, by clicking on “+ Add an input”. There are numerous types of inputs such as text, number, email etc, but as an example, we will be using the text type “Please enter URL”.

Choosing types of user input in Microsoft Power Automate

Test this flow by clicking on “Test” in the top right hand corner and selecting “Manually” from the test flow options.

Testing Microsoft Power Automate flow

Selecting

The action will then prompt you to enter URL. However, you will notice entering the URL is mandatory.

The Microsoft Power Automate  flow prompting the user to enter a URL (and it's mandatory)

You can make the field optional by clicking on the three dots icon beside it and selecting “Make the field optional” from the drop-down menu.

Making the field optional in Microsoft Power Automate

Testing the cloud flow will show that the field has now become optional!

The result of testing the Microsoft Power Automate cloud flow after the changes, showing that the field is now optional

 

Power Automate Tip #25: Secure Inputs and Outputs

Under “Manually trigger a flow”, click on the three dots icon and select settings.

Where to find the secure inputs and outputs settings in Microsoft Power Automate

Under settings, you can secure the inputs or the outputs by toggling the options to On.

The settings to enable secure inputs and secure outputs in Microsoft Power Automate

If the inputs are enabled, the URL variable will only be applicable within the “Manually trigger a flow” action. You will not be able to access it under condition or in the steps after.

 

Power Automate Tip #26: Using Expression Actions

To illustrate this, we will use the example of creating a flow to check if the input variable is empty. Select “Add an action” and under” Choose an operation” search for “initialise variable”.

Adding an action to start using expressions in Microsoft Power Automate

Initializing a variable to proceed with using expressions in Microsoft Power Automate

In the “Initialise variable” dialogue box, declare the name of the variable and type as Boolean. Click the field for Value, then click on “Expression” tab.

Choosing expression to use in Microsoft Power Automate

For the expression, you need to indicate if(expression: boolean, valueIfTrue: any, valueIfFalse” any). In this case, select “dynamic content” and click on “URL”. The expression will look like if(empty(triggerBody( )[ ‘text’] ), true, false)

Choosing the dynamic content to be used in the expression in Microsoft Power Automate

Once you click “ok”, save the variable, and run the flow, you will get an error which says the text does not exist.

Error after running the flow, showing that 'text' doesn't exist

This is because of the field being optional. To prevent this error, you’ll need to add a “?” before the [‘text’] in the expression for any field that you’ve indicated as optional. The expression should read if(empty(triggerBody( )?[ ‘text’] ), true, false) Adding a ? before ['text] to fix the previous error issue when working with any optional field

The flow will run successfully and return the value “true”.

Successfully running the Microsoft Power Automate flow after the fix in the previous step

The value returned after successfully running the Microsoft Power Automate flow

 

Power Automate Tip #27: Increase the speed of “Apply to each” action.

Under the “Apply to each” dialogue box, click on the three dots icon and navigate to “settings” on the drop-down menu.

Accessing the menu for

Accessing the settings for

Under settings, turn on the “Concurrency Control”.

Turning on concurrency control for

You can then run more than one record concurrently. However, do take note that if you have any variables involved in “Apply to each”, you should do your testing to ensure the data tallies.

Increasing the

 

Power Automate Tip #28: Scope action

If you have multiple actions doing the same task, you can use the scope action to group them together and act as one container.

Click the “+” sign where you want to add your action, the click “add an action”. Search for scope action under “Choose an operation”.

Searching for the scope action in Microsoft Power Automate

You can then drag your conditions and other actions inside Scope. You have successfully used the Scope action!

The results after dragging an action (in this case

You can also rename the “Scope” to reflect the task being done by clicking on the three dots icon and selecting “Rename”. In this case, it’s being renamed to “Check if empty”.

The results after renaming the scope action to reflect what we're working on

 

Power Automate Tip #29: Exporting or Importing Flows via Web Portal

Navigate to “My flows” and select “Export” from the “More commands” (three dots icon) dropdown menu. Export it as a package (.zip) as you’ll need .zip files for importing this flow into another account.

How to access the option to export a Microsoft Power Automate flow.

To import the flow you’ve exported, you can click on the “Import” as shown below.

How to import a flow into a particular Microsoft Power Automate account

You now know how to successfully export or import flows via the web portal!

 

Power Automate Tip #30: Manage Gateways

Navigate to “Monitor” under “Machines” and click on “Gateways” to see the gateways that you are using.

Viewing the gateways you're using in your Microsoft Power Automate account

You can see how many flows are run in a day by clicking on the desired gateway.

(In this case we haven’t run anything, so there’s nothing to see.)

Viewing the flows run in a day in Microsoft Power Automate through the gateway

 

30 Power Automate tips & tricks – done and dusted!

There you have it. With this article, we’ve completed our series 30 Tips & Tricks for Microsoft Power Automate. We hope you found these tips useful!

If you missed the previous 2 parts, do check them out so you don’t miss out on useful Power Automate tips from seasoned developers that can help make your Power Automate journey easier, more productive, and more meaningful.

Check out the previous parts here:

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

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