Exciting times – The Microsoft Azure Logic Apps team has released a new designer for one of its cloud-based integration engines.
I have been working with Azure Logic Apps quite some time now and have also written the world’s first logging and monitoring service for it and I must say, the engine was and still is powerful, but there was so much I was wishing for that Microsoft should change.
- The designer wasn’t very intuitive when it came to complex cases with several conditions.
- To re-arrange the flow of the integrations was nearly impossible – the code view made it possible, but still… For those not used to the JSON structure it was hard to even get an understanding for what is going on.
- Did I wish to add a condition to an action? Don’t get me started…
- and much much much more…
Microsoft did some improvements during the last year, but unfortunately the old designer wasn’t good enough for us.
The new designer!
The first impression is good in my opinion! Let’s have a look what we get to work with.
Picture 1 shows the initial step, to create the trigger – The trigger decides when to start the logic app, e.g. is there a new tweet on twitter, or a new row in a SQL database. And it looks good! We immediately get asked what our trigger is and don’t get confused by a lot around, a good and fast search function helps us to find out what we can work with! But do not let us get stuck in the first step, let’s add a simple trigger, in my case with a twitter connector!
Nice! Once again, a surprise – not saying it is the best, because I didn’t work with it enough, but still good! We get an understanding of what we need to do to get started! We get help on how we use this and what we put into the input box – a query text, which we can validate on the URL described in the caption and we even get a “Change connection” button – helping us to use another Twitter account if we have chosen a test account and want to use a production account! The plus icon at the bottom of the picture let’s us add an action followed by the trigger.
Let’s move on.
In my scenario I want to listen to all tweets where I have been mentioned in and to add more complexity to it, I would only like to get notified by mail if the retweet count is larger than 2. These tweets would I like to get notified by email. So lets put @syron1988 into the QUERY TEXT field. And press the add icon.
When pressing the plus icon (add button/add icon) we get to choose between an action and a condition (see picture 3 below). Let’s us add complexity to it – we will use a condition!
As soon as we click on the “Add a condition” button we get a nice view explaining how to set up the condition – once again! I am positively surprised by the new designer! Intuitive way of adding a condition – see picture 4.
It is pretty much self-explanatory, which is a surprise compared to the old designer! Into the OBJECT NAME i put the retweet count variable from the objects list at the bottom of the page. The select box called RELATIONSHIP gives us the operator – what is the comparison we are using, is the value of OBJECT NAME greater, lower, etc. than the value specified in the VALUE field – as I said before, self-explanatory! Very nice in my opinion.
As soon as we have configured our condition we can continue looking at the bottom of the picture 3. We get to choose the “If yes” part, which tells us which action(s) to execute when there is a match and the “If no” part which in this case let’s us do nothing.
Lets add an action to the “if yes” part of the condition, by pressing the “add an action” button, which adds a new box, like we have seen on picture 1 letting us choose an action to execute if the condition has a match. In my case I select the “SMTP – Send Email” connector from the select menu.
Once again, we get presented by a form, letting us configure the SMTP connector. Simply fill in the pieces needed, SMTP Server, user, etc. and press the create connection button and we will continue with the last step – configuring what should be send to my email.
The last picture (picture 6) in my post, simply shows that the integration should send an email to my email firstname.lastname@example.org. The title of the email is “Tweet has been retweeted more than 2 times” and the email body is the text of the tweet that has been retweeted more than 2 times.
We are done!
The overall impression is nice and it took me less than 5 minutes to set up the integration… There is definitely room for improvement, but we are on a good path to a way improved Logic Apps designer!