Build an Approval-Based Automated Workflows Using Azure Logic Apps

Azure Logic Apps

Logic App is a cloud-based service that allows us to react to an event in one service (such as SharePoint online) and do something with the data from that event into another service (such as Twitter). It makes it practical and simple for business processes. The users build workflows that automatically perform some business tasks and processes across applications and services. We can connect our business-critical apps and services with Azure Logic Apps, automating our workflows without writing a single line of code.

Before reading this article, please go through some important article links mentioned below,

Prerequisites

  • Microsoft Azure Account

Here, we are going to see how to build approval-based  automated  workflow using Azure Logic App

Follow the below steps to build a Workflow using a template.

Step 1

  • Log into https://portal.azure.com/.
  • In the dashboard, choose to create a resource and click on Integration. Now, select "Logic App".
    Microsoft Azure

Step 2

  • Enter the name you want to assign to the logic. Select the subscription and resource group where you organize the related resources and location where your logic app is stored. Then, click on "Create".
    Create Logic App
  • Here is the dashboard. Click "Logic App Designer".

Step 3

Now, click on the Blank Logic App.

Blank Logic App

Step 4

Configure the Email by signing into the Outlook

  • Search for Outlook in the search bar.
    Outlook.com
  • Choose the Triggers.
    Choose the trigger
  • Sign into Outlook.
    Sign into outlook
    Account details and login

Step 5

Configure the values.

  • Choose the Folder.
    Choose the folder
  • Then, Add parameter Subject Filter as specific keyword (Eg. Sales).
    Subject filter
  • Finally,
    Details

Step 6

Configure outlook for send approval mail

  • Search for outlook mail.
    Search for mail
  • Choose the action as send approval mail
    Send approval mail
  • Mapping To address and subject
    Mapping to address and subject

Step 7

Configure Control for checking the approval mail.

  • Search for Control operation
    Search for control operation
  • Choose condition as actions
    Choose condition as action
  • Choose Selected options is equal to Approve
    Select options

True

  • Then, if true, choose an operation such as Blob storage.
    Blob storage
  • Choose to create blob
    Create Azure blob storage
  • Connect the Blob storage account with this logic app.
    Azure blob storage
  • Then, choose the Attachment ID, Folder path, Blob name, and Blob content.
    Create blob
  • Configure Email for Mark as read
  • Search for outlook
     Choose an operation
  • Search for Mark as read.
     Action
  • Map message ID
     Map message ID
    Message ID

The Flow looks like.

Flow

False

  • If false,  then choose outlook for send reject mail
    Reject mail
  • Construct the mail
    Construct mail

The flow looks like  this

Flow

The final workflow will be like this.

Workflow

Workflow

Now, let us save and run the workflow.

Output

Run the Logic App

Run the logic app

Its successfully run.

Just sent the demo mail with specific keyword and refresh it to see the result.

Demo mail

Finally, it successfully runs and send Approval mail.

Request for input

If you choose Approve then.

Approve

It moves the attachment-specific email to the blob storage container folder.

Blob storage container folder

And also, the email is Marked as Read.

email marked as read

Its run successfully.

Run successfully

If you choose Reject.

Approval request

Then, you got notification mail for that you choose rejected request.

no file upload due to reject request

Its run successfully.

Run successfully

Summary

I hope you understood how to build approval-based  automated  workflow using Azure Logic App. Stay tuned for more Logic App articles.


Similar Articles