Azure Logic Apps Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Hey this is great content and well polished for a first post. Keep it up!

👍︎︎ 4 👤︎︎ u/dave007 📅︎︎ Jul 15 2019 🗫︎ replies

I just wanted to stop by and say thanks for all the feedbacks so far. You guys are great!

I do know I still stutter a bit and blabber every now and then but not going to lie, as non native speaker this is challenging, so I can only promise to get better in time :)

👍︎︎ 3 👤︎︎ u/AdamMarczakIO 📅︎︎ Jul 15 2019 🗫︎ replies

Are you planning an azure fundamentals, quick overview/primer episode? I am really excited for this series. Thanks!

👍︎︎ 2 👤︎︎ u/emeria 📅︎︎ Jul 15 2019 🗫︎ replies

Great video, thanks!

👍︎︎ 2 👤︎︎ u/sago 📅︎︎ Jul 16 2019 🗫︎ replies
Captions
hater so this time we're gonna get introduction to other logic gaps because when it comes to integration across multiple services in nature there is actually no better service than other load gaps in human it's time I'll explain you the basics of logic gaps how can you use in your projects to speed up the development so stay and find out how so what is slaughter gap service it is a service that Microsoft created that allows you to schedule automate and orchestrate tasks but this really means is that you are creating a floss that represent your business flows maybe your scheduling and ETL maybe sending an email integrated with SharePoint or maybe a blob storage there's a lot of scenarios that you want to automate and logicals allow you to do that if you would look at the definition from Microsoft it's basically a workflow service that allows you to create something called enterprise integrations so let's start by talking how logic app works first of all you always have an action every step of logic app is an action so it's action followed by an action followed by an action pretty simple right but of course logic apps are much more flexible and they allow you to create much more complex solutions by introducing an action than in reality it's just a condition so you can have a condition not mad path and then execute actions based on that or you have a condition that was met and then you exactly different action but let's get back to our simple example in this example we have a free actions so let's make them a little bit bigger let's move this to the side and change the color so it doesn't interrupt what we were about to say so every action has an input and an output and this goes for every single action so in case of simple example let's imagine for a input we got an person object and from the person object we extracted two properties H and a name that's going to be our output in a first action what's great about this is that we can use now age as an input to the next step so now we are able to make some additional logic based on an age maybe calculate is this person an adult and now we have additional output which we can use in a further steps as an input but this is not where it ends because logic gaps allow you to also grab output from previous steps like for instance the name this is very powerful feature because you are now able to combine multiple outputs from multiple steps and create more complex logic so let's get back to the example so we have a certain set of actions but we need to somehow start those actions so in order to start action let's get into that example how to do that so let's remove the last step let's move this a bit down and let's talk about starting of a logic app so first action in a logic up is actually called a trigger because it's an specific action that invokes entire flow this trigger can be called by multiple sources maybe it's a web request maybe it's a schedule based trigger or maybe it's just an office 365 even or maybe it's just a blob storage event where there's a new file so this is actually not even that because there's over 200 connectors that you can use for your integrations there's a lot of a lot of things that you can actually use here so what do we need to do to actually get this started let's consider simple example with a web request we have a web request we have a trigger that is basing on web requests and following an action if you would just move this a bit aside and replace the trigger with a block that looks like this when HTTP request is received and replies the following action by request response that simply said is the most simple logical but it can build and this is the one the first one that we're going to be building today let's actually do this example so our first demo that's going to be happening today is this we're gonna have a user that's gonna be shooting to the web request and gonna get a simple response so let's switch window now this is a portal adjourn in order to create resource we're gonna hit creed resource button here type a lota gap select the first thing that pops up hit create for creation of logic gaps there's not much that is required you need to provide it a name and I'm gonna call it HTTP because this is the demo that we're going to be doing you need to select a subscription and a resource group so I'm gonna select a resource group that I created previously I'm gonna leave location as default but you can always change it and for now we're gonna leave log Analytics as off so hit create provisioning of logic apps takes about 10 seconds once it's done you can go and hit go-to resource so let's go to the newly created resource I'm actually gonna hide this panel because we no longer need it so when you finish creation of logic apps you are pro immediately move to the logic app designer this is your editor where you're going to be creating logic gaps what Microsoft gives you is this first panel with an introduction to logic ups video which is also great you can also start with some common triggers those are the most common use cases for logic gaps but of course those naar those are not the only ones and below you have a lot of templates that you can use out of the box notice how many of them are there are some for Twitter Instagram Dropbox or dynamics web request service pass etc etc so we're gonna start with a blank logic app when you're moved here this is the designer demo we're gonna be spending most of the time with since we want to create a web request we just need to type request and select the first thing that pops up and now we need to specify what kind of request is this so there's gonna be HTTP request that is being received so I'm gonna select it notice what hills do we have here first of all HTTP POST URL and it says we're gonna be we're gonna get and request URL after we save this but it actually says HTTP POST right for our demo let's get make a get request so we can actually paste it into the browser you do that by hitting this add new parameter select method unclick and you get new method here and select get now even though it says HTTP POST URL you will be able to invoke this by get request and now since this is configured let's hide it and click new step so we now need to respond so let's type response notice on the below we have a request response this is an action that will respond to the user whenever the URL is hit so we want to respond with 200 which is success and maybe as a body let's say hello world and hit save our logic app was saved so first of all let's test it you can always test it by using Run button so let's do that as you see our logic apps just finished it didn't take a lot of time let's see what happened in this step you can see on the right hand side the status which was successful and in that this step took under one second that's why it says zero seconds so you can always check if every step here finished successfully in this step you can see that there were inputs and outputs this is something we already mentioned before so the input was a CAD method no schema since we didn't pass anybody and the output was just a bunch of headers because we didn't actually have any output out of the box let's hide this and there was a response we responded with a status of 200 and hello world the input is something we inputted in the designer therefore you see what we did this is a great way to inspect what was passed if you have some dynamic parameters so if this actually works we can go back to designer click on HTTP request and notice that this says now HTTP GET URL because we saved it so let's grab this URL it's a long long URL that you can pretty much copy into the browser I'm just gonna paste this URL here and hit enter notice that we got our response hello world which actually means everything is working just fine so when we go back to logic app let's actually get out of designer for a minute and go back to load gap you can go back to logic up by hitting this breadcrumb here and this is how logic up look in a portal there's a lot of good stuff here but for now let's focus on the run history here if we hit refresh now notice that we already have two successful run the first one once when we tested it and the second one when we hit the browse in URL when you click on it you get the same screen that we've seen moment ago with a full execution of our logic app this is the powerful login mechanism that is within logic apps that you can use for your debugging purposes and of course from the most important stuff here you have always logic app designer logic app code view so whatever you've built is actually a code so we can later save it and use it to migrate to other environments or maybe just version it but when it comes to versioning other also gives you a small versioning systems here so whenever we save a large gap a new version is being created so it can always word or see what were the versions so since we actually created this very simple scenario this here one where we send a user and we send a web request but this one was I would say too simple for our taste so let's go back to our designer and edit the first step maybe we want to add some parameters because we don't always want to say hello world so you do that by clicking relative path since this is a get request we need to pass a parameter in a URL and in the URL you need to specify relative path parameter our parameter is gonna be called name which means as a part of your L we want to send the name of a person when you unclick this and click Save notice something interesting first of all your URL just changed and if you scroll to the right a bit you will see that URL now has invoke and a parameter name so if you copy this URL and go back to our browser window let's paste this URL and replace it by name maybe an atom it worked but nothing really happened because we just passed the parameter but we didn't do anything with that parameter so when you go back to logic apps designer we hide this and go to response maybe you want to respond with a name notice something interesting since we created the name this name is now available as a parameter for us to use in further steps this panel on the right hand side always has a list of parameters from the previous step as it says when the HTTP request is received that was our first step and a bunch of parameters that were result of that step so let's remove world here and notice something also cool I am able to type here a text and combine with parameters this is powerful feature that allows me to create a complex logic so let's hit save and go back to our example so let's hit that URL again notice that our response now was hello Adam this is because of course we were able to pass and use a parameter in our flow so when we go back to response maybe do something more complex so we just finish this example maybe we want a bit get a bit more complex let's maybe save every request that we created on the blob storage plop storage is a powerful service that allows you to store files as you can imagine we don't have a blue blob storage yet so we need to create it so we hit create resource we can type storage account but it's also here in case you notice so I'm just gonna hit it in order to create a storage account you need to provide a resource group we're gonna create it in the same one that we already have you need to provide a name so there's gonna be a for e logic up HTTP notice that this is a public dns which needs which means this URL has to be unique around the world so I'm just gonna hit review and create but before I hit create it's always nice to verify the location if it's in the same location as your logic app I'm going to hit create provisioning just finished so let's hit go to the resource and this is our blob storage I'm gonna hide this and notice that you have a lot of stuff in here but I'm gonna click on services because we need a blob service and we first always need to create a container which is like a partition for our files so I'm gonna create container it's gonna be private because we don't want external people to access our files and I'm gonna call it log so basically this is gonna be our container containing all the files from our logic up execution since we have this set up we can actually go back now to our logic gap you can do it multiple ways you can either by typing in a search bar by going to resource group and going to the logic app or just making some pin shortcuts on your dashboard so now in the designer let's go back to designer let's hide this panel because we're gonna get a bit more real estate and let's hit this button here insert new step this will allow us to add a step between a request and a response and add an action so since we're gonna be creating and blob storage integration we just need to type a blob first thing that will pop up is our true blob storage this is a connector that allows us to work with blob storage accounts without actually need of a technical knowledge so let's hit it and we need to find an action that is called create blob because we're gonna be creating new files first thing that we need to define is a connection because our logic gap is a public service but our blob will is private service since we created a private container so it needs to know how to authorize and authenticate to this blob so we need to define a name so that's going to be our blob connection and we can either hit here because we already have access to our blob storage or if this is external blob storage you can enter connection information manually for now I'm just gonna hit this and click create what utter does for us right now is connecting to this blob storage and grabbing blob storage name URL and an access key in order to create something called API connection so this is a safe connection information which allows logic apps to connect to blob storage in the future our connection has got saved so since we want to create a blob first of all we need to select a folder a folder is pretty much a container and then a path to the file so let's hit it and select log this that was our container that we just created we need to specify the blob name so maybe I'm just gonna use a name but we need an extension since those are files so I'm just gonna add txt we need also some sort of content so let's just type hello world and a name but instead of world let's use a parameter notice that it says we don't have any parameters but it's just hidden so we need to create hits show more click name so now this if this works this means when we hit save and we go back to our URL and run it again that means if we go back to logic app we can of course validate if this runs successfully by looking at the log so let's hit the newest run it's going to details see create blob was successful that means for input we've passed it the name of the container the name of the file and the content as an output this step told us that that this is the ID of the file this is the name of the file this is the path to the file this was the modification date and a lot of other information those are the outputs that we would be able to use in a further steps so if this actually worked we can go to our resource group and go pal go back to our storage account go to blob load container and see this is our file atom txt in order to validate it actually code created correctly you can always also click on it go to edit blob and see the contents this is great let's go back to our logic app let's do something a bit more complex since we created already this scenario maybe let's create another scenario where logic up reacts to the new files on a blob and after new files appear it will send us an email maybe let's do that with an outlook let's do that right now in order to do that we will need another logical because this one already has a trigger and it's an HTTP trigger right now we will need a trigger that reacts whenever there's a new blob to do that we go to new resource type in again logic app hit create we need to give it a name so again that name is just fine of course I can add my prefix that I did the same previously it's always too nice to be consistent so you have some sort of naming convention again select a research group a resource group lead location the same leave log analytics off and hit create the deployment is now in progress I can go our ready to Maui resource group and we have a to load recaps notice that because I actually kept the condeming convention there nicely aligned and I know very quickly that this is a blob and this is HTTP logic gap so go to blob storage as usual you're prompted with an empty designer so let's start with a blank logic gap and let's type blob but as you see we don't need to type block because we already worked with the blob connectivity another remembers that for the cook so we can actually hit other blob storage here and there's only one trigger which is called when the new blob is other or modified so let's use that so notice that I also don't need to define the connection anymore because it already has saved a connection in our research group called blob connection so right now you can just click on the show picker and select lock container so it says whenever there's a new file added or modified inside of the lock container do something but check it only once every few minutes so this is not really even based it's just a silky are action that will execute every three minutes and check it for the new blobs so if this works we can now actually add a new step and we want to send an email in this example I'm just gonna use my private outlook account that I use for demo purposes which means I need to search for outlook you're going to see a couple of things here first of all if you're testing with an account that you have for your company that's going to be probably office 365 outlook but if this is a private account life ID then you need to use outlook com so I'm gonna use outlook comm and I'm gonna scroll down because I need to send an email you can always search in' in this bar but i just found it so hitting send an email it says that i need to sign in to outlook and this is the similar case that we had with a blob storage in order to send an email logic app needs to know how to authenticate to outlook so it can send an email we need to click sign in in this case I'm gonna move this window here because I already logged before this demo into my Outlook account so as you see I can already picked it here once you do that logic app again creates a connectivity API connection in your resource group that you can use in all the other steps so I'm just gonna send email to myself that's gonna be my static to address what would be the subject so let's type a new file cold in the name of the file notice how easily I'm able to pick up the name of the file in case some of you wonder even though this says a list of file names this is just the type of from Microsoft side this is not the list and if you hit on the body let's maybe send the URL of the file so you go to file add and nuke it on path so is this possible that this works well it should but in order for this demo to be a bit more speedy I'm just gonna change the frequency from minutes to seconds don't ever forget to change that back because logic gaps are expensive you should configure them this way so let's hit save so right now we have this demo here we have first of all our URL and I have already opened my email so let's hit create with Adam maybe create a Tom and maybe John so if this loader gaps right now works notice that we already are getting emails we got a new file called Adam txt file was saved at log slash Adam dot txt so we created also John and Tom that means in couple of seconds we should also get those emails see we already got them but in case something would not work you can always go back to your logic app refresh here and check the execution if you missed some steps there's a powerful feature that will also tell you if you mess something up let's go back to our diagram as you see we are able to implement something called function chaining using logic apps it looks even better as a nice diagram using vision and that's pretty much it but before we close let's not forget one thing in our logic apps in the designer we've said to check for a blob every three seconds remember to change it to minutes because logic apps might be sometimes expensive if you overuse them they're very good for infrequent tasks but they are perfect at it wow that was quick in just couple of minutes we created integrations with blob storage we created a restful endpoint and it didn't require us to have any technical knowledge this is why logic apps are so powerful and you should use them in your own projects so if you liked the video hit the thumbs up if you really liked it leave a comment let me know what can I improve and if you want to see more click subscribe and see you next time [Music] you
Info
Channel: Adam Marczak - Azure for Everyone
Views: 135,258
Rating: undefined out of 5
Keywords: Azure, Logic Apps, tutorial, azure logic apps, logic app, enterprise, integration, enterprise integration, workflows, workflow
Id: ZvsOzji_8ow
Channel Id: undefined
Length: 26min 14sec (1574 seconds)
Published: Mon Jul 15 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.