Exercise - Create and test a solution-aware cloud flow
In this exercise, you apply your learned knowledge to create and test a solution-aware cloud flow.
Scenario
You manage Microsoft Power Platform automation solutions in your organization. You're asked to create a process that sends a Microsoft Teams notification in the IT department’s channel that's dedicated to system monitoring with the name of the environment from which it originated.
Preparation
In a Dataverse environment where you have permission to create Microsoft Power Platform solutions and Power Automate cloud flows, proceed with these steps:
- Select Solutions in the left navigation pane.
- Select + New solution.
- Provide a display name, such as Solution Aware Cloud Flow Example.
- Create a new publisher or select an existing one.
- Select Save to complete this preparation step.
In Teams, identify or create a channel to use for this exercise. Make sure that you have permission to post messages.
The following video takes you through the steps for this exercise. The detailed instructions are listed below.
Exercise
To create an environment variable that provides the subject of the email to send to the IT department manager, follow these steps:
In the solution that you created for this exercise, select New > More > Environment variable.
Provide a display name, such as Environment Name.
Optionally, provide a description.
Select Text as the data type.
Provide a default value, such as No Environment Specified.
In the Current Value section, provide a new value, such as DEV Environment.
When you export a solution, you can include the current value of an environment variable alongside its definition. In the current scenario, the goal is to define a current value in the new environment. To ensure that the system doesn't export this value with the solution, confirm that the Export value toggle in the Advanced section is set to No.
Select Save to complete this step.
To create the solution-aware cloud flow, follow these steps:
In the same solution, select New > Automation > Cloud flow > Instant.
Provide a Flow name, select Manually trigger a flow, and then select Create.
Add a new step and then search for and select Post message in a chat or channel from the Teams connector.
Configure the action by using the following values:
- Post as - Flow bot
- Post in - Channel
- Team - The team name where the channel to post the notification is located
- Channel - The channel to post the notification
- Message - A message including the environment variable that you created
Select Save to complete this step.
If you test this solution-aware cloud flow, it should post a notification in the target Teams channel with the value set for the environment variable.
You can test the solution deployment that contains this cloud flow in a different environment, set the value of the environment variable with a new value, and then test the flow again. The subject of the sent email should now contain this updated value.
Next steps
Now you've learned how to create and test a solution-aware cloud flow. Next, you deploy and test this flow in a different environment.