Power Platform custom connector
With the Power Platform connector, you can use Power Automate, Power Apps, or Azure Logic Apps to automate actions in Alvao or to integrate Alvao with other applications.
Installation
- Decide which authentication mode the connector will use: OAuth 2.0 (recommended) or Basic authentication.
- For OAuth 2.0, in your Microsoft Entra choose an existing app or register a new app for the connector.
- In Alvao, create an application account representing Power Platform and grant needed permissions to it.
- In Administration - Users, use the New usercommand. Fill in the following fields:
- Name and Surname, e.g., Power Platform
- User name, e.g., Power Platform
- In Application account, for OAuth 2.0 check the Microsoft Entra application option. For basic authentication check the Other applications option.
- In the case of basic authentication, select the created user in the table and use the ... - Change password command to set the user password.
- Assign roles to the account with the Edit - Service team roles command. Use the Reader role or Manager role to grant read or update permission respectively.
- In Administration - Users, use the New usercommand. Fill in the following fields:
- To install the connector in Power Automate, use the following procedure. For Power Apps
and Azure Logic Apps, the procedure is similar.
- Download and unzip the archive ALVAO.PowerPlatform.CustomConnector.zip.
- Log in to your Power Automate.
- Click on the More - Discover all button.
- Use the Data - Custom connectors - New Custom Connector - Import an OpenAPI filecommand.
-
Set the Custom connector title, e.g. ALVAO.
-
Select the ALVAO.PowerPlatform.CustomConnector.swagger.yaml file from the downloaded archive and click Continue.
-
On the Generaltab:
- UploadALVAO.PowerPlatform.CustomConnector.icon.png as the icon.
- Set the Icon background color to #FFFFFF.
- Set the Host and Base URL to your Alvao REST API url.
noteIf you don't have your REST API exposed to the internet, you need to connect via an on-premises data gateway. For setting up the gateway, see Install an on-premises data gateway.
-
On the Security tab, select the authentication mode chosen above.
-
When using OAuth 2.0:
- Select Identity Provider as Azure Active Directory (Microsoft Entra ID).
- Set the Client ID to your Entra ID registered app.
- Set the Resource URL to your Alvao Application ID URI.
- After the creation of the custom connector, add the generated Redirect URL to the list of URLs in the registered application in MS Entra.
-
Click on the Create connector button. For more information, see Create a custom connector from an OpenAPI definition.
-
On the Testpage:
- Select New connection:
- Select the authentication method and provide access credentials if needed.
- Click on the Create connection button.
- As an operation select GetTicket.
- Enter the ticket ID of an existing ticket.
- Click on the Test operation button.
- Status code 200 should be returned.
- Select New connection:
-
Now, when adding an operation to your flow, you can see the ALVAO connector on the Custom tab in the designer.
-
Extended triggers
Apart from the triggers supported by the connector, with the ALVAO Asset Management Custom Apps module, or ALVAO Service Desk Custom Apps module, you can also trigger a Power Automate flow directly from the code of any Alvao application.
Example:
- Log in to your Power Automate and import the package ALVAO.PowerPlatform.FlowTemplate.zip, which is part of the connector package.
- In Alvao - Administration - Applications, use the Import command to import the ALVAO.Application.RunFlowOnTicketStateChange.xml file.
- In Administration - Custom fields create a new custom field of the ticket status entity:
Name | Type | Length | Table | Column |
---|---|---|---|---|
Run flow (URL) | nvarchar | 2048 | TicketStateCust | RunFlowUrl |
- In Power Automate, copy the HTTP POST URL from the "When an HTTP request is received" trigger of the flow.
- In Alvao - Administration - Processes, select the process for which tickets you want to be triggering the flow. Use the Edit - Solving process command, select the particular status, click the Modify status icon, and in the Other section, paste the trigger URL to the field Run flow (URL).
- In Administration - Applications, enable the sample application.
The application triggers the flow whenever a ticket transits to a ticket status with the trigger URL in the Run flow (URL) field. The flow does nothing but it answers with the code 200 and the body with the ticket number. After that, the application logs a record "Flow was triggered" in the detailed log of the ticket.