Microsoft Power Automate (previously known as Flow) helps you create automated workflows between your favorite cloud and on-premise apps. It provides services to synchronize files, get notifications, collect data, and more.
Power Automate is an important pillar of Microsoft Power Platform ecosystem that builds robust automation over cloud apps.
These days, most apps are available in the cloud, although some are still available from on-premise environments. Integrating these cloud systems is tricky, and using a no-code, less-code platform to do this is a real benefit. Power Automate solves these integration automation needs, regardless of the datasource’s location. Using connectors, you can connect practically any datasource to automate your business needs.
Power Automate’s Building Blocks
Power Automate has three building blocks. These are triggers, connectors, and actions. Every Flow must have a trigger and one or more connectors and actions.
Triggers, Connectors, and Actions
Building Block | Description |
---|---|
Triggers | Events that initiate a flow instance. For example, running a flow on-demand from a button click, or running a flow when a file is uploaded to SharePoint. |
Connectors | Adaptors that communicate with other products or services. For example, if you want to create a file in OneDrive, you need a OneDrive Connector. If you want to read data from Dynamics 365, you can create a connector to the Dataverse. Connectors require authentication. You must have a subscription to the service you want to connect from Power Automate. |
Actions | Operations that you define so that the Flow will perform them. For example, creating a file in SharePoint, deleting a record from the Dataverse, sending an email, etc. |
Features of Power Automate
Automate quickly and more securely
With Power Automate, anyone can create automated processes using flows. You can automate repetitive, monotonous operations with ease, using low-code, drag-and-drop tools and hundreds of pre-built connectors.
Boost efficiency
With process adviser, you can record and visualize your end-to-end processes while getting guided advice for developing flows and detailed insights that take the guesswork out of deciding what to automate.
Enhance workflows with AI
With AI Builder, you can make your automation even smarter. Use document automation to quickly process forms, handle approvals, identify photos and text, and generate with pre-built models.
Connectors in Power Automate
A connector is a wrapper or proxy that allows an underlying service to communicate with Microsoft Power Automate, Microsoft Power Apps, and Azure Logic Apps. It allows users to link their accounts and use a library of pre-built actions and triggers to create apps and processes.
Types of Flows and Uses
Types of Flows
Type | Description |
---|---|
Automated Cloud Flow | Triggered by designated events. |
Instant Cloud Flow | Triggered manually as needed. |
Scheduled Cloud Flow | You can choose when and how often it runs. |
Desktop Flow | Automated processes on your desktop environment. Leverage Robotic Process Automation (RPA). |
Business Process Flow | Guides users through a multi-step process. |
Configure an Automated Cloud Flow
In this example, you see how to automatically trigger a Power Automate flow when an event occurs in the Dataverse.
Business Scenario
In this example, you see how to send an email to your manager when Lead annual revenue is more than $5,000 for notification purposes.
Solution
This solution requires a Power Automate configuration with an event trigger. The following steps show how to configure the flow.
Step 1: Use the Solution to Create a Flow
Step 2: Configure the Trigger
Step 3: Add a Filter Expression to the Trigger
Now you’ll add a filter condition to the trigger to filter and trigger only when the annual revenue is more than $5,000. To do this, click the Show Advanced options of trigger.
Step 4: Get the Current User Manager
Select the Get Manager action. This will sign in automatically and create a background connector with the Office 365 Users application using the current login user credential.
This Get Manager action requires a user email so that it can get the manager information.
Step 5: Send an Email
Now if you create a lead in the Dataverse and update the annual revenue with more than $5,000, the system will send an email to your manager from your Gmail Account. You can use the Outlook connector to send email as well.
Configure an Instant Cloud Flow
Instant flow creates a mobile button to click on demand and the actions will be performed as per the flow design. Say you want to send an email with an attachment to a person on demand via a button click.
Create an Instant Flow by Navigating to Power Automate
Now save Power Automate. Open your mobile device and install the Power Automate app from Google Play Store or Apple App Store. Once it’s installed, open the app and log in using your credentials. Follow the site at https://us.flow.microsoft.com/en-us/mobile/download/ to download the app and then install it. Select the correct environment. Now if you click the link at the bottom-center of the app, you will see the flow. Clicking the Send Email with File button will prompt you to provide a subject, message, email address, and a file to upload. Once you click Done, the email will be sent to the respective email account.
Configure a Scheduled Cloud Flow
Scheduled cloud flows can be used to run business logic repeatedly in a specific time interval. For example, if you want to run a flow everyday 10AM, you can configure scheduled cloud flow.
Let’s consider a business scenario. You want to send an attendance email every day at 10AM to all the students at your school. Follow these steps to configure Power Automate to do this.
Step 1: Create a Scheduled Flow by Navigating to Power Automate
Click Create. This will open the Flow Designer, where you can add actions.
Step 2: Connect to the Dataverse to Get Students
Inside Apply to Each Action, add a new step. Choose the Gmail connector and select the Send Email action. Specify Email in the To field using the Dynamic content panel. In the Subject field, specify the Reminder – Attendance Filling for the Day static value.
This is how you create a scheduled flow for your business needs.
Configure a Business Process Flow
Business Process Flows (BPF) guide users to follow a predefined process with multiple stages in order to complete a specific task. For example, for a process called Student On-Boarding, your business might follow specific stages so that all users follow the same steps to complete the process. For more about BPF, visit https://docs.microsoft.com/en-us/power-automate/business-process-flows-overview.
- 1.
Capture personal details
- 2.
Capture communication details
- 3.
Capture enrolled courses
- 4.
Record payment details
To configure a Business Process Flow (BPF), use the following steps.
Step 1: Use the Solution to Create a BPF
Once you click the option, it will open a side panel where you can specify a display name and table for which you are going to create the BPF. For example, the “student on-boarding” BPF is connected to the Student table.
Data steps
Workflows
Action steps
Flow steps
You can also add conditional branches inside a BPF for complex business processes. Read more about branching in BPF at https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/enhance-business-process-flows-branching?view=op-9-1.
Step 2: Edit the Stages
Now save and publish the model-driven app. Click the Play button on the top-right corner.
The Student App will open. Click the Students sub-area and click the +New command to open a new form for the student.
Now you will see that the BPF is available on the top of the form. The BPF will display with all stages you designed. All these stages remain inactive until you visit and take action on every required data step.
To start the BPF, you need to first save the student record by providing the mandatory values; then you can work with the BPF.
This way, users can ignore the complexity of tables and fields and simply follow the predefined stages to complete this business process.
You can enable BPF for specific security roles by using the Edit Security Role on the BPF Designer. You can read more about BPF and its security at https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/business-process-flows-overview?view=op-9-1.
Configure a Desktop Flow
Desktop Flows are designed using Power Automate Desktop. Desktop Flows are also called Robotic Process Automation (RPA) flows. You can use them to configure automation for desktop and web application tasks.
For example, if you want to download an Excel sheet from a website, extract data from the Excel sheet, and put it in a file, you can use the Desktop Flow. Or if you want to back up certain folders on a regular basis, you can use the Desktop Flow.
You can use Desktop Flow in lots of real-world scenarios. To create Desktop Flows, download Power Automate Desktop. For more details about Desktop Flow, visit https://docs.microsoft.com/en-us/power-automate/desktop-flows/create-flow.
This will open the Desktop Flow designer, where you can drag-and-drop actions to the main screen. The following example shows how to copy a folder with files from one location to another.
You can create a Desktop Flow for web and desktop automation using actions and running it as needed.
Dynamic Values and Expressions in Flows
Power Automate allows you to use dynamic values and write expressions for more complex data operations. To any field value, you can assign a static field or use the Dynamic panel to choose dynamic data from the previous steps.
Using expressions, you can do string operations, date operations, and so on, in Power Automate. Let’s consider an example here. You want to send renewal due date email to a student using an instant flow.
Create an Instant Flow in Power Automate
Open flow.microsoft.com and log in using your credentials. Choose the correct environment. Choose the +Create option and then choose Instant Cloud Flow. In the Manual Trigger area, add a Text parameter for the email field. In the next step, add a new action to send an email using the Gmail connector.
In the Email To, assign the Email parameter from the Dynamic content panel, which is part of the Manually Trigger a Button step. Specify the email subject as “Reminder – Student Renewal Pending” and, in the Email body, add “Dear Student, your renewal due date is”. After “is,” you’ll want to display the current date plus one year. So, for these types of scenarios, you need expressions.
Click the location where you want to add the expression and then click the Add Dynamic Content link, which will open the Dynamic panel.
When you run the flow, the expression is evaluated in real-time and updated in the email body.
There are hundreds of expressions available. You can refer to all such expressions using the Microsoft knowledge base at https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference.
Using Variables, Loops, and Conditions
You can use variables, loops, and conditions inside Power Automate as needed. Variables are a good way to store data temporarily in a placeholder.
Working with Variables and Conditions
Only use variables when required. For example, say you are sending multiple emails to a person in multiple steps and you do not want to specify the email of the same person in every email send action. You can store the email ID once in a variable and use the variable each time.
You can add new steps to perform your additional actions, such as if Today Day is Monday, send email body “You have to work on consulting”; otherwise, send email body “Work on Training”.
You used the same variable in both steps. If you test this, you will get an email based on the current day of the week.
Working with Loops
You can use loops to read values from a list of items using iteration. For example, you can use loops to read all rows from an Excel sheet, you can use loops to insert data into the Dataverse from an Excel sheet, and so on.
Say you want to send an email to all the students of your schools stored in the Dataverse. For this scenario, you have to use a loop that will run every student record and send the emails.
This is how you use loops in Power Automate.
Working with Approvals in Power Automate
Approvals are important scenarios in every business. Say you want to send an approval to one or more people to approve an amount of student joining fees when the amount is less than $200.
To achieve this business scenario, previously you had to write lots of code. Now you can achieve this with no-code. Use the following steps to do this.
Make sure you have an Office 365 Outlook license for your employees to use approvals.
Step 1: Add an Automated Cloud Flow
Approval Types
Approve/Reject – Everyone must approve: Select this when you want all approvers to have to approve this action.
Approve/Reject – First to respond: Select this when you want your approval to be completed by the first approver to take action.
Custom Response – Wait for all responses: Select this when you want your approval to be completed by all approvers with a custom action.
Custom Response – Wait for one response: Select this when you want your approval to be completed by at least one approver with a custom action.
Step 2: Check the Approval Status
Now the flow will resume and complete. The approval email will be sent.
Business Scenarios, Use Cases, andImplementations
1 | The system must provide a process to streamline the student on-boarding process and capture general information, communication information, and course information. | Configure Business Process Flow using Power Automate. |
2 | As soon as a student is created, the system should send a welcome email to the student and create a task to collect payment from the student after three days. | Use Automated Cloud Flow using Power Automate. |
3 | Automatically send a timesheet fillup email and link the Power Portal to students to fill in the timesheet daily. | Use Scheduled Flow in Power Automate. |
4 | Fetch the latest currency exchange rates from a third-party WEB API currency layer and display them on a Canvas app. | Use Power Apps Trigger Flow. |
5 | Whenever a lead is created in the Dataverse with more than $50,000 annual revenue, send approval for the manager and wait for approval. After approval, update the lead for qualification process. | Approvals in Power Automate |
Summary
Power Automate building blocks
Connectors in Power Automate
Types and uses of flows
Dynamic values and expressions in flows
Using Variables, loops, and conditions
Working with approvals in Power Automate
Business scenarios, use cases, and implementations
Concept of Power Virtual Agent
Building blocks of Power Virtual Agents
Configuring a sample Power Virtual Agent
Deploying a Power Virtual Agent in public websites/portals
Business scenarios, use cases, and implementations