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 #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 #29 Exporting or Importing Flows via Web Portal
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.
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.
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.
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.
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.
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.
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)
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.
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.
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”.
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”.
Test this flow by clicking on “Test” in the top right hand corner and selecting “Manually” from the test flow options.
The action will then prompt you to enter URL. However, you will notice entering the URL is 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.
Testing the cloud flow will show that the field has now become optional!
Power Automate Tip #25: Secure Inputs and Outputs
Under “Manually trigger a flow”, click on the three dots icon and select settings.
Under settings, you can secure the inputs or the outputs by toggling the options to On.
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”.
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.
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)
Once you click “ok”, save the variable, and run the flow, you will get an error which says the text does not 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)
The flow will run successfully and return the value “true”.
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.
Under settings, turn on the “Concurrency Control”.
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.
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”.
You can then drag your conditions and other actions inside Scope. You have successfully used the Scope action!
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”.
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.
To import the flow you’ve exported, you can click on the “Import” as shown below.
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.
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.)
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: