so that just leaves one more thing we are now going to work on how to create an azure boards
chat bot with power virtual agents all right so i told you to go check out power virtual
agents earlier let's go ahead and get in here sign into our power virtual agents
if you've already got a bot in here you've been playing around previously you can just close
that bot and then come up here to the right where you see the little bot icon and create a new bot
now we're going to call this and call it anything you want no code test bot
choose all the right information here for you the
language and the environment that you're going to be using
once this is all ready for you then you can come up here and we can start exploring some things
we'll go into the topics now oftentimes the bot will need just a little bit longer before
it's ready for you to create topics so we'll have to sit here for just a few more minutes
and then it'll let us know when the bot's ready and we can start creating our trigger
all right so our bot is ready now we can come in here and hit the plus
now i'm just adding a phrase that our bot's going to respond to anytime i type in assign to me what
should happen is it's going to go out and find the query information and return that back to me
so assigned to me
tell our bot to respond to us and just say hey let me check on that for you
i'm also going to give this a a quick better name
and over here on the right save that
the next thing we need to do is go in and add a new node
we're going to call an action i'm going to choose the option to create a flow and that's going to
open up power automate for us where we can create our flow this is going to look a lot like logic
apps did there's already a couple things in here for us that are related to power virtual agents
in terms of passing in information and passing out information we'll use this output but we'll
get to that in a moment the first thing we want to do though is actually come in here and create
the first step whenever this power virtual agent runs it's going to be looking up something in
azure devops just like we did in our logic app so we'll search for azure devops now in power
automate all of the azure devops connectors are part of their premium package so you might have
to keep that in mind we're going to come in here and get query results just like in logic apps
we'll choose the organization choose the project that we're working on
and the query id which we've got from earlier
right here the exact same one we were using for assigned to we'll just copy that again
go to our query id paste that in here
i can go ahead and hit save up in the top right anytime i'm ready
once we've got our query results then we have to then do something with that just like we did in
logic apps over here we need to create a variable that we're going to store that information in so
let's go to add another action i'll search in my connectors here for anything related to variable
and i want to initialize a variable just like before we're getting the
query results so i'm just going to call this variable query results set it as a string
rename this a little bit
once we've got this variable set up then we're going to start looping through the
results our query results so we'll come down here we're going to choose the control
and we're going to apply to each that's just like the for each from the logic app world
here in the in this field we're going to go with the value that you see here
and click out of that box and then come down to the add an action
so for every value now we want to append the query results into that string that we were using
so let's look for variable and we're going to append string variable
name of our variable is query results
and what we're going to do for
this is just like we did in our logic app where i'm going to paste in some html
and after edit i need to add the id and then here inside my html
where i have something i want to click on we'll make that the title
and then we'll also add state
give this a different name so we know we're talking about
okay so we're taking our query results we're putting it into that variable for us
and then the last thing we need to do is actually pass that back over to our power virtual agent so
the bot has all that information in order to do that we just do one more thing here
we're going to add an output it's going to be text we'll call it query results
and in here we're going to supply the variable that we've been populating
in the steps above so we'll click variable query results
and that's it come up here save it
i'm also going to give it a different name here so let's change this name to uh get assigned
to query we'll just name that flow our power automate flow something a little bit easy to spot
because what we're going to do now is return back to our power
power virtual agent we just kind of click away so that we see our nodes here again
our blank canvas if i go to the plus to call an action
now instead of doing the create flow if i scroll all the way down
it doesn't have the name updated yet but this power virtual agent's
flow template is the one we were just doing
and you can see the query results are coming back that's what this field here means
okay so we're getting the information back from our flow
even though the name's not right here now we're going to add one more step to show the results
and we'll just choose our variables query results
do another save i'm always saving
and now we can test our bot simply by coming over
clicking on the bot which opens up the test
window down here in the bottom we can type in assigned to me
our bot's gonna go run that flow and comes back
and here it's not very pretty but these are the results if i was to click on this this should
oh i forgot to change this uh this url here so let's go do that real quick in our flow
if you remember where the no code demo is the name of our project we didn't change that here
we'll change that now we'll save it again
all right if we click on our link
it takes us to our work item now we can go back to our power virtual agent to our bot and
publish it be ready to use it in other places like teams or slack
or your favorite chat or website anywhere you'd like so that pretty much does it we've
covered four different things today we've gone over logic apps we've gone over power
automate flows we've done power virtual agents and they all talk to azure boards
passing us information that's important to us all in a no code way so i hope you enjoyed that
if you've got any questions feel free to reach out to me looking forward to talking to you bye