Power Automate
Setup Connector
Power Automate is a cloud-based service that allows you to create automated workflows between your favourite applications and services. This connector enables integration with Power Automate to manage and execute desktop flows for automated task execution.
Integration
Leena AI integrates with Power Automate using Microsoft 'Dataverse' APIs and Azure Active Directory authentication.
Authentication
Leena AI supports OAuth 2.0 authentication for Power Automate through Azure Active Directory. Follow these steps to set up authentication:
Prerequisites
- Azure Account with administrative privileges
- Access to Power Automate Admin Center
- Appropriate permissions to create and manage applications
Step 1: Azure Application Registration
- Register a new application in Azure Portal (standard registration)
- Configure 'Dataverse' API permissions for the registered application
Step 2: Power Automate User Configuration
- Navigate to Power Automate Admin Center
- Select your target environment
- Go to Settings > Users & Permissions > Application Users
- Click "Add app user"
- Select "Add an App" and choose the application created in Azure under step 1
- Assign the application to a business unit
- Grant "System Administration" role to the application
Step 3: Authentication Details
To authenticate, you'll need the following credentials:
- Tenant ID (from Azure Portal)
- Client ID (Application ID from Azure Portal)
- Client Secret (generated in Azure Portal)
- Organisation URL (found in Environment overview page)
Important Notes
- Ensure all required permissions are properly configured in Azure AD
- Keep authentication credentials secure and never expose them in client-side code
- Regularly rotate client secrets following security best practices
- Organization URL format should be: https://organization.crm{number}.dynamics.com
Supported Actions
| Action | Description |
|---|---|
| Get desktop flows | This action fetches all the created desktop flows in Power Automate console. |
| Trigger desktop flow | This action allows triggering a specific desktop flow. |
| Get desktop flow status | This action fetches the status of a desktop flow. |
| Get desktop flow output | This action allows fetching the output of a triggered desktop flow. |
| Cancel desktop flow | This action allows cancelling a triggered desktop flow. |
Use cases
An employee requests Leena AI virtual assistant to help it reset a password for legacy SAP system. Leena AI leverages Power Automate desktop flow to perform an RPA and reset password for the requester/employee.
Get Desktop Flows
This action allows fetching desktop flows created under Power Automate console. User can pass a specific category to fetch specific flows.
Input Fields
| Field | Description | Example |
|---|---|---|
| Filter by | You can pass a category to fetch desktop flows/workflows specific to that category. This field expects the category id | 6 |
| Select | The details associated with the workflow/flow that needs to be returned | name, workflowid |
| Order by | The response or the list of desktop flows can be ordered based on the name of the flows or id | name |
Use Cases
An employee reaches out to Leena AI Virtual Assistant regarding troubleshooting. Leena AI Orchestrator can use this action to list all the available desktop flows and stitch a flow to solve the user's query.
Trigger Desktop Flow
Triggers a desktop flow created under Power Automate console.
Input Fields
| Field | Description | Example |
|---|---|---|
| Workflow/Desktop flow ID | The unique ID of the workflow/desktop flow used to trigger it. | 7fac4006-43cb-462d-9b8f-095bf914f6f4 |
| Inputs | All the dynamic keys/details that are required to trigger a desktop flow. | |
| Run Mode | The type of mode to trigger the desktop flow. | Unattended / Attended |
| Priority | Set the priority of the workflow trigger. | Normal |
| Timeout (secs) | Configure the desktop flow time-out period. | 7200 |
Use Cases
An employee reaches out to Leena AI Virtual Assistant regarding troubleshooting. Leena AI Orchestrator can use this action to list all the available desktop flows and stitch a flow to solve the user's query.
The Orchestrator identifies the desktop flow that can be triggered to reset the password of the legacy application and triggers it.
Get Desktop Flow Status
Each trigger of desktop flow/workflow is called a 'Session'.
This action allows fetching the status of a triggered desktop flow session.
Input Fields
| Field | Description | Example |
|---|---|---|
| Flow session ID | The unique ID of the desktop flow/workflow trigger instance | 33aa4f29-4e5c-498c-b2eb-d33a5a876d64 |
| Select | All the required details which are to be fetched for a flow session | status code, state code, started on, completed on |
Use Cases
An employee can request Leena AI Virtual Assistant to fetch the status of the troubleshooting requests raised by it. Leena AI Orchestrator/Autonomous Agents can leverage this action to fetch the status of the triggered workflows on behalf of the employee using flow session IDs.
Get Desktop Flow Output
Each trigger of desktop flow/workflow is called a 'Session'.
This action allows fetching the output of a triggered desktop flow session.
Input Fields
| Field | Description | Example |
|---|---|---|
| Flow session ID | The unique ID of the desktop flow/workflow trigger instance | 33aa4f29-4e5c-498c-b2eb-d33a5a876d64 |
Use Cases
An employee can request Leena AI Virtual Assistant to fetch the status of the troubleshooting requests raised by it. Leena AI Orchestrator/Autonomous Agents can leverage this action to fetch the output of the completed flow sessions and showcase results to the requester.
Cancel Desktop Flow
Each trigger of desktop flow/workflow is called a 'Session'.
This action allows cancelling a triggered desktop flow session.
Input Fields
| Field | Description | Example |
|---|---|---|
| Flow session ID | The unique ID of the desktop flow/workflow trigger instance | 33aa4f29-4e5c-498c-b2eb-d33a5a876d64 |
Use Cases
Leena AI Orchestrator can leverage this action to trigger a cancellation request of a desktop flow session based on the request of the employee or due to a real-time stitched flow execution criteria changes.
Updated about 19 hours ago
