In this video we will walk...through getting started with Azure logic
apps Azure Logic Apps allows users to create automated workflows
and use connectors to easily integrate with other applications.
Here is a logic app that we have already deployed we can use a logic
app designer to build-out
...our application with an easy-to-use interface this is currently a blank logic app...and we
can choose from various triggers integrating http calls twitter
o365, service bus and many others there
are also prebuilt template so we can get started with right away.
We're going to choose this template that we can start building
our logic gap. now we can start building our logic app
...let's say that we want to connect to an rss news feed...
I'm first going to choose a...schedule connector.
And, set it as an interval of every three minutes.
Then I'm going to add the rss connector.
Now I can choose this rss connector.
List all feed items and set to feed url here.
Now that this action is listing all of the
rss feed items I actually need to have a for loop to iterate through each
feed item I choose the body from the rss
feed items and I can rename my for each connectors for the purpose is more clear.
This rss feed
is pulling from different south korean news sources.
I want to be able to translate the title and summary for each rss feed item to english
that we can analyze the feed can add action.
And, notice how this action is still within the for each loop.
Search for translate.
And, we can see that there's a microsoft translator connector
...There are various actions that we can choose from we're going to choose a translate text action.
Here we can just specify the text that we want to translate.
And, we can actually choose from dynamic objects that
we populated from the previous actions so here we can see the feed...title.
I want to set my target language to english.
And, also renamed the connectors to something that's more indicative of what we're doing.
I just added the same action but instead of translating the title here were also
translating the summary by adding
this text translation connector actions I'm connecting to a cognitive services
account and sending the title and summary to the cognitive services texture...aps.
Now I want to structure my data and customize it.
And, adding the compose connector which is actually going to allow us to form
a jason object using the elements from our...item.
...input we have pasted that structure of the j saw that we want
per summary I'm going to choose the translated text
from our summary action above and for the title I'm also going to choose
the translated title output from the action above.
As you can see this is
a valid jason object and I've defined it right here in this box by
signing the dynamic objects from previous actions is values.
Not only a structured data we want to write it somewhere this is where
the cosmos database connector comes in handy.
As we can see the causes database connector offers various actions such as creating
...updating the document deleting a document getting documents
or querying documents in this case I want to be able to write each of my
rss feed items as a document into my database so I'll choose this action.
Name my connection we can see that it has a very populated
with the different cosmos to be accounts it is about to choose this
...database account and now we are connected to that database account you can choose
the database.
Here we can actually insert the output of
the compose operation we have structured data into a json.
So, far we have connected to it ourselves speed.
And, for each
...item we have translated it and bring it to our cosmos database now
let's say that I want to listen in on this feed for news about Azure.
I can add this condition connector which is basically acting as
...statement I can define a condition.
If the translated summary.
Contains.
The word Azure.
Then I want to send myself an email
with this article we have our office three sixty five outlook connector.
And, one of the actions that I can choose from.
...send an email.
We have now connected to our outlook I'm going-to send an e-mail
to this address with the subject being logic app.
Alert.
For the body of the email I want to send the translated title.
And, the translated summary.
Now we can click save now that we built our logic out let's try running it we can click
one right here.
If we navigate to the overview section we can see the runs history.
Here we already see that a run has succeeded.
By clicking on the
run we can actually review it and see all of the inputs and outputs for each step.
Here we can see the items that were pulled from rss feed we can see there
are fifty items pulled.
Then we can see that the title and summary were translated from creating english.
Our json object was composed successfully.
We...also able to insert...document into our cosmos database.
I've navigated to the cosmos database that we were connected to other logic app to check
...documentary...successfully.
Here we can see all the documents...the populated from a logic app.
Here we can see I received an email from our logic app workflow with the title
and the summary we can see that as your has been a key word inner summary.
We have just walked through our logic app workflow and seen each
step completed successfully and we were able to create this workflow in a matter of minutes.
Now let's look at another use case.
I want to do the work flow than just twitter data if I...twitter and
search hash tag as your I can see the related treats and posts.
Now let's look at how we can do this from a logic app workflow we have already created.
This app has a twitter trigger is listening for tweety posted containing hash tag
as you're essentially the same thing that we just did manually now we
want to translate these...english using the text translator connector.
I also want to detect the sentiment of these treats so I added
the sentiment analysis connector which is sending the text directly to the text analytics
api I will receive a score in between zero
two one zero be negative one being positive then I
...as your function that is actually making a call to the
text analytics api to retrieve the key phrases from the
...I also have some custom code in my function that is parsing the data received from the call.
Now that we have all these data points we can write to a our
by streaming data set this our
by connector allows us to connect to work space and a data set.
We can see the fields for the data schema which we set when creating our data set now
let's say my team wants to be notified for negative treats I can set
...if condition so whenever a sentiment analysis score of a tweet has a sentiment
of...zero-point-three it will be posted into a teams channel.
We navigate to our teams channel we can see that the negative
...posted to the logic up workflow.
I've navigated to the our by dashboard that we have been writing
...from my logic from this report we can see the exact rows we have
...our data set we have the key phrases that we extracted location of the
tweet, the sentiment score as well as a pretext we have also
built some visualizations from the data sets that we can track the average sentiment as well as geo
map between data this graph is showing us the average sentiment score.
This is telling us...count of tweet by location in
this visualization is actually showing us the number of tweets being tweeted
from each location and the average sentiment the lighter the color the lower the sentiment.
In this video we have walk through how to create a logic app workflow from scratch as well
as a popular twitter sentiment analysis use case.
We highly encourage that...navigate the Azure portal and start working with Logic Apps today.