>> Hey friends. Did you
know that you can build
workflows to drive
integrations between Cloud
and On-Premises services
in just minutes
using Azure Logic App
web-based designer?
Learn how, when Jeremy
walks us through building
an example from scratch that
will respond to events,
analyze data and communicate
with the rest of
your enterprise today
on Azure Friday.
[MUSIC]
>> Hey friends. I'm
Scott Hanselman and it's
Azure Friday and I'm going
to learn all about how
to do my server-less
enterprise integration with
Logic App with Jeremy Likness.
How are you sir?
>> I'm doing great.
>> Lovely. You're going to bring
me a demo that's just demo,
no slides, no nonsense just a
magical demo from scratch is that,
I'm told it's from scratch.
>> From completely scratch,
the only thing I did ahead
of time was authenticate
with some services.
>> I think that's fair.
>> So the rest of it is from scratch.
What could possibly go wrong,
it's completely Cloud-based,
Internet-based, live.
>> This is going to
work on the first try.
>> Exactly.
>> But really ultimately that is
the thing that's
supposed to work right?
Because Logic App has
all these great connectors and
once you've authenticated
things, it just works.
It's really really nice.
>> Yeah. That's the way
it's supposed to go.
>> Fantastic. Lets see it.
>> Cool. So what I've done is,
I went ahead and created
the host for the Logic App,
that's just you click
"The Plus Sign",
you say I want
a new enterprise integration
and it creates the hosts so
I saved you some time here.
But when we go into this,
it's going to be completely empty.
We've got a clean slate,
we even have a nice video
to walk through.
These are the ways we can kick off
that and there's pre-built templates
that you can scroll
through that are actually
full-blown workflows that are
out of the box integrations
with SharePoint,
Dropbox, third-party apps,
first-party apps,
a lot of different scenarios
that you basically start with
that template and then you just
plug in your credentials
and you're good to go.
>> If you wouldn't mind,
before you click" something,
scroll-up just a smidge to
look at those things that
you can queue off on these triggers.
I didn't really get
my head around this,
I thought about Logic App as
something that maybe
would run on a schedule.
>> Right.
>> Or maybe occasionally
a little bit of HTTP happened,
but there's a number of
reasons that you might
kick off a Logic App.
>> That's right. You can basically
trigger it based on
things like file uploads,
you can trigger based on a timer,
which is the use case
a lot of people use to
replace installed Windows services,
but there's everything, these
aren't even all the triggers.
>> That's right.
>> So I'm going to start
with a blank canvas.
>> Even better.
>> Because my trigger
is not part of this.
So I'm going to just go
to a blank Logic App
and you get this drag
and drop display,
and it's got some because
I've practiced this before,
these are some of the ones I've used.
So what I'm going to do, is I want
to trigger off a file upload.
So I type blob for Blob Storage
and I immediately get that step.
It's like Okay when a blob
is added or modified,
let's kick something off.
So this could be an ETL process,
in the enterprise.
In our case, we're going to go into
a container which I
think is going to give
away what we're looking for
here called images and I'm
just going to trigger off one.
I'm going to have a trigger
probably every 10 seconds,
so we can set a polling frequency.
There's also another way
that you can push
notifications in using
something called Event Grid.
So there's a polling mechanism
and a Push mechanism.
We're going to go with this one.
This is all I need to do for
the first step by the way.
I go straight into the next step.
Now what happens is,
it's giving me information about
the file that was uploaded,
I want to grab that actual file
and do something interesting with it.
>> Okay.
>> So I'm going to go back to
Blob storage and what I'm going
to look for is something
that's going to give me
the actual content of the file.
So we scroll through here and
there's get blob contents.
So this is going to get
us the actual bytes
of the file that was uploaded.
Now it's asking me, what is the Blob?
Because I was triggered
by that blob action,
it's given me a pallet of things
to choose from over here.
So I can just grab the ID,
that's the unique ID
of the blob and it's
going to infer the Content-Type
and we're good to go.
So now I have a file,
I want to do something
interesting with it.
What I'm thinking of doing,
is passing it through
our Computer Vision API
and doing some automatic
image analysis.
So we're going to ask it
to describe the image.
So I pick this step,
I've got to give it a source and
I can either point it to a URL,
if it's available
over the Web or I can
send it the actual
content of the file.
So I'm going to send it the content
of the file and once again
this is what I love about
the way that this is built,
is it automatically looks at
my previous steps and gives me
that palette to choose from.
>> So it knows about that context,
it's smart enough to know
not necessarily what
you're trying to do,
but the context in which
you're doing and it's
almost like IntelliSense.
>> Right. Exactly, and
it builds on that.
We'll see that in our new steps
because what I'm going to do here,
is do a condition and
in this condition we've just
scanned in the file we've
passed it there Computer Vision API
and we've asked it to
generate a caption.
So I'm going to look at the caption
texts that it generated,
that's going to be
my condition and I'm
going to be a little bit self-centered
here and I'm going to say,
if it contains and what does it
contain and I'm going to just go
ahead and type my
name Jeremy Likness.
So if it happens to contain
my name for whatever reason,
it's going to go over to
this true side and this true side,
what I'm going to do,
is generate an e-mail.
So I'm going to pick
this action and we can
"Search" for send e-mail.
That's going to pop up in option
here and just like before,
who am I going to send it to?
I'm going to go ahead and
type in the e-mail address,
this is the Live.com address.
For the subject of
the e-mail, I'm going to say,
you've been found in,
and I want to put the name
of the file that I was
found in because that's why
the caption would have my name.
So I'm going to come over here and
pick display name for the body,
we saw this and I'm going to
drop the caption text in.
What's really cool, is I
can add the extra content.
So I'm going to come down
here for a new parameter-
>> Okay.
>> -and I'm going to tell it,
I want to add an attachment.
>> The context is
flowing through this,
and the attachment then
comes through that context?
>> Right. So I need
two things for an attachment.
I need the actual content itself,
which is again going
to be the file content
and then it has to have a filename.
So if we do "Save As" I
actually got that backward,
let's get the name here,
just going to be the file name.
Let's come down here,
so there's the filename,
we put that in the name
and then for the content,
we're going to come down here
and we're going to do
the actual file content.
So that's good for that branch and
remember I have a true and false.
So that's if it finds
me, if it's false,
I'll add another
action which is going
to interestingly enough to be
another send e-mail action.
So this one, it didn't find my name,
so we're going to make
it really simple.
We're going to send it
to the same e-mail,
but this could easily be
a distribution list or
something in the enterprise.
So the scenario here is,
maybe we've uploaded
a new inventory item
and we need someone to
take action on that.
So we just looked at,
and again I'm going to come over
here and what did we look at?
We're going to come down
and grab the display name.
>> It's amazing how
it really picks out
the stuff that you would want.
It knows somehow.
>> Right. Exactly. It just
builds that context
straight down the pipeline.
So I'm going to put the caption text
and then the other thing I'm going to
do is go ahead and add
the attachments here as well,
so we have a nice file in place.
Again it's asking me for the name,
which we'll come back down and
scroll down to the file name.
Then it's going to ask me for
the content and we'll do the content,
that's going to be right here,
so see more content and that's it.
I'm going to save it. So I just
built the workflow in place.
The exciting part now
is whether or not we can
actually get it to work.
So let's take a gander at this.
I'm inside my blob storage right now-
>> Right.
>> -and it's waiting for
me to upload an item.
So I'm just going to click "Upload",
select the file and I have
this very descriptively named picture
one that I'm going to upload.
So we're going to click on
that and then just to
make sure that this runs,
I'm going to fire the Trigger.
>> Now, in this case
here you're doing
that rather than
waiting for the moment
where it notices that the blog
showed up and it kicks
the trigger off,
you're explicitly firing the trigger.
>> Explicitly firing it.
>> You don't need to, but you're
doing it to speed things up.
>> Yes.
>> So we can do that and it looks
like we've already had success.
Now one of the things I
love about Logic App,
is that we can
troubleshoot these apps.
>> Oh well.
>> This is showing me every
step and it's got this little.
>> There's a lot going on.
>> Yeah exactly.
>> A Visual Log.
>> So I can see exactly what came in.
It gives me the inputs,
it's given me all the information
about the picture that
came in and it's going
through step-by-step.
So if any one of these steps failed,
we would get diagnostic information
we could troubleshoot,
but I noticed I do
have a new mail here.
So that mail came in and it says,
this is what came in
and what we saw is a drawing
of a cartoon character.
So I want to try it with
just one more example.
I'm going to come back
here select one more file.
So we'll do this picture two file,
upload that, I'm going to
come back here and do-.
>> There's so many
things in our lives
that we could automate
and our business
processes that are held together
with batch files and wishes.
>> Exactly Batch files on which.
>> You can plug Logic Apps into
just make your life easier.
>> Yeah, that's right.
It's something that's very easy
to design and while this is
actually running this trigger,
I wanted to show you this
is actually looking at
the code behind a workflow
I designed earlier.
So this is not just pretty
images on a webpage,
it's actual code that
you can check in,
have part of a continuous
integration and DevOps process.
Look, we got a second mail,
picture two and this one comes
in and this is a close
up of Jeremy Likness and
a dog looking at the camera.
So I've officially become famous that
Azure's computer vision
can recognize me by name.
When I did this demo two months ago,
it just said a man and a dog.
>> It knows you now.
>> It knows me now.
Not sure what changed,
but it knows me now.
>> Do you think we should
feel good about that?
>> Yeah. It's a little scary.
So what's really cool about
this is we just did a tour,
Microsoft Ignite The Tour and we
were featuring tailwind traders,
which is our fictional
company and we were
showing examples of tailwind traders
of managing inventory.
So if you think about it,
you can do workflows
like kicking off,
we've got new inventory
items that need
to be scanned are investigated,
maybe we're doing
an audit and we need to
notify someone if a price
needs to get set.
So there's a ton of
possibilities and here I
showed you sort of a
tight-knit ecosystem.
>> Right.
>> This will equally plug into
third-party apps as well.
For example, if someone uses
Slack for communication,
you can have a come
into a Slack channel,
post the message and
the coolest part that most people
don't get about this as well,
is I can run a gateway on-premise,
create a secure connection,
and kick off workflows inside
my own Datacenter from a Logic App.
>> Wow and we've already got this.
This is the thing that I had
to keep reminding myself.
I kept thinking I should say,
"Well when did this come out,
and when do I get
this feature and what you've
just shown me so
amazing?" We have this-
>> Right here, right now.
>> You have Azure, you have this,
their pennies to do these things.
>> Right.
>> What could you go
and automate right now,
what batch file and wish do you have,
what process, what chron job but
have you created that really needs
to move into your enterprise?
It's that Internet workflow that we
see with things like
Microsoft Flow and if this,
then that on the outside
of Microsoft,
this is inside your enterprise that
can talk to your blob storage,
using your services, using your data
in a private personal way.
>> Exactly.
>> Fantastic. I love it.
Thank you for showing that.
Congratulations or worked in the.
>> Thank you.
>> I'm learning all about the power
of Logic Apps and how I can make
my life more server-less and even
better in the enterprise
today on Azure Friday.
[MUSIC].
