- 19 Nov 2024
- 6 Minutes to read
- Print
- DarkLight
- PDF
Power Automate Flow
- Updated on 19 Nov 2024
- 6 Minutes to read
- Print
- DarkLight
- PDF
Introduction
Power Automate is a Microsoft product that automates workflows and tasks across various applications and services.
It allows users to integrate and connect different apps to create automated flows that can trigger actions based on specific events and streamline repetitive tasks.
Managing Power Automate flows is similar to Turbo360's Logic Apps, allowing users to view flow execution history and resubmit in case of errors.
Getting started
Microsoft Azure
The following pre-requisites are to be established in the Azure portal to manage and monitor all your Power Automate flows:
- Create an App registration in Azure portal
- Navigate to the registered application
- Go to Manage -> Authentication and click Add a platform
- Add a redirect url http://localhost with Web as Platform
- Go to Manage -> API permissions -> Power Automate
- Grant Admin Consent to the below permissions:
i) User.Read
ii) Flows.Read.All
iii) Flows.Manage.All
Turbo360
After completing all the above steps, you need to add a Service principal that can access Power Automate.
- Navigate to the Service principals section within Business applications
- Click Add to add a new Service principal
- Select Manage Power Automate Flows option
- Enter the Service principal credentials and click Validate
- Once the validation is completed successfully, navigate to the given URL
- Copy the response from the browser
Click Validate authorization code . Click Next after successful validation
You will be listed with the Power Automate Environments. Select the required environments and the corresponding Business Application Groups
Click Add to create a Service principal with access to Power Automate flows
Enable & Disable
The Power Automate flows can be enabled (or) disabled directly using Turbo360 without the usage of Azure portal.
The Enable/Disable option for the Power Automate flow resource is located at the top of the screen.
Multiple flows can be enabled (or disabled) at once by clicking the Start (or Stop) option in the Power Automate flow resource section available in the associated Business Application.
Run trigger
Power Automate flows can be invoked by sending a message to the trigger.
- Click Run trigger available at the top of the screen
- Choose the desired trigger endpoint
- Provide the required information with respect to the selected endpoint
- Click Run
The Run trigger option allows users to modify a message and resubmit it to an endpoint, allowing their Power Automate flows to be recovered from the error condition.
Run history
Users can check the history of flow executions in the Run history. Click on the identifier of any flow execution to view the run details of the Power Automate Flow.
Optional settings
When there are many flow executions, search is made simpler by offering more sophisticated options, as will be covered below:
Advanced search
Power automate flow executions can be filtered using Advanced search by specifying the From and To dates, as well as one of the following statuses:
- Succeeded
- Running
- Failed
- Cancelled
- Waiting
- Skipped
- Suspended
- Paused
- Timed Out
- Aborted
Search by identifier
Users can search any specific flow run by providing the identifier value in Search by Identifier.
Get retry chain by identifer
The retry chain of a desired flow execution can be viewed by entering the identifier value in Get retry chain by identifier.
A retry chain is useful when a flow is subjected to multiple resubmissions and illustrates it in the form of a chain, along with the status of each execution.
The link icon next to the Tag column in each identifier can also be used to view the retry chain of the respective run.
Resubmit failed runs
Power automate flow executions would fail due to failure in one of its actions and it occurs quite often in a business orchestration. Turbo360 already facilitates viewing the run history and accessing the details of the failed runs.
The failed flow executions can be resubmitted by selecting the required runs and clicking Resubmit runs button.
Even though the Azure portal allows for run resubmission, distinguishing between resubmitted runs cannot be easy.
Turbo360 overcomes this challenge by adding tags that inject details of the original parent run into runs resubmitted from Turbo360 or the Azure portal. An additional tag is added to the parent run to get the list of all child / resubmitted runs.
Ignore runs
Flow runs that are not very useful at a large scale can be marked as ignored by selecting them and clicking the Ignore Runs button. A tag indicating the ignored run is added to the appropriate run with a custom description.
This ignore tag is visible only in Turbo360. It will not have any impact on the actual runs.
Trigger history
Users can view all the triggers in the Power automate flows, along with details about the inputs and outputs of each trigger. If there are multiple triggers, the trigger history can be filtered by the trigger, as in Azure Portal.
The triggers can also be filtered based on the following statuses:
- Succeeded
- Running
- Failed
- Cancelled
- Waiting
- Skipped
- Suspended
- Paused
- Timed out
- Aborted
Action required
The Action Required section focuses primarily on failed flow runs that require appropriate action.
The following are examples of possible actions:
- Resubmit runs
- Ignore runs
Favorite runs
Frequently used flow runs can be marked as favorite from Run history and Action required sections.
Select the required runs and click Mark as favorite.
Inline task
In a Power Automate flow resource, users can create a really quick task to resubmit failed runs from the source Power Automate flow that is being explored.
The configuration created to run immediately can also be saved for future use in the Automated Tasks section.
Inline task to resubmit failed runs
The Resubmit failed runs option available at the top of the screen allows users to quickly resubmit the runs that failed within the specified hours (Minimum 1 hour).
Task status can be viewed by navigating to Automated Tasks section and switching to Task history tab.
- Users can use this feature to quickly create a task that runs immediately.
- Navigate to the Automated Tasks section in Turbo360 to create a task with a more detailed configuration, schedule tasks to run at a specific time, or automate the task to run on the specified hours, days, and more.
Automated task
Consider an employee management scenario, where the employee joining process in an organization is defined in a Power Automate flow. When an employee joins an organization, a message with required employee details will be pushed into a Service Bus Queue by the HR application.
A Power Automate Flow will be listening to the Service Bus Queue for messages.
Whenever a message arrives in the Service Bus Queue, the Logic App will extract the message body of the Service Bus Message and post it to an Azure Function and store it in a Storage Table for future references.
The Azure Function will process the Employee details and assign them to the required departments in the organization.
In the example above, what if the Power Automate flow encounters an error and needs to be resubmitted to fix it?
Turbo360's automated tasks allow users to configure resubmitting of failed runs for a specified time. This is beneficial when there are multiple workflows.
Monitoring
Power Automate Flow failures and status can be monitored with Turbo360.
State Monitoring
- Navigate to Power Automate Flow -> Monitoring
- Configure threshold value for the state of the Power Automate Flow to determine the health state
- Click Save
The monitoring rule will be saved for Azure Function, and the monitoring state will be reflected after every monitoring cycle.
Failure Monitoring
- Navigate to Power Automate Flow -> Monitoring
- Select Failed runs under Failures and configure the threshold values
- Click Save
Failure monitoring will be initiated once the rule is saved, and the monitoring state will be reflected after every monitoring cycle.