top of page

Automate HR Requests with a Chatbot built using Copilot AI and Actions

A lot of businesses are trying to find ways to pilot AI in their organization and for many of them trying out chat bots seem to be the answer. And of course, in the Microsoft ecosystem that means Copilot Studio, formerly Power Virtual Agents.


The reason for the popularity of these tools now is their ability to use Generative AI. So instead of going in and defining 100 Human Resources questions and the answers manually now you can point it at your documentation and let it answer the questions using a large language model (LLM).


Since most businesses have things like HR policies and procedures, PTO policies, and the Employee Handbook available to all employees in a SharePoint site today building a Copilot can be done in literally minutes.


But the fun doesn’t stop there. The latest iteration of these chatbots can also easily include actions. You add actions for things like submitting a request for time off or requesting a meeting and the AI can take those actions for you. This allows for an interactive and action-oriented conversation, a drastic improvement from the wall of text people are used to getting from HR documents.


Is it Copilot or Chatbot?

Yes. 😊 To build these things we traditionally called chatbots you use Copilot Studio. In Copilot Studio you build a copilot, which we used to call a chatbot. So for this context Copilot and Chatbot are interchangeable. I use both throughout the article to hopefully drive home they are synonymous.


Demo of an HR Copilot with Generative AI

Since we receive a lot of requests for this specific use case, I built a demo bot to show off some of the cool. Below I will walk you through the key features with screenshots. If you want to see the Copilot in action, then check out this video demo I did HR Assistant Copilot using Copilot Studio for all of the fun.


For this Copilot I built and published the bot as a Teams app. Copilot Studio can be used to publish to many different channels that are both publicly and privately accessible. But in case where you are looking to use internal content, like SharePoint, and you want to have authentication then publishing to Teams is the path of choice.

A Copilot Studio screenshot showing the channels options, including Microsoft Teams

Answering HR questions with Copilot Studio

Alright, let's ask this bot something. How about an important question like “Can I bring my dog to the office?” Now in this case we have never trained the bot on this topic but the fine folks in HR have addressed it in our employee handbook. So, when the question is asked the Copilot looks through the handbook, finds our pet policy and responds with the appropriate answer.

A copilot chat using generative AI from SharePoint

Notice the blue colored 1s at the end of the response. These are the links to the documents that Copilot referenced to come up with this response. So, if you want to dig in deeper or just validate things before you purchase your pup some business attire you can click the link and you will be taken to the document.

The portion of the employee handbook discussing the pet policy that was referenced by copilot

Now you can see where the pot belly pig stuff came from, not AI’s imagination but from the actual policy. 🤣 Maybe I shouldn’t be in charge of HR.

Fun pigs aside, this is really powerful. By just giving Copilot access to the proper content, it is able to provide accurate answers to random questions and provide attribution so you can validate those responses. And look, all I did to set it up was give the Copilot a link to the SharePoint site and made sure everyone had access. That was it.

Copilot Studio's Knowledge tab showing a SharePoint site

And while SharePoint seems to be the default in our Microsoft 365 based world, there are a lot of other supported data sources in preview right now.

Some of the aviable knowledge sources for Copilot Studio including Azure, Jira, Oracle, SQL, ServiceNow, Dataverse, and more.

Providing a structured response via Topics

Now sometimes you don’t want Generative AI to provide an answer, you want to specify exactly how a conversation goes when they ask about a specific subject. In this case you will provide a topic. When a user asks a question topics to take precedence over generative AI.


In this case, if they ask anything about getting a raise, I want to simply redirect them to the manager or HR.

Copilot responding using a Topic

With topics you can go anywhere from this simple response to full on multi-step conversation with conditions and actions. You could ask them for additional info, you could trigger a flow or action to get more information or submit a ticket, etc. All of the traditional chat bot activities.

Different actions you can take in a Copilot topic response

Add a new employee with a Power Automate action

Okay, so far, we have just gotten information but what if we want to take action. You can add actions and/or Power Automate cloud flows to your copilot. When you add them you give it a description of what the action can do and then Copilot will use AI to determine when to invoke to action and how to get the inputs the action may require.


For the example of creating a new employee I wanted to add a record to my SharePoint list. I started by creating a flow that is triggered by Copilot and has 4 inputs. These inputs will be used as dynamic content within the flow.

A Power Automate Cloud flow Copilot trigger with inputs

Now we add a SharePoint Create Item action, configure the site and list, and then fill in the fields with the Dynamic content.

Power Automate Create Item action for SharePoint

And finally, we set the flow to respond with a message back to Copilot to let it know you are done.

Respond to copilot with Power Automate cloud flow text

Perfect, the flow is ready. Now you add it as an action to your Copilot. As part of adding it you will then tell it how to get the information for each of the inputs. The default, let Copilot figure it out and prompt the user as needed, works great. If you need more, there is extensive customization options available.

Copilot Studio Actions tab showing Inputs for an action

Same deal with output. You can configure a message saying “Success” or let AI generate the appropriate response or just not respond with anything if it isn’t necessary.


Now that you have configured the action the chatbot will call it as necessary. Here you can see I asked it to create an employee and since I provided no other context Copilot asked for the inputs.

Copilot chatbot responding to a request to create a new employee and prompting for the inputs
If you are enjoying this, then be sure to check out our training classes for both Copilot and Power Platform. We have both on-demand and live classes available to help you learn.

But, if I ask it to create a new employee and provide all of the context it needs, then it will just do the action.  

Copilot chat responding to a request where all of the information needed was in the request

I think the coolest part of that is it understood that Buddy Young was the full name, and it broke it into First name and Last name properly when it created the record in SharePoint. 😲 Remember, I didn’t write any logic or explain to copilot this was what to do. It understood the context and did it itself. This is the power of generative AI at its finest for me.


Conclusion

Using Copilot Studio to build a copilot or chatbot from existing content today is a powerful first step into bringing AI to your business. And the flexibility of generative AI, topics, and actions allows you to build so much more than we could before.


Even if you are thinking “I am not ready to do this yet” I encourage you to dig into Copilot Studio. I think it will play a big role in our AI futures and those of us who have already embraced low code tools like Power Platform are primed to lead that charge.


If you need help with this or anything else Copilot or Power Platform related let us know. Just scroll down and fill out the contact us form below. We have free help, quick help, dedicated resources, or traditional project services, all designed to help you be more awesome!

117 views0 comments

Comments


bottom of page