hello folks welcome back in today's video i will show you how to create
custom chat bots for Teams which will auto respond queries based on data
saved in microsoft list so stay tuned and let's go to the demo after this
short intro
i am in office 365 landing page from the left hand menu i will click on
the list app icon this will take me to microsoft list page now from here i
can create a new list i've already created a issue
list but i can just quickly show you how to create new one so you click on new
list and then you select a template which is
issue tracker in this case and then you just click on use this
template and give this a name and save this list to one of the
sharepoint site and the list will be created
so i've already created this list i will just click on that list so
in this list there are two records i've also shown the id
of that list here as well so by default the id will not appear here so what you
can do is you can go to all items and edit current view and then
you can select the id column and then make the position
from left to number one it will appear on the
view okay so what i'm going to do is i'm going to create a custom chatbot for
one of Microsoft team and then when someone query and status
about an issue that person needs to provide an
issue id so the chatbot will automatically retrieve the issue title
and the status of the issue and reply back to that person
in the chat window so let's go back to the teams so here i will create a new
team i will create a team from scratch i will just
create a private team and i will give it a name i will just
call it issue resolution team create i can just keep adding extra
members for now now the team is there what i need to do is i need to click on
these three ellipses next to the stream icon
and then i need to look for power virtual agent
this is a quick and easy way to create chatbots for teams so i will click
power virtual agents and what you can do is you can just right click on it and
then pin this power virtual agent here for
future reference so you can reuse it if you're creating another team bot built
in it so what it's saying is empower employees
one chat at a time to give people access to help they need
24 7 automate frequently asked question and common business processes for hr
service desks and more so i will click on create a chatbot i will
click on start now button now the first thing it will ask me that which team
this chatbot will be published so we know we created this general resolution
team so i will say this theme and then i'll click continue
now this will set up things for us and it will create a default chatbot
with default instructions pack which we can update and i will show you how we
can update them in a while now it's asking
me to give this chatbot a name i'll just call it
issues update bot english language by default
click on create now my first chatbot is created
i can go and author the topics for this chatbot i can test it and i can publish
it to my team so to test it what i will do is i will
track between topics so i will switch this on
this will take me to the topic which this bot is when someone is
sending a message so if i say hi and enter now this automatically engage a
topic from the chatbot which fulfill this high
command so you can see that trigger phrases are hello hello agent hi
or anything like that it is sending these three messages so
to me look like a lot more messages than we want to send so we can just delete
like also we can just select this and delete this message and here what we can
do is after hi we can get a person name who is
requesting this so we can target that person name so if i click on
this variable drop down use the display name so we can say hi
the person name i'm virtual agent i can help you with i'm just changing the
message here so what i'm saying is hi person name i'm a virtual agent i can
help with issue centre queries so if i just click on save from the top now that
message is saved now if i send again if i just say hello again now
this time it will just say hi rashid that's the person who's raising the requests
and i'm a virtual agent i can help with the issue centre queries now the next
bit we want to do is if someone's saying that i
want to get an issue update we should be able to retrieve the
issue title and the issue of status from the
microsoft list which we've just created so to do that i will go back
from this back button and then here all the topics are listed here so i can
click on new topic so i'll click plus new topic sign here and
the name is we'll call it issue query topic the trigger is
issue update issue status so i will leave these two for now as a trigger
phrase now to author this chatbot topic i will
go to authoring canvas so go to authoring
canvas okay so by default it's just sending a message
we don't want to send a message yet what we want is we want to add
something in between so what we want is when someone say issue
status we ask a question so the question we will
ask is we will get the issue id from that user i'm asking question what is
the issue number the person needs to provide an issue
number so this will be a number column if i scroll down and i select number
and the variable by default it will create a variable so i can just change
it to change to war issue number that's the
variable name okay so it will get the issue number from the
user and save in this variable now let me delete this for now and then
the next one we will call an action now this is where we will use the power of
power automate to get the issue status from microsoft list
so call an action so i will create a flow launch power
automate okay it's saying that if you leave this page you will change it will
be lost are you sure you want to cancel so let me
save this first so i will click on save whatever information
you already put in here you just save the information and then you click on
plus sign and then you call an action and create a
flow because this is gonna take you back to power automate page where you can
create flows so it has three default template power
virtual agent flow templates i'll just click on that template for now okay so
power virtual agent is expecting some kind of input field so we know that we
are providing that issue tracker number that as an input so if i
select a number i will just say issue number yeah so that will be the field
we'll be providing via our chatbot to power automate and then
this is where it will return the value which is title
or the status then i can do is i can click on this plus sign to retrieve the
record so we'll say add an action what we need is we need to get a record
from microsoft list so for that we will use get item sharepoint
action so click on that and now we need to provide
a site address so if i just quickly show you this is sitting on
the keapoint training site the issue tracker list we will
select that site and then the list name was
issue test and id we will get it from the issue number which
the user will provide in the chatbot click on issue number
okay so next we got this item from microsoft list we need to return the
value to the chatbot if i select this add
an output so the first output we want is the title of the issue so i will select
text box i will just call it issue title and then
i will select title from this get item so we'll get the issue title there and
another output i will select again as a text output and
then i will use issue status here so the next output
is issue status and now we know that the status value column from
the issue tracker Microsoft list is the column which we want to retrieve here so
i'll say status value and i will click save now what this is doing is it is
getting the issue number from the chatbot
and then retrieving the item from microsoft list and then returning the
title and status back to the chatbot so we have done this workflow i will click
on save now just to make sure that everything is saved okay
now if i click on this back go back to previous page click on that this will
take me back to that chatbot page now we know that we have already done
the trigger phrase and we asked the question
then what we need is we need to call an action so
now this time if i click on call in action because we have already created a
flow using that flow template it is asking us
to attach that flow to this chatbot so i
will click on this now remember that we have an input column which is issue
number we need to provide to this flow so it is asking me which variable i want
to use as the issue number so we will be using this variable because this is
where we are asking the user question and user is replying
with the issue number which we are saving here
so if i just click on select a variable Var issue number
and power automate will output these two variables here so if i click on plus
sign now we need to show this message to the
user so i will click on show a message and in this message what we can do is we
can insert those output variables from power automate so if i
do issue title and then go next line and i will do issue status so i will
just type in issue title text and issue status front of this
variable now this should work so if i click on
save now we can test this information so we
have that tracker on so the trigger was issue status issue
update what if i say can you please give me an
issue update and i'm asking that question now you can
see that that trigger has started it is asking me what is the issue number
and if i go back to the list we got id 1 and 2 we will say that 2
for example so i will provide the issue number and hit
enter now this will run the workflow and retrieve me back
the issue title which is team permissions issue and issue status is
new so if i go back i can see that it is a
team's permission issue and the status is new that nobody taken
over this issue and resolved it now we are happy with this
topic you can add as many as the topic you want
you want to retrieve other information about the issue or you want to see who
this issue is assigned to when this issue was
created how many issues are pending how many
issues are resolved today for example so you can run all those queries using
power automate workflow and using the get items
function of power automate to retrieve Microsoft Lists
records now i'm happy with this i can just
go back click on the back here and then i can click on this publish
icon here on the top click on publish this will publish this chat bot
to team so this is giving me an message an upgraded lesson will soon be required
to publish parts using premium flow connectors
and skills for if you are using the premium connector in power automate
workflow for chat bots you will need to upgrade to the premium license i'm
not using any of that so i'll just click on publish
here publish latest content click publish your latest content has been
published this will become available to your user
within the next 15 minutes so once the bot is published the next
step is you need to open this port in microsoft team so i will click on it
and then i will click on add this will add the bot
so now i can start interacting with this bot and say
hi it's already sending me that message i'm just saying can you please update me
with the issue status and say what is the issue number
i will say this time one now it is telling me the issue title is
sp not working and issue status is new and if i go back to the issue list
that's the issue title and the status of the issue is here so now you
know that the issue update part is available here
in this left hand menu what you can do is you can right click and pin this bot
so you can always come back to this bot so if i go back to the power virtual
agent and chatbots click on chatbots where all the
bots will be available so the one which we have just created if
i click on it you can make any customization to it and
you can publish it again so if you want to share the bot with
the team you can click on share the bot before i just open it for myself now you
can just share it with the whole microsoft team so click here the bot
this will open up a window here now you can either submit for admin
approval or you can just add it to team this is the team we selected when
we created this part so i will just click
add to teams so it's saying your board is not available to your colleagues in
that team so the chatbot will be added for
all the team members to use so in today's video you have
learned how to create custom chatbot using project Oakland power virtual
agent and how you can update the topics and
how you can customize the topic and add power automate workflow to query
data from microsoft list and answer to user query
using the chatbot thank you for watching this video
consider subscribing if you're new to the channel by pressing the red
subscribe button below this video and click the notification bell icon so
you don't miss any of my future videos as i upload
new videos every week give this video a thumbs up if you found it useful
if you have any question regarding this topic or any other query
related to office 365 put in the comment section below i review my comments on
the daily basis i will be happy to answer
thank you