Microsoft Power Automate Integration


About This Integration

IntegrationIntroduction

You can integrate third-party systems with Product name - ev itsm.png 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 contact the Logo - EasyVista.png Consulting & Professional Services team, the Logo - EasyVista.png Support team, 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

Logo - EV Service Manager.png

Up and Down arrow.png

Logo Icon - Microsoft Flow.png

  • Depending on the third-party service used (authentication managed by Microsoft Power Automate)
  • Basic Authentication for the Service Manager REST API
Available versions
SaaS-based On-premises
Service Manager Check icon.png Check icon.png
Third-Party Product Check icon.png N/A

Notes

PowerAutomatevsLogicApp

What is the difference between Logic Apps and Microsoft Power Automate?

  • Microsoft Power Automate (formerly known as Microsoft Flow) is a tool integrated with certain Microsoft 365 programs. It is based on Logic Apps, with same workflow designer and connectors. It enables any user to perform simple integrations without requiring developers or the IT Department.

    example  Receive SMS notifications for important emails

  • Logic apps are used for advanced or strategic integrations that require corporate development and security practices. For this reason, Microsoft Azure Logic Apps includes more functionalities intended for IT teams and developers.

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.
         Exchange flow diagram - EN.png

Step-by-Step Integration Process

Sentiment analysis of the Service Manager ticket is performed in several steps:

Prerequisites

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.

         Azure portal - Create new resource.png

2. Select AI + Machine Learning in the left pane and click Text Analytics.

         Azure portal - Create new resource - Text analytics resource.png

3. Enter the information on the new resource.

         Azure portal - Create new resource - Text analytics resource - Information.png

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.

         Azure portal - Access Text analytics resource.png

2. Select Keys and Endpoint in the left pane.
The access keys for the Sentiment analysis subscription will appear.

         Azure portal - Keys Text analytics resource.png

3. Click Copy icon.png 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.

       Download icon.png  Sentiment analysis package

2. Import the file to Microsoft Power Automate.

  • Click My flows in the left pane.
    A list of your MS Power Automate flows will appear.
             Microsoft Flow - Flow list.png
  • 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.
         Microsoft Flow - Package information.png

The window for configuring the import will appear.
         Microsoft Flow - Package - Create connection 1.png

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.
             Microsoft Flow - Package - Create connection 2.png
  • Search for the Text Analytics connector using the search field. Select it from the list of results.
             Microsoft Flow - Package - Select connection.png

3. Enter the information on the new connection.

         Microsoft Flow - Package - Information connection.png

  • 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.Microsoft Flow - Package - New connection added.png

6 Select the connection.
The window for configuring the import will appear.
         Microsoft Flow - Package - Save connection.png

6 Click Save.
 

Step 3: Configure the imported flow.

1. Click Edit icon.png next to the flow.
         Microsoft Flow - Edit flow.png

The workflow will appear.
         Microsoft Flow - Detail flow.png

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 Copy icon.png 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 (step 3.2).
             Microsoft Flow - Detail flow - When HTTP request step.png

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.
             Microsoft Flow - Detail flow - Apply for each step.png
  • Click the name of the HTTP2 action.
    The Properties window for the action will appear.
             Microsoft Flow - Detail flow - HTTP 2 action.png
  • 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'])

               Microsoft Flow - Detail flow - HTTP 2 action - Account information.png
  • Specify the information on the account with the relevant rights for the REST API in Service Manager. Open url.png See Profile management.
    • Click the Show advanced options link at the bottom of the Properties window.
    • Enter the username and password.
               Microsoft Flow - Detail flow - HTTP 2 action - Advanced settings.png
  • Click Save at the bottom of the list of steps.
    The workflow is now configured for sentiment analysis.

Service Manager: Create a sentiment analysis resource used in a REST step in the ticket creation process

Step 1: Manage rights for using the Service Manager REST API.

    Open url.png See the description of profiles.

1. Select Administration > Access Management > User Profiles in the menu.

2. Select a user profile authorized to use the REST API.

3. Tick the REST API box.
Your modifications will automatically be saved.

4. Repeat the procedure for all authorized profiles.
 

Step 2: Create a sentiment analysis resource associated with an MS Power Automate service.

       Open url.png See How to define a new resource and associate it with a REST action.

1. Create a new MS Power Automate service by selecting Administration > REST > Services in the menu.
         Service Manager - Microsoft Flow Service.png

  • Service Name: MS Power Automate.
  • Authentication Method: None.
  • Service URL: URL for accessing the new MS Power Automate service.
    • Copy and paste the URL you stored in your text editor in step 3.2 when configuring the MS Power Automate 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}.
       

2. Create a new connection to the MS Power Automate service by selecting Administration > REST > Connections in the menu.
         Service Manager - Microsoft Flow Connection.png

  • Enter the name of the connection.
  • Authentication Method: None.
  • Service Name: Select the MS Power Automate service you previously created.
    The service URL will automatically appear.
  • subdomain: Copy and paste the prod-35.westeurope value of the URL you stored in your text editor.
     

4. Create a resource associated with the MS Power Automate service by selecting Administration > REST > Resources in the menu.
         Service Manager - Microsoft Flow Resource.png

  • Label: Name of the resource.
  • Resource URI: ID of the new resource.
    • Copy and paste the URL you stored in your text editor in step 3.2 when configuring the MS Power Automate 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=??????

  • Content: Body of the request containing the data to be updated. Copy and paste the text below without inserting any spaces or line breaks.

    Note: If you paste a JSON schema copied from a third-party editor such as Microsoft Word, Notepad++, etc., invisible characters may be inserted. This will create an error in the processing of the REST step using the resource.

    {"Description": "{Description}","id":"{id}"}


Step 3: Use the sentiment analysis resource in a REST step in the ticket creation process.

       Open url.png See How to define a new resource and associate it with a REST action.

1. Open the workflow or the business rule-related process you want.

2. Click and drag the new resource from the REST Actions category to the graphic editor of the process.
A new step will be added to the process.
         Service Manager - Workflow - REST action.png

3. Double-click to define the properties of the new step.

Verification 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.
             Microsoft Flow - Integration test.png
  • 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.

         Microsoft Flow - Free account.png

3. Log in to your professional Microsoft account.
         Microsoft Flow - Login account.png

4. Enter the login information.
         Microsoft Flow - Account creation - Identification 1.png

5. Click Next.

6. Tick the I agree box.
         Microsoft Flow - Account creation - Identification 2.png

7. Click Sign up.

EndAccountFreeCreation

Links to other integrations

Tags:
Last modified by Unknown User on 2020/07/29 19:07
Created by Administrator XWiki on 2018/07/23 15:15

Shortcuts

Powered by XWiki ©, EasyVista 2020