How to Delete a Specific Email using Azure Logic App

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 move the specific email to a specific Excel File 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 the location where your logic app is stored. Then, click on "Create".
    Logic app
  • Here is the dashboard. Click "Logic App Designer".
    Logic app designer

Step 3

Now, click on the Blank Logic App.

Blank Logic app

Step 4

Configure the Email by signing into Outlook

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

Step 5

Configure the values.

  • Choose the Folder.
    Choose the folder

Step 6

Configure Control connector

Configure Control connector

  • Choose to create a condition
    Choose to create a condition
  • Add From Address is equal to and enter the Email address that you want to delete.
    Condition
  • In the True section, connect the outlook.
    Connect the outlook
  • Choose the operation as Delete Email
    Delete email
  • Add the Message ID
    Add message ID

The final workflow will be like this.

Final Workflow

Now, let us save and run the workflow.

Output

Run the Logic App

Run

Whenever we receive an email from the given Email ID, it should be deleted.

Summary

I hope you understand how to delete a specific email using the Azure Logic App. Stay tuned for more Logic App articles.