Hello all, welcome to
Serverless Days ANZ 2020.
We're going to see now how to
build intelligent bots using
Azure Logic Apps with no code.
Before we get into the session
let's have a small intro about
myself. So I am Jayakumar
Balasubramaniam working as a
Product Lead at Hubfly. I'm
Microsoft Certified Trainer and
a Microsoft Certified Developer.
You can reach out to me in any of
these social media platforms.
Mostly I'll be available in all
the platforms. Let's get into
your session. This is our
agenda for today, so we're going
to see what is Logic Apps, what is
a bot and what is the LUIS and
you're going to have cool demo
about how we can integrate all
these three in a single
platform. What is a Logic App? A
Logic App is basically this is
serverless solution, which helps
to build powerful integration
between various components like
Outlook or Gmail or Twitter or
Facebook, LinkedIn, or any of
the messaging platforms. The key
advantage of Logic Apps is
you can achieve all these, you
can passing the data between all
these components, or do any of
the transactions even post HTTP
call or anything are you can
integrate any LUIS or whatever
the stuff that you do
you don't need to write even a single
piece of code. That's a major
advantage of this Logic Apps -
they're no code platform.
And it's not only for the
cloud based components, even
you should be able to
integrate any of the on
premises components as well.
And as you know, the cloud is
pay-as-you-go model and
Logic Apps are not an exception
for that. Here you're
not going to pay for the app
that you're going to create or
not. You're not going to pay
for the connectors that you're
going to use, your just going
to pay only for the Actions
that being performed
by your Logic App. That's
another advantage of this Logic
Apps.
OK, what about in general? We
presume that bots are about 
a chat chat based system. Your
communication platform, which
runs without any human
intervention. Yes, you are
correct. But apart from that
a bot basically is a software
application which runs the
repetitive task or any of that
are automated task without
any human intervention also it
runs in a faster manner than 
if humans could have been
involved. Most of the traffic,
Internet traffic, that we have
over the Internet, all because
of this, bots like scanning the
contents of our web pages or
any social medias are like a
chat, chat based system that
interacting with the human
users like that.
These are the basic type of bot
that we have that we already
know like chat bots which is a
human based conversational
system which you already know
and some web crawlers which
crawl your web pages and some
social bots like to post the
content that you like or comment
or contents that we post in
social media platform which we
are going to see a cool demo
also right now for the same and
there are some malicious bots as
well. You need to be very
careful of that tile so like
which will, which wil scrape
your content and will be to
spread this. OK? What is
the LUIS? LUIS is a
machine learning platform
which is built by Microsoft
which understand the languages that
is given as an input text to
this system, and it extract the
meaning from it and it gives
you the output as an intent for
which, for which intent that
this specific input is matching.
Based on the output, in turn
that you get back, you can
perform any of the action
like calling any other HTTP
triggers for doing some
actions like posting a content.
You can do anything based on
that. So the major advantage of
using this LUIS system is you
don't need to train for
frequently, it rains on its
own. That's one of the key
advantage of using this LUIS
system. It trains on its own
based on the user inputs that is
being passed. For example, maybe
you train the LUIS system for
the specific intent, maybe for
some couple of,
couple of utterances, but going
forward when the LUIS is being
used in your system, the inputs
that are given to the
LUIS by the users so that it
will be trained on its own. So
for there are 13 languages
available across the world
for this LUIS language
understanding system. Let's see
some cool demo for the same by
integrating all these
components like Logic Apps,
LUIS and how we can convert
it as a bot in a cool demo so
that you get some better
understanding.
Let me go to my browser. OK, let
me come from the start. So this
is the LUIS system. If you see
the URL is LUIS, luis.ai.
Here, if you see there are two
intents I have configured like
interview and session. So if you
open up the intent number
interview I have already trained
this LUIS system to return me
the interview as an intent for
these two takes, like interview
with Simon or excited to be
interviewed. As I said earlier,
it doesn't mean that
this LUIS system will look
only for these two utterences
or these two inputs. It also
trained on its own. If you give
something relevant to this
input also it will return me
the output test interview. The
same like this session for
session. I have configured some
one more additional input as
well. Again, if you if it raises
some other additional inputs it
will train on its own and it
will map it with this session.
So that's the one key advantage
of this LUIS. It will train on
its own. Even if you want to
test it right away from here
you could be able to test it.
For example, I am giving some,
for example, excited to be.
inter
viewed
by the team.
Now you see I got the intent
back 'interview'. Suppose if I
talk something about the session
I will get back intent
'session'. So this is how we are
going to. The same thing we're
going to integrate into out Logic
App. OK, this is our Logic App
so. Which I have already
created. Let me enter into the
interface so that you get
some better understanding. I
opened my Logic App. Here if you
see I have used three major
connectors. Twitter is my first
connector which will look for
the Tweets for the hashtag
serverlessdays because we'll be
getting lots of tweets maybe
in a day, but we need one specific
hashtags so that I given a
search text hash serverlessdays
so it will look for the all the
tweets that comes with the
hashtag serverlessdays. Now my
second connector is, I mean my
second Action connected is
LUIS. I'm going to integrate
this with my LUIS system. If
you say have chosen my LUIS
bot name ANZ Bot name and
my LUIS bot name is also ANZ
Bot name.
Now the input takes that I'm
giving to this LUIS is the tweet
text, the tweet content that this
being posted I'm going to give you
this and give it as an input to
this LUIS system. I get, once I
give this input, the LUIS
system will process my input
text and it will return the
intent that the specific takes.
It understands the meaning and
it will return the intent in the
response so that based on the
intent that they get back top
scoring intent. I'm just
checking whether the intent is
matching to session. The
keyword session. Suppose if it
matching to session I'm going
to post it. Suppose if it
doesn't match to session, I'm
just going to retweet that.
This is all Actions that we are
going to perform.
Let me go one step backwards. So if
you expand this post tweet you
see I'm going to tweet their
takes with the hashtag, again
with Serverless Days ANZ
2020, and I'm going to give it a
reference for the first entity
that I get back. So and also if
you notice I am getting the
context of the first tweet till
the end of my Action. That's the
one power of this Logic App.
Whatever the Connectors that you
do, you will have the context of
all the data that is in process
still starting from the first
Action to the end of your
Action. That's why I'm able to
grab the username of the first
tweet that I captured in my
first tweet and I'm processing it
in my last Action.
Now let's see it in some real
action, so that you should be
able to get some better
understanding. So in a
nutshell, if you see I have,
I'm just looking for a tweet
and passing it to my LUIS
intent, LUIS based language
understanding system and based
on the intent of this system
and I'm going to decide
whether I'm going to post it 
or I'm going to retweet the tweet.
Let's run this.
I'm just running it now. It's
waiting for a new tweet.
I'm just going to post a new
tweet now. I have some
predefined text. So
let me post this.
I'm happy to present a
session at Serverless Days. Yes,
I'm very much happy about it
and also I'm I'm very excited
about this. So I have used the
hashtag hash serverless days
so that our bot can detect
this. Let me post this tweet.
Yeah, it's been posted now is it
is available now?
I have configured this bot
to run for every second so
that I can close the demo as
much as quickly.
Yeah, I have posted my.
So you see my tweet, yeah now it
started to processing when
a new tweet is posted it's
processing in 0 second and the
LUIS system process to my used
tweet text and it get get
back the intent in just one
second and after that the
condition decides it. Since I
have given it for session the
condition attended this is
true. So my bot should've posted
in another tweet by giving a link
to my current tweet. If you see
I have one tweet here. Now if I
go and refresh this page.
I have another tweet here. So since
my previous tweet is about
session, my tweet is my
bot has reposted it, not
retweeted, reposted. We get
comment at along with a link to
my previous tweet. Now let's see
another example which falls into
which falls into this negative
scenario so that it retweets it
instead of just posting it.
Now the team has already
organizing team has already
contacted an interview with
each of the speakers. I'm very
excited about the runway. I'm
very thankful for the team as
well, so I'm just going to
tweet about that as well. But
with the same hashtag, hash
serverless days. So I'm just
very excited to be the
interview by the event team
just going to tweet about it.
I have posted my tweet now.
Now, if you see again my Logic Apps
bot has started to process my
tweet and if you see it as
predicted and if you see the
expect condition to 
false because I posted something
about the interview right so it
should repeat it. Now if you see
the green tick mark it is, it
shows on the false category.
Now let's refresh this page.
Yeah, my tweet got retweeted. I
have used my own Twitter
account as a bot so you see
all the actions the same
occurred in real time. You can
create one specific bot with a
dedicated Twitter account and
you can do something like this
which tweets and retweets about
your about the based on your
logic that you are integrating.
So now we have achieved two
scenarios - They're: posting it
and really doing it based on
the tweet content that is being
captured.
So now we're done with how we
can integrate LUIS and Twitter
along with the Logic App and
project it as a bot. Now,
let's see how you can view the
history of this transaction. If
you go to the overview page of
this chat bot.
Of this Logic App, you can see
the processing second, whether
this process successfully or
not. All the track record you
should be able to see here. I'm
just refreshing it so to get
the latest records. If you see
it get processed it 2 times and
the processing time. If you see
it's just about 1.19 second,
you're very fraction of 2nd
right? So under time time limit
to create this bot is also a
very maybe as some within a 5
minutes I should have created
this bot. That's the power of
serverless, That's the power of
Logic Apps. That's the power of
LUIS. That's why you as a
developer's as a business, we
are moving towards the cloud
and main mainly towards the
serverless concepts, so where
you can go live within a
minute and within a fraction
of a second.
So that's all about for today's
session guys. Thank you for all
your time. Thank you
organizing team for giving me
this wonderful opportunity.
