okay this third section we're going to create a scheduled azure boards
status email using azure logic apps so in other words i want an email delivered to my inbox every
day that tells me something that i need to know out of azure devops so the first thing
we need to do is go into azure devops and let's make some changes i'm going to create a query
actually i'm just going to edit a query that i've already made earlier so if i go into queries i'm
going to choose the work items assigned to me query and i'm going to add a new column here
if you notice the columns that are in here they don't include the assigned to so i'll just add
that then i'll drag this all the way up to the top so it's the second thing in our list here
now we can see the assigned to so it'll show up in our query
and we'll see it in our query results i need to save that we'll go to save query
and now we're ready to move on to the logic app part so we'll go back into azure portal
i'm going to go back to my no code demo project in the overview screen here and if i go into
the same resource group that we're using so no code demo project i can see everything that we've
created so far which is just one existing logic app and one other thing that gets created along
it's an api connection from here we're going to create and just like before a logic app
it's already set up to go into the no code demo project we're going to give this a name
this is a workflow consumption zone redundancy review and create and then create
okay we're all set here now we can go to our resource
and what we want to do now is figure out how we want to trigger this thing
well i want it to go like i said on a schedule i want it to happen every morning so to speak so
i'm going to come down here and look for this option that says recurrence
and i'm going to change this from every three minutes to just
every one day now if i wanted to under the new parameters i could specify exactly what time i
want this to happen but one day is once a day is good for me for now we'll hit save
and then in our next step we're going to go into azure devops
and we're going to get the query results but which query you say well let's take
a look first of all let's connect to our organization and the project that we're using
now we need the query id well in order to get the query id
i need to go look at the query so let's go back into our queries
and we're going to get this work items assigned to me so we'll open this up now if i go to the
url and go all the way to the end you'll see that there's a guide here that i can copy
and then return back to my logic app and paste in
to the query id that's all it is it's just the good that you see in the url for that query
so we're going to get the query results let's give this a different name
all right now that we've got our query results we got to do something with it so we're going to
put those results into a variable much like we did previously so we'll go new step here
in variable initialize variable and we're going to call this just query results and
we're going to make it a string a string is just something some place that you can put text
and i'm going to go ahead and change the name here as well
go ahead and
this to something
that reflects the query results
next step do control for each
click in this field and then over here you'll just select the only option is value
what we want to do is actually append
the data so we'll go to variables and then append to string variable
our string variable is the query results
and i'm going to be copying over something i've got something in my notes here so i'm just going
to copy and paste this into our value here you'll see i'm going to just put in some html that
actually allows us to go straight to that work item if we click on it now there's one thing i got
to change here in my url it says change me what that needs to be changed too is if i go back into
my azure devops instance and just go all the way to the very beginning of the url we can kind of
look through here mine's called the no code demo project or no code demo so i need to copy this
and add that back into my url here
then at the end here after it says edit i need to add something else something from the dynamic
side of things so let's type in id because that's what i want to put is id and then here inside my
hyperlink text where you'll actually see the text to click on it what i want that to display
is title so we'll type title if we look here we'll see titles in there i think i also want
to include something else like state so we'll come over here and look for state
and even though i know they're all assigned to me i'm also going to add assigned to
because that should be coming over in the query all right
and let's give this a little better name
save that and there's only one more thing to do that's to go out here and add a new step
and we talked about sending an email i'm going to use
outlook there are other email providers you could choose from
we're going to use alphys outlook 365.
and then if i search inside here we're going to use the send an email v2 again you can use
a different email service provider we'll sign in here this is a very simple step
i'm gonna put in
where i want that to go we'll say this is our devops boards summary email daily
and in the body of the email what i want to include is
our query results so come over here to the dynamic typing query sort of
and then we'll hit save now there's one other thing i forgot to mention
anytime we've got a for loop we need to come over into the settings of that for loop
and change this
so the con concurrency is set to on and the degree of parallelism is set to 1.
and that's it
now i can actually trigger this to test it out just from right in here so we'll hit run
and here you can see our email we got the title we've got the state and we've
got who's it signed to and if we click on it it takes us straight to the work item
so that's pretty much it that covers our third step here where we're going to
create a scheduled azure boards status email using azure logic apps