Azure Logic Apps: automating repetitive tasks to increase your productivity

Image for post
Image for post

Si quieres leer la versión en Español de este artículo, haz click aqui.

With Azure Logic Apps, you can quickly build scalable workflows that integrate apps and data of several cloud services and on-premises systems. This post is the second delivery of a series of posts about Azure Logic Apps:

  1. Intro of Azure Logic Apps.
  2. Easy connecting with know services and send automated replies to emails, based on customized criteria defined by you.
  3. Automating repetitive job tasks to increase your productivity.
  4. Connecting to different Public Social APIs to develop a piece of your app.

In this post, you will learn how to develop a fully-working application in just a couple of minutes.

Gotta catch 'em all (the leads)

We are going to put on Sarah’s hat, an employee of a small firm in Austin, Tx. Sarah and her coworkers use Salesforce to register all information related to their business, and Slack to communicate within the company.

Sarah’s boss wants to track all people who expressed interested in their business, and the actions they’ve made to convert that opportunity into a real sales operation. For this, they create a Lead in Salesforce, with all the information they have about the customer. But her boss doesn’t have time to review all this info in real-time. As such, Sarah and her coworkers have to notify directly to their boss all changes in these Leads, which duplicates their daily work.

Sarah has an idea to automate this, let’s hear it.

Every time we create or update a Lead in Salesforce, why don’t we automate the delivery of a Slack message to our sales channel with the new information?

How hard would that be? Well.. as you might have figured out, with Azure Logic Apps you can integrate these two systems in a couple of minutes.

Navigate to the Azure Portal.

In the left pane, click the Create a resource button and search for Logic app, or click here. Name your new logic app, choose a subscription, and click the Create button.

Image for post
Image for post

Once your app is created, navigate to its home screen. Scroll down and choose Blank Logic App under the Templates section.

Image for post
Image for post

Note: if you want to see a great step-by-step walkthrough of Azure Logic Apps, go here.

Now you are in the Logic apps designer. Search for the Salesforce trigger and choose it.

Image for post
Image for post

This trigger has two options available to initiate our app. Choose When a record is created.

Image for post
Image for post

Note: due to only one trigger can be chosen, Sarah will have to create two apps if she wants to generate a message every time a Lead is created and modified.

Connect your Salesforce account with the Logic app by clicking the Sign in button.

Image for post
Image for post

Note: in case you don’t have a Salesforce account, you can create a Developer account by clicking here.

Now configure the Salesforce trigger to activate when new Leads objects are created. Notice that the app will check for new entities in your Salesforce account every 3 minutes.

Image for post
Image for post

Next, click the Next step button and configure a new Slack action in your app to Post a message after a Lead is created. This message could, for example, be posted with your user to the #new-leads channel, and contain all the information related to the new Lead.

Image for post
Image for post

In case you are asking what those blue boxes are, they represent dynamic content that we added to the Slack message. You can add any content that comes as a result of the previous actions in your app.

In this case, we have access to the full range of properties a Salesforce Lead contains

Image for post
Image for post

And that’s it! In just a couple of minutes, Sarah (and you) has created a fully-functional app that will send a Slack message every time a Salesforce Lead is created.

Feature request

The boss is really amazed by what Sarah did. But, like all bosses, she now wants something extra. She only wants to receive notifications for Leads with an annual revenue greater than 50k, as she doesn’t want to be bothered with the rest. Is it possible?

Of course it is! It’s just a matter of adding a condition before sending the Slack message, executing this action only if the criteria is met. We have already learned how to do so in a previous post.

Image for post
Image for post

As we have seen, Azure Logic Apps is the right choice for rapid development of applications crafted by people with little/no coding experience. In the next posts, we will focus on more complex use cases best suited for advanced developers. Stay tuned!

🎉🎉🎉

Written by

I like to create things, therefore I code

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store