Microsoft Power Automate Integration
IntegrationIntroduction
You can integrate third-party systems with Service Manager in many ways. The method you select will depend on business requirements, architectural and security constraints as well as the characteristics specific to each third-party application or service.
This document describes an integration process that has already been implemented in a customer context.
To find out more about this integration (e.g. scripts to be used), please do not hesitate to contact your EasyVista contact, or your service provider and integrator.
Overview of the integration
Microsoft Power Automate (formerly known as Microsoft Flow) enables you to automate recurrent tasks by building workflows using Web applications.
- The tool relies on a large ever growing ecosystem of standard connectors based on Microsoft Azure Logic Apps for interfacing with any endpoint via HTTP/HTTPS.
example Azure Active Directory, Office 365, Skype For Business, Teams, Jira Software, SAP, etc.
- It can also use the Microsoft Graph gateway via the MS Graph API when no connector is available.
This integration enables you to use the Microsoft Power Automate sentiment analysis prebuilt model using the Text Analytics API:
- Users create a ticket in Service Apps.
- Its description is immediately analyzed by the API. Sentiment scores and sentiment labels are returned for each sentence. This is useful for detecting positive and negative sentiments in user input.
Integration Data Feed (direction) | Authentication Type | Integration Connector Options | ||
---|---|---|---|---|
|
|
|
Available versions | ||
---|---|---|
SaaS-based | On-premises | |
Service Manager | ![]() |
![]() |
Third-Party Product | ![]() |
N/A |
Data feed
This integration is based on a simple use case. It analyzes the text entered by users when creating an incident via the portal and notifies a manager when it detects that the user is dissatisfied.
The exchange flow is represented below.
Step-by-Step Integration Process
Sentiment analysis of the Service Manager ticket is performed in several steps:
- In Microsoft Azure:
- In Service Manager, use a resource dedicated to the integration in a REST step of a process, allowing the automatic execution of the MS Power Automate flow
Prerequisites
- You must have an Azure subscription. If this is not the case, you can create a free account, or you can buy an Azure Pay-As-You-Go subscription.
See the procedure.
- You must have an account authorizing access to the Service Manager platform with a profile and access rights to create and modify workflows, access the Administration menu and other required menus, such as Service Operation and Service Transition.
Microsoft Azure: Create a subscription for sentiment analysis
Step 1: Access the Azure portal.
1. Log in to the Azure portal using your Azure account login.
Step 2: Create an Azure resource for sentiment analysis.
1. Click + Create a resource on the portal Home page.
2. Select AI + Machine Learning in the left pane and click Text Analytics.
3. Enter the information on the new resource.
4. Click Create.
The new resource for using the sentiment analysis API is deployed.
Step 3: Obtain an access key for the subscription.
1. Select the sentiment analysis resource.
2. Select Keys and Endpoint in the left pane.
The access keys for the Sentiment analysis subscription will appear.
3. Click to copy the key displayed in the KEY 1 or KEY 2 field and paste it in your text editor in order to store it temporarily. It will be required when configuring the MS Power Automate workflow (step 2.5).
Microsoft Azure: Configure an MS Power Automate workflow
Step 1: Import a sentiment analysis flow to Microsoft Power Automate.
1. Download the file below to your workstation.
2. Import the file to Microsoft Power Automate.
- Log in to the Microsoft Power Automate website using your account login.
- Click My flows in the left pane.
A list of your MS Power Automate flows will appear.
- Click Import in the menu bar and select the file you downloaded.
Once imported, the package contents will appear.
Step 2: Create a Text Analytics connection.
1. Click the Select during import link in the Import Setup column.
The window for configuring the import will appear.
2. Create a new connection for sentiment analysis.
- Click + Create.
- An MS Power Automate instance will appear in a new Web browser tab.
- The list of existing connections will appear.
- Click + New connection.
- Search for the Text Analytics connector using the search field. Select it from the list of results.
3. Enter the information on the new connection.
- Account Key: Copy and paste the access key to the sentiment analysis API you stored in your text editor when creating your subscription in step 3.3. The access key was provided by Azure.
- Site URL: Copy and paste the URL to the Text Analytics API below.
https://westeurope.api.cognitive.microsoft.com/text/analytics/v2.0
4. Click Create.
The new connection for sentiment analysis is created.
5. Close your Web browser tab.
- You will return to the tab displaying the list of MS Power Automate flows.
- The new connection for sentiment analysis will appear in the list of resources.
6. Select the connection.
The window for configuring the import will appear.
7. Click Save.
Step 3: Configure the imported flow.
1. Click next to the flow.
The workflow will appear.
2. Retrieve the URL of the first step, When a HTTP request is received.
- Select the name of the step.
The Properties window for the step will appear.
- Click
to copy the URL displayed in the HTTP POST URL field and paste it in your text editor in order to store it temporarily. It will be required when defining the configuration in Service Manager.
3. Configure the HTTP2 action in the step called Apply to each.
- Click the name of the step, Apply to each.
The step contents will appear.
- Click the name of the HTTP2 action.
The Properties window for the action will appear.
- Specify the server name and account.
- Click the concat(…) variable in the URI field.
The content of the variable will appear in the Properties window. - Check that the server name is {your_server} and that the account is {your_account}.
- If required, make corrections as shown in yellow below and click Update.
concat('https://{your_server}/api/v1/{your_account}/requests/',triggerBody()?['id'])
- Click the concat(…) variable in the URI field.
- Specify the information on the account with the relevant rights for the REST API in Service Manager.
See Profile management.
- Click the Show advanced options link at the bottom of the Properties window.
- Enter the username and password.
- Click Save at the bottom of the list of steps.
The workflow is now configured for sentiment analysis.
Service Manager: Use a resource dedicated to the integration in a REST step of a process
CreateInServiceManagerRestResource_Procedure
Step 1: Manage rights for using the Service Manager REST API
1. Select Administration > Access Management > User Profiles in the menu.
2. Select a user profile authorized to use the Service Manager REST API.
3. Tick the REST API box.
Your changes will automatically be saved.
4. Repeat the procedure for all authorized profiles.
Step 2: Create a resource called Sentiment analysis associated with a Microsoft Power Automate service
See the detailed procedure.
Step 2.a: Create a service called Microsoft Power Automate
1. Select Administration > REST > Services in the menu.
2. Create a new service.
3. Specify the information below.
- Service Name: Enter the label Microsoft Power Automate.
- Authentication Method: None.
- Service URL: URL for accessing the new Microsoft Power Automate service.
- Copy and paste the URL you stored in your text editor when creating the MS Power Automate flow (step that will trigger the flow).
- You should keep only the text displayed in yellow below.
https://prod-35.westeurope.logic.azure.com:443/workflows/?????/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=??????
- Replace prod-35.westeurope with {subdomain}.
Step 2.b: Create a connection to the Microsoft Power Automate service.
1. Create a new connection.
2. Specify the information below.
- Connection Name: Enter the label Sentiment analysis.
- Authentication Method: None.
- Service Name: Select the Microsoft Power Automate service you created at step 2.a.
The URL of the service will automatically appear.
- subdomain: Copy and paste the prod-35.westeurope value of the URL you stored in your text editor.
Step 2.c: Create a resource associated with the Microsoft Power Automate service
1. Create a new resource.
2. Specify the information below.
- Label: Enter the label Sentiment analysis.
- Resource URI: ID of the new resource.
- Copy and paste the URL you stored in your text editor when creating the MS Power Automate flow (step that will trigger the flow).
- You should keep only the text displayed in yellow below.
https://prod-35.westeurope.logic.azure.com:443/workflows/?????/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=??????
- Contents: Body of the query containing the data to be updated. Copy and paste the text below without inserting any spaces or line breaks.
{"Description": "{Description}","id":"{id}"}
Step 3: Use the Sentiment analysis resource in a REST step of a process
1. Open the workflow or the business rule-related process you want.
- Workflow: References > Other References > Workflows (Operation/Transition)
- Business rule: Administration > Business Rules > Related Processes
2. Click and drag the new Sentiment analysis resource from the REST Actions category of the palette of action types to the graphic editor of the process.
A new step will be added to the process.
3. Double-click to define the properties of the new step.
4. Click Confirm Changes.
Check and test
Step 1: Create a new incident using Service Apps.
1. Log in to Service Apps.
2. Create an incident.
Step 2: Run the MS Power Automate flow.
1. Log in to the Microsoft Power Automate website using your account login.
2. Select the sentiment analysis flow.
- The flow will appear in the run history.
- A notification may appear depending on the score obtained.
Step 3 (optional): View the score for the incident.
1. Open the Incident form in Service Apps.
2. Add Available Field 6.
AccountFreeCreation
How to create a free Azure account
1. Go to the Microsoft Azure website.
2. Click Start free.
3. Log in to your professional Microsoft account.
4. Enter the login information.
5. Click Next.
6. Tick the I agree box.
7. Click Sign up.