How to Mark an Email as Read When Logic App Performs an Action

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".
    Create a resource

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".
    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 the Outlook

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

Step 5

Configure the values.

  • Choose the Folder.
    Choose the folder
  • Then, Add parameter Subject Filter as specific keyword (Eg. Sales).
    Subject filters
  • Finally,
    New email arrives

Step 6

Configure Blob Storage

  • Then, choose an operation such as Blob storage.
    Azure blob storage
  • Choose to create blob
    Create blob
  • Connect the Blob storage account with this logic app.
    Connect to blob storage
  • Then, choose the Attachment ID, Folder path, Blob name, and Blob content.
    Create blob

Step 7

Configure Email for reply mail

  • Search for send a mail.
    Actions
  • Choose an operation.
    Choose operation
  • Construct the mail format with body, subject and To address.
    Mail format

Step 8

Configure Email for Mark as read

  • Search for outlook
    Outlook.com
  • Search for Mark as read.
    Mark as read
  • Map message ID
    Message ID
    Message marked as read

The final workflow will be like this.

Final workflow

Now, let us save and run the workflow.

Output

Run the Logic App

Run trigger

Its successfully run

Successfully run

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

Send

Finally, it successfully runs and moves the attachment-specific email to the blob storage container folder.

Outlook

After that, notification mail sent to given mail ID

Inbox

Finally, it successfully runs and open the reply email to outlook.

Mail

Now, the email is Marked as Read

Email marked as read

Summary

I hope you understood how to mark an email as Read when logic app processed an specific email attachment moved to Blob Storage using Azure Logic App. Stay tuned for more Logic App articles.


Similar Articles