Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

HR Sentiment analysis with Power Automate + Power Virtual Agents + Microsoft Teams

(2) ShareShare
ReportReport
Posted on by 15

This wasn't an easy post. It was difficult getting to work with Power Automate and actually understanding how it works, BUT, I made it. As Lady Gaga said, you can do anything if you put your mind to it, so here I am...

In this article, we will see how we can use the sentiment analysis functionality from AI Builder to collect inputs and answer them in 3 possible scenarios: positive, negative, or neutral.

 
 We will need:
  1. Power Automate: 

  2. Power Virtual Agents: 

  3. Microsoft Teams

 

First step: Power Virtual Agents

Power Virtual Agent will be the bot that communicates with the employee. You will see later on that because we want to add this solution to a scenario the workers already know, we will add this Power Virtual Agent (step 3).

 

1. Log into Power Virtual Agents, complete the form and select Create.

 
naneurrutia_0-1666947454655.png

 

 

2. Under topics, select +New topic and name it as you want. In my case, the topic is already created. I decided to name it Employee feedback, you'll see why.

 
naneurrutia_1-1666947454534.png

 

3. List the trigger phrases that you want your bot to respond to, once you have them listed, add them to the Trigger Phrases box:

 
naneurrutia_2-1666947454109.png

 

4. Add a message and then a question. While adding the question, please notice that you'll need to change some defaulted values and options as shown below:
  • Identify: User's entire response

  • Save response as: VarUserResponse

5. Add an action and then select Create a flow

 
naneurrutia_3-1666947454541.png

 

At this point, a new tab for Power Automate will open looking like the picture below.

 
naneurrutia_4-1666947454572.png

 

Second step: Power Automate

Power Automate will basically analyze the sentiment of the phrase the employee is inputting in the system, and after processing the response will give the worker different answers and take some actions with the HR Team.
 

In the first box, complete as shown:

 
naneurrutia_5-1666947454108.png

 

2. Add an action and chose to Analyze positive or negative sentiment in text. Complete as follows.

 
naneurrutia_6-1666947454294.png

 

3. Add another action and select Initialize variable. Complete as shown.

 
naneurrutia_7-1666947454252.png

 

4. Add a new action and choose Initialize variable. Complete the fields as follows:
 
naneurrutia_8-1666947454318.png

 

5. Add an action and select Switch and complete the On variable:
 
naneurrutia_9-1666947454104.png

6. Now is when you need to decide how your bot will reply to positive, negative, and neutral inputs. If you are lacking in inspiration see what I've done.

 
  • Case: positive. Choose set variable and complete it with the name and text you want people to receive in positive cases.

naneurrutia_10-1666947454544.png

 

  • Case: negative. This case is a bit different because it is a negative input and we want to escalate the feedback received to the HR Team through email. As you can see the first step is the same as the positive case, but here I added an additional step: Send an email (V2) completing the "to" "subject" and "body". Notice that in the body I added a Dynamic field so people receiving the email are aware of the response that was submitted and they can take proper action.

naneurrutia_11-1666947454682.png

 

  • Case: neutral. Luckily this one is simple and pretty similar to the positive one. Complete as follows.

naneurrutia_12-1666947454248.png

7. We want to save this feedback and sentiment. To do so, we need to select the Create item under Sharepoint actions. You will need:

  • Site address

  • List name

  • Title

naneurrutia_13-1666947454245.png

8. We will return these values to our HRBot - Power Virtual Agents.

 
naneurrutia_14-1666947454107.png

The entire flow you just created must look something like this:

 
naneurrutia_15-1666947454698.png

 

Back to the first step: Power Virtual Agents

 

1. Once the flow is created, you will notice this new box completed with new information:

 
naneurrutia_16-1666947454249.png

 

2. You'll need to add a new message and include the variable Response.

 
naneurrutia_17-1666947454367.png

 

Step 3: Publish the Power Virtual Agent on Microsoft Teams

 

Using Microsoft Teams is a smart decision, as adoption will be pretty easy. Employees are used to Teams doing basically everything.

1. In Power Virtual Agents, go to Publish and select Go to Channels.

 
naneurrutia_18-1666947454712.png

2. Select Microsoft Teams.

 
naneurrutia_19-1666947454688.png

 

3. A new tab will open. Select Turn on Teams.

 
naneurrutia_20-1666947454710.png

 

4. This tab will open, select Edit details.
 
naneurrutia_21-1666947454694.png

 

5. Change details if you want to, once you are done select Save.

 
naneurrutia_22-1666947454696.png

 

6. Let's make it happen! Select Publish.
 
naneurrutia_23-1666947454695.png

 

7. Confirm.
 
naneurrutia_24-1666947454320.png

 

8. This is the good sign we are looking for:
 
naneurrutia_25-1666947454707.png

 

Keep reading here: HR Sentiment analysis with Power Automate + Power Virtual Agents + Microsoft Teams (anainesurrutia.com)

 

Ana Inés Urrutia | MVP | Dynamics 365 for Human Resources (anainesurrutia.com)

 

 

 
 
 
  • naneurrutia Profile Picture
    15 on at
    Re: HR Sentiment analysis with Power Automate + Power Virtual Agents + Microsoft Teams

    Thank you! I appreciate your feedback. 

  • gregmarbais Profile Picture
    108 on at
    Re: HR Sentiment analysis with Power Automate + Power Virtual Agents + Microsoft Teams

    Nice use case

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75