Codementor Events

AUTOMATION VIA AZURE LOGIC APPS

Published Nov 20, 2022
AUTOMATION VIA AZURE LOGIC APPS

INTRODUCTION

Let's start with a simple example what if you want to setup a flow wherein you can send a welcome message on clients email at the start of each month saying "Welcome to the new month, Thank you for your efforts and deliveries in the last month."

HERE WE GO

  1. Open portal.azure.com

  2. Search Logic Apps -> Click Add -> Fill in the details like Resource group (which contains all the resources and this logic app will also get created in that resource group. If you want to create new resource group click on it.) -> Just click review+create once details are filled. You have just create the logic app resource.
    Screenshot (156).png
    Screenshot (236).png
    Screenshot (238).png

  3. Now the main task is to create a workflow. Click on Workflows tab present in left pane.
    Screenshot (239).png

  4. Click Add and give your worflow a name , I have used "MailClients".
    Screenshot (240).png

  5. Click on MailClients once it gets created.

  6. Click on Designer tab in left pane.
    Screenshot (242).png

Now, you are ready to add your automation workflow in this designer window.

WORKFLOW CREATION

  1. We must add a trigger (to start our automation) as a first step in our designer window. Now triggers could be HTTP wherein you will be provided with a url which you can paste in your url bar and hit enter and your flow will start executing.
    But we want a scheduler trigger because we need to schedule message events for 1st day of our month.
  2. Search Schedule in Choose operation tab -> Click Schedule trigger available in searched results -> Click Recurrence.
    Screenshot (243).png
    Screenshot (244).png
  3. Fill in the details of when to start this recurrening events.
    Set Interval : 1 and Frequency : Month.
    Click on Add Parameter -> Add TimeZone and StartTime from list of checkboxes.
    Screenshot (245).png
  4. Fill in your Time Zone from list of timezones (I have chosen UTC +5:30).
    Fill in Start time in a format YYYY-MM-DDTHH:MM:SS (I have filled 2022-11-20T12:35:00) as I want to start my recurring event from Nov 20, 2022 12:35 P.M.).
    Screenshot_20221120_123723.png
  5. Now you have successfully setup the scheduler.

Next step is to add your mail account from which mail will be sent.
6. Click on + icon just below Recurrence connector. Search mail in search bar (choose operation) and click on Azure tab. You will see list of connectors related to mail.
Screenshot (247).png

  1. I choose Outlook.com from List -> Send an email (V2).
    Screenshot (251).png
    Screenshot (252).png

  2. Fill in the details and click save on top.
    Screenshot (253).png

You are ready with your workflow.
Just wait for the results, I setup my date 2022-11-20 (current date) & time as 12:35 P.M just to show you the results, you can setup 12:00 A.M on 1st of every month.
As you have saved the workflow, click on Overview tab on left pane -> Run History.
You will see the flow got successfully triggered and you can check your mail for the results.
01.png
02.png

Important Note

  1. Be careful while setting up the time, use formats as specified in the image below.
    ImportantNote.png

  2. You can add as many tasks in the flow using + and by chosing the desired operations ,like storing files in the azure databases, read webpages, posting notifications in teams channel etc.

  3. You can also apply conditions "Search condition" and choose if-else blocks to identify which flow to trigger based on the conditions. Also, loops, parsing and almost everything is available in logic apps, use connectors according to your requirements.

  4. Make sure the first step is always a trigger in your workflow and not any connector. Once trigger is added, add as many connectors like "Outlook" etc.

Discover and read more posts from RAMANDEEP SINGH
get started
post commentsBe the first to share your opinion
Suparna Arora
a year ago

Great Job. Each step is explained with great description.

Rohit Mittal
a year ago

Nice step by step process with screenshot, really helpful

Show more replies