Azure Logic App is a managed service that provides Azure's Serverless Architecture that you can use to allow users to create an automated workflow across multiple applications and services with minimal steps. Though in the logic app, most of the features are UI based, custom code and development flavor can be included. Microsoft is investing strongly in this technology, introducing many new connectors in line with the demands of the integration requirements of enterprises.
Steps to create an Azure Logic App
So, our target is to create an Azure Logic App so as to create an item in SharePoint Online list. And, the app will be triggered when an email is received in a specific email account. The steps to create the Azure Logic App are given below.
- Go to the following link.
- Log in with your credentials. You will get your Azure dashboard.
- Now, click on the "App Services" link from the left navigation.
- Then, click "Add" button.
- Next, search for the Logic App. You will get related results with the option to create Logic App.
- Here, I got the first item as per my expectation.
- Click on the item “Logic App” and the interface to create logic app will aprear.
- Input your logic app’s name. The name should be unique.
- Select a Subscription from the drop-down. This is to use the subscripotion methods which you already registered for.
- Select an existing Resource Group or create a new one. These resource groups are created under Subscriptions.
- Select the prefered Location. As per my client's requiement, I have selected the West US.
- In the 5th position, there is Log Analytics which is selected as “Off” as default. But if you need to trace the log, you can make it “On”.
- After completing all the needful, click in the “Create” button.
- It will take a few moments to create the logic application and will open the “Logic App Designer” window.
- Here, some built-in templates are given which can be used for different type of triggers and actions. Or we can use the Blank Template to build one as we like.
- Now, my target is to trigger the app by getting an email. I am selecting the option “When a new email is received in Outlook.com”.
- This will open a window which will get us options to set the settings for the email connector configuration.
- You can change the interval of the Logic app’s run time in position 1. I have selected 3 minutes for now.
- Select the folder of your email box in the position 2, default it will be inbox. You can change it if you want.
- Position 3 is optional. You can provide an email address on that position or it will use the login user address as default.
- If you want to trigger the app only from some specific email address, you need to provide those email addresses in the position 4.
- In the position 5, you can set a condition based on the importance flag of the email. There are several options for this condition you can set, but this condition is optional. So, you can i
gnore it. - You can also ignore the 6th and 7th position option as these are optional. And in the 8th position, you can set a condition as if the subject line would have a specific string the app will be triggered.
- After providing these inputs, the triggering condition will be set. Now, you need to create a new step by clicking the option “New Step” under current portion.
- By clicking the “Next Step” button, some option will be given for add an action, add new condition and more.
- But as we don’t need any further condition, we will select the “Add an action” and a list of activities will be given. You can select any one from here.
- As my target is to create a new item in a list, so I select the “SharePoint – Create item” action.
- This will give you some option to configure your action.
- First you need to connect with your account which have write permission on that specific site and list.
- Here, provides the site’s name in the portion 1. And select the targeted list name where you want to create the new item in the position 2 from the drop-down.
- Now, you will get the list’s columns from your list. As I got the field “Title” and “email Body” as my list column’s name.
- Now, you can insert the dynamic content by putting them from the dynamic content helper as the position 5. Even you can provide static value in your fields. As per my business, I provided Email Subject in my Title field in position 3 and select email body in the position 4, my list column body.
- Now, you can add other condition or action if you want. But as my business is completed, I am clicking the option “Save” from the top bar.
- If there is no required field empty, the Logic App will be created and saved. You can get the app from your Azure “Dashboard” or “All resource”. You can edit it again or turn it off or else if you want from here.
- Now, we can test it by sending an email to the selected email address. As I have selected my email box, I am checking with my email address.
- An email has arrived on my email address and the Logic app has fired in 3 minutes interval. And the time of its crawling, it got a new email and triggered the Logic app’s action.
- Now, we have to wait 3 minutes to get the Logic app to work. As we have selected the interval as 3 minutes or we can run it manually.
- So, after 3 minutes, we see that a new item has already been created in my targeted list.
- And, if we check in our SharePoint list, we will see that same data has been inserted.
- You can also check in you azure portal for the Logic App’s details.
Conclusion
There are many more features in Azure Logic App that can be helpful for achieving other goals. Microsoft Flow is built on the top of this Logic App engine. Also, we can use Logic App as a workaround for SharePoint deprecated feature “Email Enable List/ Library”.