Skip to main content

New Page

Capture Email Body from a New Email Trigger

This tutorial will create a new Power Automate Flow triggered by a new email in the account ib-notification@8mlw67.onmicrosoft.com. The email body will be captured converted to plain text and stored in a Compose object

Create a new Power Automate Flow

  • Go to https://make.powerautomate.com/
  • Click Create from the left navigation pane
  • Click Instant cloud flow from the Start from blank category
  • Click the Skip button
  • Give a name to the flow by renaming the Untitled on the top-left corner of the screen. Set the name New-Email
  • Click Add a trigger and search for new email
  • From under the Office 365 Outlook group select When a new email arrives (V3)
  • Click the Change connection to add a Target 365 account email
  • Click the Add new button
  • Click the Sign in button
  • On the new short browser windows login with the ib-notification@8mlw67.onmicrosoft.com account
  • Collapse Trigger properties with < icon

Add the Variable action

  • Click + to Add an action
  • Search for Initialize
  • Select Initialize variable from the Variable group
  • Name: var_email_body
  • Type: String
  • In Value select the Power-Automate icon to enter data from the previous step
  • Select Body
  • Collapse Action properties with < icon

Add the HTML to text action

  • Click + to Add an anction
  • Search for Html
  • From the Content Conversion group select Html to text
  • Click Create new
  • Click inside the Content field and select the Power-Automate icon to enter data from the previous step
  • Select var-email-body variable
  • Collapse Action properties with < icon

Add the Compose action

  • Click + to Add an anction
  • Search for Compose
  • Select 'Composefrom theData Operation` group
  • In Inputs select the Power-Automate icon to enter data from the previous step
  • Select the The plain text content
  • Collapse Action properties with < icon

Save and Test the Flow

Click the Save button to save the Flow. Click the <- Back arrow on the top left corner of the screen. The following pop-up appears:

microsoft-365-notification-flow-ready.jpg

Click the Got it button. This is a trigger that is Automatically activated. So manually running it with the Test option will not work. The Automatic attribute can be viewed by clicking the My flows from the left navigation pane

microsoft-365-notification-flow-status.jpg

Send an Email

We send an email

To: ib-notification@8mlw67.onmicrosoft.com From: salam@dcl-online.com Subject: Test Email Body: Test Email from salam@dcl-online.com

Check Flow history

On the Power Automate home page, from My flows we click on the newly created New-Email flow. In the 28-day run history section, we see a new entry:

microsoft-365-notification-flow-msg.jpg

We click on the Date/Time entry below the Start column. We get the following page with a successful run notification

microsoft-365-notification-flow-msg-2.jpg

We click the Compose action to check its detail

microsoft-365-notification-flow-msg-3.jpg

The Email message body has been converted to plain text and stored here.