Running a cloud flow from a canvas app is an essential skill for candidates preparing for the PL-100 Microsoft Power Platform App Maker exam. With Microsoft Power Apps, you can build highly dynamic apps that enable a range of functionalities such as simplifying business tasks. One such functionality involves using a canvas app to trigger cloud-based flows.
The Cloud flow in Power Automate, Microsoft’s tool for creating automated workflows, allows the integration of various apps and services. When combined with canvas apps, you can create solutions that are even more powerful.
Creating Your Cloud Flow
To start, create your cloud flow in Power Automate. To create one, navigate to the Power Automate site and create a new automated flow. Choose ‘Power Apps button’ as the trigger. You can then define the steps of your flow according to your business requirements. The flow could involve posting a message to Microsoft Teams, sending an email, or updating SharePoint lists.
Integrating Cloud Flow with Canvas App
After you have created your cloud flow, you’ll need to run it from your canvas app. Here are the steps to do it:
- Open the existing canvas app from which you would like to call the flow, or create a new one.
- On the `Insert` tab, click or tap `Button` to add a new button control.
- Select the button, then go to the `Action` tab and click or tap `Power Automate`.
- In the Power Automate pane, select the cloud flow you have created. This action will add the flow to the `OnSelect` event of the button.
Remember, you may need to pass inputs from the canvas app to the cloud flow. To pass parameters, add them to your flow during the creation process, then include the parameters when you trigger the flow in your canvas app.
Triggering the Flow
When a user clicks the button in the canvas app, it will trigger the flow. The Power Automate platform oversees the steps defined in the flow, communicating with various applications and services as necessary. Once the flow is done, results can be passed back to the Power App to be utilised within the canvas app.
Example
Let’s consider a business scenario where an employee submits a leave request through a canvas app, and an email notification is sent to their supervisor.
First, in Power Automate, create a flow with ‘Power Apps button’ as the trigger. For the next step, choose ‘Send an email notification (V3)’. Define the email fields, using dynamic content for fields that will be populated by inputs from the Power App.
In your corresponding canvas app, create a form for leave request submission. Include a button named ‘Submit’. In the `OnSelect` event of the button, add the flow. Make sure you pass the required parameters – employee name, email of the supervisor, start and end dates of leave, etc.
In this example, when an employee submits the form, the button click triggers the flow. This results in the supervisor receiving an email about the leave request automatically.
Conclusion
Using cloud flows from a canvas app makes a powerful combination for automating tasks and facilitating business processes. By understanding how to implement this, you’ll be well prepared for similar scenarios in the PL-100 Microsoft Power Platform App Maker examination.
Despite the potential complexities, with power tools from Power Apps and Power Automate, your apps will automate tasks and improve productivity, while requiring minimal code. Whether you’re working towards the PL-100 exam, or you’re a professional working towards business process automation, mastering the integration of cloud flows in canvas apps prove to be a necessary skill.
Practice Test
True or False: It is possible to run a cloud flow directly from a canvas app.
Answer: True
Explanation: In Microsoft Power Platform, you can indeed trigger a cloud flow directly from your canvas app.
Which of the following is not a step when setting up a cloud flow to be run from a canvas app?
- a) Set up a flow on the Power Automate platform.
- b) Connect the app to the Power Automate platform.
- c) Create a button in your app that will trigger the flow.
- d) Download the flow to your local machine.
Answer: d) Download the flow to your local machine.
Explanation: All steps are valid except for downloading the flow to your local machine. Microsoft Power Platform stores and runs flows in the cloud itself.
True or False: You can pass data from your app to the cloud flow.
Answer: True
Explanation: Indeed, you can pass data from your app to the cloud flow. This allows the flow to perform actions based on the passed data.
A cloud flow that is run from a canvas app returns a __________.
- a) Boolean
- b) Response
- c) Decimal
- d) None of the above
Answer: b) Response
Explanation: A flow that is run from a canvas app will return a response. This response contains data about the flow’s run like success or failure status and any returned data.
Which of the following is not a type of cloud flow?
- a) Automate flow
- b) Button flow
- c) Non-interactive flow
- d) Interactive flow
Answer: c) Non-interactive flow
Explanation: There is no specific type of flow called the “Non-interactive flow”. The different types of cloud flows primarily are Automated, Button, and Scheduled flows.
True or False: Only one cloud flow can be run from a canvas app.
Answer: False
Explanation: A canvas app can trigger more than one cloud flow. There isn’t a limit for the number of flows an app can run.
Which of these actions can a cloud flow perform after being triggered by a canvas app?
- a) Send an email
- b) Create a record in a database
- c) Start a process in another system
- d) All of the above
Answer: d) All of the above
Explanation: Cloud flows can perform a wide range of actions, including the ability to send emails, create records in a database, start processes in other systems, and more.
True or False: Only the creator of the canvas app can trigger the cloud flows from it.
Answer: False
Explanation: Any user with access to the canvas app can trigger the cloud flows from it, not just the creator.
To run a cloud flow from a canvas app, you must have the _____________?
- a) Correct User Permissions
- b) Right color scheme
- c) Right device
- d) Flow button
Answer: a) Correct User Permissions
Explanation: To run a cloud flow from a canvas app, you must have the correct user permissions. This ensures that only authorized users can trigger the flows.
True or False: Microsoft Power Platform allows on-premises data to be used with a cloud flow.
Answer: True
Explanation: The Microsoft Power Platform ‘On-premises data gateway’ allows access and use of on-premises data for cloud flows.
Interview Questions
What is a cloud flow in the context of Microsoft Power Platform?
Cloud flows, formerly known as automated workflows, are a type of workflow that can run without any user interaction in Power Automate, a part of Microsoft Power Platform. They can be triggered by an event and can automate various business tasks and processes.
What is a canvas app in Microsoft Power Platform?
A canvas app in Microsoft Power Platform is a type of app that allows creators to design the app’s user interface by dragging and dropping elements onto a canvas, much like creating a slide in PowerPoint. The canvas app interacts with various data sources and services to provide a customized and interactive experience to its users.
How can a cloud flow be initiated from a canvas app?
A cloud flow can be initiated from a canvas app by using the Power Apps trigger in Power Automate. You can configure this trigger to start a flow when a specific event occurs in your canvas app.
What are the steps to create a cloud flow in Power Automate that can be triggered from a canvas app?
The steps are:
1. In Power Automate, create a new flow.
2. Select the Power Apps trigger.
3. Build the steps of your flow, adding any actions as necessary.
4. Save and name your flow.
How do you connect a cloud flow to a button in a canvas app?
Use the OnSelect property of the button to trigger the cloud flow. In the formula bar for the OnSelect property, type the name of your flow and provide any necessary parameters.
Why would you run a cloud flow from a canvas app?
Running a cloud flow from a canvas app can help automate tasks and processes based on user interaction within the app. It can handle complex logic that might not be easily achieved within the canvas app itself.
What type of data can a cloud flow return to a canvas app?
A cloud flow can return text, numbers, boolean values, and tables of data to a canvas app.
Can a cloud flow initiated from a canvas app interact with multiple data sources?
Yes, a cloud flow initiated from a canvas app can interact with multiple data sources, such as SharePoint, SQL Server, Twitter, and more.
Can you trigger multiple cloud flows using one button in a canvas app?
Yes, you can trigger more than one cloud flow using a single button in a canvas app.
What happens if an error occurs in a cloud flow that is initiated from a canvas app?
If an error occurs in a cloud flow initiated from a canvas app, the flow will stop, and the error details will be returned to the canvas app.