Power Automate email body formatting

In this Microsoft Power Automate Tutorial, we will get to know how to format the email body using Power Automate. Also, we will discuss the below topics such as:

  1. Power Automate email body html
  2. Power automate send email add an image
  3. Power Automate email body bold
  4. Power Automate email body variable
  5. Power Automate formatting email with options
  6. Format approval email power automate
  7. Power Automate email body to excel
  8. Power Automate save email body to pdf
  9. Power Automate email body to planner task
  10. Power Automate email body dynamic content
  11. Power Automate email body preview
  12. Power Automate get date from email body
  13. Power Automate get image from email body
  14. Microsoft Flow email attachment to SharePoint
  15. Microsoft Flow send an email form response
  16. Power Automate email body contains
  17. Power Automate get line from email body

Before formatting the email’s body let’s trigger a cloud flow based on email including it’s all parameters such as sender, receiver, date, subject, body, etc.

But first, we need to sign in the Microsoft Power Automate with our Microsoft ID or tenant address. Then on the left navigation panel, go to +Create > Instant cloud flow.

power automate parse email body
Power Automate instant Cloud flow

Select a trigger to start the flow manually i.e. Manually trigger a flow. Then click on create.

power automate parse email body
Create an instant flow on Power Automate

It will add a trigger on Power Automate. Here, we can add an input for our instant flow. Let’s add a file input. Click on the + Add an input > File.

Power Automate button flow with user input
Power Automate button flow with user input

Next, we will add an action that will send an email to a user via outlook. For this, click on +New step > Send an email(v2). Here, it will ask to set the parameters such as:

  • To- Set an user ID or email address to which an email will send.
  • Subject- Give a subject to the email.
  • Body- Specify the body of the email.
  • From- Specify the sender’s email address.
  • CC- It is specify the CC address to which email was sent.
  • BCC- It works as similar as CC but its not visible to the user.
  • Attchments Name- Give a name to the attachment.
  • Attachments content- Add an attachment in the email.
  • Sensitivity- Specify the sensitivity of the email.
  • Reply To- Set an email address to set send the reply.
  • Importance- choose the importance of the email.
power automate send an email
power automate send an email

Let’s save the flow and test it manually. Then we will see it will ask to add an attachment to run the flow. Then click on the Run flow.

Send an email in Power Automate
Send an email in Power Automate

We can see it will send an email like below:

Microsoft flow send an email
Microsoft flow send an email

This is how to send an email using Power Automate.

Read Power Automate Create Document Library

Power Automate email body formatting

In Power Automate, we can format the email body using HTML. We can see there is an option for HTML code in the body of the send email action.

power automate email body formatting
Power Automate email body formatting

When we click on that option it will show us the code view in the HTML format(For this we need some basic tags in HTML):

email body formatting Power Automate
email body formatting Power Automate

Also, we can format the body by making it bold, italic, underlined, changing the font and its color, ordering, unordered, adding a link, etc.

Microsoft flow email body formatting
Microsoft flow email body formatting

This is how to do email body formatting in Power Automate.

Read Power Automate Create SharePoint List

Power Automate email body html

Let’s take an example to send an email adding HTML in the body. Here we are going to create an email that will notify the user about the order delivery.

First, we will create an instant cloud flow having inputs such as text, number, date, email. On Power Automate, click on +Create > Instant cloud flow > add an input > Select the mentioned inputs.

power automate email body html
Power Automate email body HTML

Next, we will add an action that will send an email to the user. Click on + New step > Send an email. Provide the parameters such as:

  • To- Set the user ID from the dynamic content(i.e. Email)
  • Subject- Give a subject to the email.
  • Body- Specify the body using the dynamic content such as Name, Order Number, Delivery date. Also, we will add a link to the email using <a href> and <img src> tag.
power automate email body add html
Power Automate email body add HTML

Let’s save the flow and test it manually. Then it will ask to fill the inputs to run the flow:

 email body html Power Automate
email body HTML Power Automate

Then click on the Run flow and we can see the email will send like below:

power automate html email body
Power Automate HTML email body

This is how to use HTML in the email body of Power Automate.

Read Power Automate Filter Array

Power automate send email add an image

Here we will see how to embed an image in an email using Power Automate. Let’s create an instant flow to implement this.

  • On Power Automate, click on +Create > Instant cloud flow > Manually trigger the flow. Next, we will add an action that will get the content of a file using the path. We can get the item from the Sharepoint library or OneDrive. Here we are going to use the OneDrive connector.
  • Under the trigger, click on +New step > Get file content using path under the OneDrive. Set the File Path.
Power automate send email add an image
Power automate send email to add an image
  • Next, we will add an action to initialize a variable to embed the image as a string varibale using the below expression as value and give a variable name.
<img src=”data:image/jpeg;base64,” alt=”Company Logo”/>
  • Now, we will add another expression within the value. Click on the after ‘base64,‘ and before the ‘” alt=”Company Logo”/>‘, then go to expression and insert ‘.$content‘. Next, place the cursor before the .$content and select the file content from the dynamic content.
  • Then the expression will look like below:
outputs('Get_file_content_using_path')?['body'].$content
  • And the final expression will look like below:
<img src = "data:image/jpeg;base64,@{outputs('Get_file_content_using_path')?['body'].$content}" alt="Company Logo"/>
Power automate embed an image with email
Power automate embed an image with email
  • Next, we will add ‘send an email’ action to send the email with the image. Click on +New step > Send an email. Set the proeprties such as To and Subject. In the email body, we will use the variable i.e. VarImage from the dynamic content.
How to embed an image into an email with Power Automate
How to embed an image into an email with Power Automate

Let’s save the flow and test it manually. We can see it will send the email with the image:

Power Automate Send email with embedded image
Power Automate Send an email with an embedded image

This is how to send an email with an embedded image using Power Automate.

Read Power Automate delete file from SharePoint

Power Automate email body bold

Here we will see how to convert bold text from normal text in an email body using Power Automate. We can create bold text in 2 ways. There is already an option to convert the normal text to bold. Click on that B symbol > write a text. It will make it bold.

power automate email body bold
Power Automate email body bold

Also, we can convert the normal text to bold using HTML tag i.e. <b>Your text</b> or <strong>Your Text</strong>. Click on the code view symbol i.e. </> where we can insert the text using HTML tags.

<b>TsInfo Technologies</b>
Change Normal Text to Bold using Power Automate Send an email
Change Normal Text to Bold using Power Automate Send an email

Let’s save the flow and test it manually. We can see it will send the email with bold text:

Microsoft Flow Bold Text send an email
Microsoft Flow Bold Text send an email

This is how to do Power Automate email body bold.

Read Power Automate create table with examples

Power Automate email body variable

In this example, we will see how to use a variable when sending an e-mail from Power Automate. Let’s create an instant cloud flow and then initialize a variable.

  • On Power Automate, click on +Create > Instant cloud flow > Manually trigger the flow.
  • Under the trigger, click on +New step > Initialize a varable.

Set the parameters such as:

  • Name– Give a variable name i.e. VarEmail
  • Type– String
  • Value– any user id to whom you want to send the mail
power automate email body variable
power automate email body variable

Next, we will add the Send an email action. Where we will set parameters such as:

  • To- Set the Variable i.e. VarEmail from the dynamic content.
  • Subject- Give a subject to the email.
  • Body- Specify the body of the email. Here we are going to use a formatted body.
power automate email using variable
Power Automate email using variable

Let’s save the flow > select to test it manually > press the Run flow. We can see it will send the email to the mentioned user id in the variable.

Variables when sending e-mail from Power Automate
Variables when sending an e-mail from Power Automate

This is how to use variables when sending e-mail from Power Automate.

Read Power Automate Do until

Power Automate formatting email with options

Here we will see how to send an email with options using Power Automate. Let’s create an instant flow where it will send an email with multiple options and wait for the recipient to respond with one of the options.

On Power Automate, go to My flow > Instant cloud flow > Manually trigger the flow.

How to create an instant cloud flow
How to create an instant cloud flow

For example, we will send an email for a webinar with some topics as options. Under the trigger, click on the +New step > search the action ‘Send an email with options> Select it.

power automate formatting email with options
power automate formatting email with options

Here, we will set the properties such as:

  • To– Give the user ID(s).
  • Subject– Set a subject name to the email i.e. Webinar Reminder
  • User Options– Set the options such as: Power App, Power Automate , Power BI
  • Header Text– Give a suitable header text.
  • Body– Specify the body of the email.
Send Email with Options in Power Automate
Send Email with Options in Power Automate

Let’s save the flow and test it manually. We can the email will send like below:

Power Automate to 'Send Email with Options'
Power Automate to ‘Send Email with Options’

This is how to ‘Send Email with Options’ using Power Automate.

Read Power Automate create a task in Microsoft Planner

Format approval email power automate

Here we will see how to format an approval email using Power Automate. We can use markdown to format the approval request email in Microsoft flow. (Click on that link for more details).

Let’s create a button flow and then add an action to create an approval request. Also, wait for the response to complete the flow.

  • On Power Automate, click on +Create > Instant cloud flow > Trigger the flow manually.
  • Under the trigger, click on +New step > Search the action ‘Start and wait for an approval’ > Select it. We can see the Markdown supported option in Details where we can format the approval email.
Microsoft flow email approval format
Microsoft flow email approval format

Let’s give the Title of the approval request and set the user id to whom you want to assign the approval request. Then in the Details, we are going to set the below text with expressions that will format the approval request:

Hi, There is a blog based on **Power Automate** and need your approval to publish.
# Power Automation
## Robotic Process Automation
### This blog includs the topics such as:
- Send an email
- Create a task in the planner.
- Notify the client in a Schedule Manner.
There are another Power Platforms such as:
**[Power BI](https://powerbi.microsoft.com/)**
**[PowerApp](https://powerapps.microsoft.com/)**
Use markdown to format approval emails in Power Automate
Use markdown to format approval emails in Power Automate

Now our flow is ready. So let’s save it and test the flow manually. We can see it will send the approval request like below:

Use markdown to format Power Automate approvalsUse markdown to format Power Automate approvals
Use markdown to format Power Automate approvals

This is how to format the Power Automate approvals email.

Read How to convert word to pdf using Power Automate

Power Automate email body to excel

Here we will see how to store the email body to an excel sheet within the SharePoint or OneDrive using Microsoft flow. We are going to create a flow that will retrieve the content from the email and stored them in the excel sheet.

  • To implement this requirement, we have prepared an Excel table in the SharePoint library based on Product Orders having columns such as OrderNo., Order Date, Units Ordered, Delivery Date, Pick Up.
power automate email body to excel
Power Automate email body to excel
  • Now, we will create an automated flow that will trigger when an email arrives to our outlook.
  • On Power Automate, Click on +Create > Automated cloud flow > Select the trigger ‘When a new email arrives (V3)‘. Choose the location as ‘Inbox‘ and set the subject filter as ‘Product Report‘.
email body to excel Power Automate
email body to excel Power Automate
  • Next, we will add an action ‘Html to text‘ that will convert the HTML document to plain text. Click on +New step > Html to text. Set the content as Body from the dynamic content.
power automate email body html to text
power automate email body HTML to text
  • Next, we will add an action that will add a row in the specified excel table. Click on +New step > Add a row into a table. Provide the Location, Document Library, File, Table.
email body html to text Power Automate
email body HTML to text Power Automate

Then it will show the columns of the excel table, where we will insert the below expression for each column. These are:

  • For OrderNo.,
trim(first(split(last(split(body('Html_to_text'),'OrderNo.:')),'Order Date')))
  • For Ordered Date,
trim(first(split(last(split(body('Html_to_text'),'Order Date:')),'Units Ordered')))
  • For Units Ordered,
trim(first(split(last(split(body('Html_to_text'),'Units Ordered:')),'Delivery Date')))
  • For Delivery Date,
trim(first(split(last(split(body('Html_to_text'),'Delivery Date:')),'Pick Up')))
  • For Pick Up,
first(skip(split(body('Html_to_text'),'Pick Up:'),1))
Microsoft flow email to excel table
Microsoft flow email to excel table

Let’s save the flow and test it manually. Now we will send an email to ourselves like below:

power automate email body table to excel
Power Automate email body table to excel

Now we can see it will update this report from the email to excel:

Microsoft Power Automate parse email body
Microsoft Power Automate parse email body

This is how to retrieve email body to excel using Microsoft Power Automate.

Read Power Automate Copy Folders + 10 Examples

Power Automate save email body to pdf

Already there is an article where we have beautifully explained how to Convert a PDF file from the email body using Power Automate.

Power Automate email body to planner task

Here, we will see how to create a Planner task from an email body using Power Automate. Let’s create an automated cloud flow that will trigger when an email arrives via Outlook and then create a task in the Microsoft planner.

  • On Power Automate, Click on +Create > Automated cloud flow > Select the trigger ‘When a new email arrives (V3)> Create. It will add a trigger in the flow and choose a folder for email.
power automate email body to planner task
Power Automate email body to planner task
  • Then we will add anction ‘Html to text’ that will convert an HTML document to plain text. Click on +New step > Html to text. Set the body as Content from the dynamic content.
Power Automate insert the body of an email into Planner task
Power Automate insert the body of an email into the Planner task
  • Next, we will add an action that will create a task in the planner from the arrived email. Click on +New step > Create a task. Set the Title as Subject from the dynamic content and provide the Group Id, Plan Id, Bucket Id.
email body to planner task power automate
email body to planner task power automate
  • Now, we will add anothre action that will update the task details from the email to Planner. Click on +Create > Update task details. Provide the below parameters asuch as:
    • Task IdId from the dynamic content of the Create a task.
    • Description– select the Plain text content from the dynamic content of the Html to text.
Microsoft Flow email body to planner task
Microsoft Flow email body to planner task

Now our flow is ready. Let’s save the flow and test it manually. Then send an email to yourself.

Add body of email to planner task when email arrives Power Automate
Add the body of the email to planner task when email arrives Power Automate

We can see it will create a task in the Microsoft Planner:

Power Automate Receive an email Add it to Planner
Power Automate Receive an email Add it to Planner

This is how to do Power Automate email body to plan tasks.

Read Power Automate Copy Files

Power Automate email body dynamic content

Here we will see how to use dynamic content in the email body using Power Automate. For example, we are going to create a flow that will insert the URL link as dynamic content retrieved from the SharePoint list using Power Automate.

We have prepared a SharePoint list based on Courses having columns Title, Course link.

SharePoint list having hyperlink column type
SharePoint list having hyperlink column type

Let’s create an automated flow that will trigger when an item is created in the SharePoint list. On Power Automate, click on +Create > Automated cloud flow > Select the trigger ‘when an item is created.

power automate email body formatting to SharePoint list
Power Automate email body formatting to SharePoint list

Next, we will add an action that will send an email to the user. Click on +New step > Send an email. In the body section, click on the </> symbol to insert the hyperlink using the course link from the dynamic content and insert the below expression.

<p>Hey,<br>
An item has been added in the Courses list having its <a href= "@{triggerOutputs()?['body/Courselink']}"> Link</a> to view the course training.
power automate email body dynamic content
Power Automate email body dynamic content

That’s it. Let’s Save the flow and test it manually. We will insert a new item in the SharePoint list with an URL.

power automate email body formatting url

Now we can see it will be an email with a clickable link inserted from the dynamic content of the SharePoint list.

Add Dynamic Hyperlinks in Emails Sent by Microsoft Flow
Add Dynamic Hyperlinks in Emails Sent by Microsoft Flow

This is how to do Power Automate email body formatting URL.

Read Power Automate Create PDF + 11 Examples

Power Automate email body preview

In Power Automate, we will preview the body of the email using flow. A body preview means a preview of the message. Let’s create a flow that will show the preview of the email’s body.

For example, we will create an automated flow that will trigger when an email arrives in the inbox.

On Power Automate, click on +Create > Automated cloud flow > Select the trigger ‘When an email arrives.

power automate email body preview
Power Automate email body preview

Then add an action to convert the body preview of the email from HTML to plain text. Click on +New step > Html to text. Set the content as a Body preview from the dynamic content.

Getting an email body while using when an email arrives
Getting an email body while using when an email arrives

Next, we will add a compose action to see the body preview. Click on +New step > Compose.

 Body preview in Power Automate email
Body preview in Power Automate email

Let’s save the flow and test it manually. Then send an email to yourself from another ID.

Microsoft Flow email body preview
Microsoft Flow email body preview

We can see the preview of the body will appear like below in composing action:

Getting an email body preview while using when an email arrives
Getting an email body preview while using when an email arrives

This is how to get an email body preview while using when an email arrives.

Read Power Automate dynamic content

Power Automate get date from email body

Here we will see how to get the date from an email body using Power Automate. For example, when an email arrives, it will extract the date from the email body using the flow.

Let’s create an automated flow that will trigger when an email arrives in the inbox via Outlook.

  • On Power Automate, go to My flow > +New Flow > Automated cloud flow > Select the trigger ‘when an email arrives‘. Choose the email’s folder location as inbox.
  • Next, we will add the ‘Html to text‘ action that will convert the html content to plain text. Set the Received Time as Content.
power automate get date from email body
Power Automate get a date from the email body
  • Next, we will add a compose action to display the extracted date using an expression:
formatDateTime(outputs('Html_to_text')?['body'],'dd-MM-yyyy')
Power Automate how to get date from email body
Power Automate How to get date from email body

Let’s save the flow and test it manually. Now we will send an email to ourselves from another user.

power automate extract date from email body
Power Automate extract date from email body

We can see it will extract the date from the arrived email.

Extract date from email body Power Automate
Extract date from email body Power Automate

This is how to extract the date from the email body Power Automate.

Read Start and wait for an approval Power Automate

Power Automate get image from email body

Now we will see how to get an image from the email body using Power Automate. Also, we will see how to save this image to the SharePoint library.

Let’s create an automated flow that will trigger when an email arrives in Outlook’s inbox folder. On Power Automate, click on My flow > +New flow > Automated cloud flow > Select the trigger ‘When an email arrives. Choose a folder location i.e. Inbox. Select yes in the Include attachments.

power automate get image from email body
power automate get image from email body

Next, we will add an action that will get the attachments from the email. Click on +New step > Get Attachment. Set the parameters from the dynamic content of the trigger such as:

  • Message Id– Message ID
  • Attachement Id– Attachments Attachment Id
get image from email body power automate
Get image from email body Power Automate

(It will create an ‘apply to each loop to create an iteration for each attachment). Next, we will add an action that will create a file in the SharePoint list or OneDrive. Click on +New step > Create file(under SharePoint). Set the Site Address, FolderPath. Also, give the Name as Filename and ContentBytes as File Content.

Save images from email using Power Automate
Save images from email using Power Automate

Let’s save the flow and test it manually. Send an email with images to yourself from another user ID.

Microsoft flow to get image from email body
Microsoft flow to get image from email body

Now we can see the attached images will save in the specified document library.

power automate get and save images from email body
power automate get and save images from email body

This is how to get an image from the email body and save it using Power Automate.

Microsoft Flow email attachment to sharepoint

Already there is an article where we have explained how to save email attachment(s) to the SharePoint document library.

Microsoft Flow send an email form response

Here we will see how to send an email using Power Automate when the form response is submitted. For this, we will create a Microsoft form and click on + New form to create a new form.

Let’s create a Microsoft form based on the Issue Tracking Form having questions and types such as:

QuestionsType
Issue TitleText
Issue DescriptionText
Requestor Full NameText
Requested Person EmailText
Due DateDate
Give your rate to usRating
Microsoft flow email form response
Microsoft flow email form response

Then click on the share and copy the link. Open it another tab.

Send an email form response using Power Automate
Send an email form response using Power Automate

Let’s create an automated flow that will trigger a flow when a new response is submitted. On Power Automate, click on +Create > Automated cloud flow > Select the trigger ‘When a new response is submitted. Select the Form ID from the drop-down i.e. Issue Tracking Form.

Microsoft flow send an email form response
Microsoft flow send an email form response

Next, we will add an action that will retrieve a form response. Click on +New step >
Get response details. Set the Form ID and Response ID.

Microsoft flow send email based on form response
Microsoft flow send email based on form response

Next, we will add the send an email action to send the response details to a user ID and the details of the response like below:

How To Send Forms Responses to Outlook With Power Automate
How To Send Forms Responses to Outlook With Power Automate

Let’s save the flow and test it. Now we will submit a new response from that another tab where we opened the Form.

Power Automate send email based on form response
Power Automate send email based on form response

We can see it will send an email notification about the response.

Microsoft flow how to send an email form response
Microsoft flow how to send an email form response

This is how to send an email form response using Microsoft flow.

Read Power Automate shared mailbox

Power Automate email body contains

Here we will see how to work with Power Automate email body contains. For example, when an email arrives it will check if the body contains some specific text then it will notify the user via Microsoft team.

Let’s create an automated flow that will trigger when an email arrives in the Outlook. On Power Automate, click on +Create > Automated cloud flow > Select the trigger ‘When a new email arrives (V3)‘.

Next, we will add a condition control that will check whether the email’s body contains a specific text. For example, we will set a text as ‘Power Automate‘.

Power Automate email body contains
Power Automate email body contains

If the condition match, then it will move to the If Yes section and add an action that will notify in the Microsoft team about the email.

In the If yes section, click on +Add an action > Post message in a chat or channel. Set the below proprties such as:

  • Post as- Flow bot
  • Post in- Channel
  • Team- Select the team
  • Channel- Select the channel
  • Message- Give a message
Microsoft Flow email body contains
Microsoft Flow email body contains

Let’s save the flow and test it. Then send an email to yourself to run the flow.

Help with body of email text filter in the condition
Help with body of email text filter in the condition

As the body contains ‘Power Automate‘, we can see it will post a message in the Microsoft Team.

power automate email body if contains
Power Automate email body if contains

This is how to do Power Automate email body contains.

Read Power Automate vs Nintex

Power Automate get line from email body

Here, we will see how to retrieve a line from the email body using Power Automate. For example, we will create a flow that will extract some specific data or line or characters from the email body using Power Automate and update these in a SharePoint list.

  • Let’s create an automated flow by using the trigger ‘When a new email arrives (V3)‘ and set the folder location as Inbox.
  • Then add a compose action using an expression that will extract the some specified number of charecters from the email’s body.
substring(triggerOutputs()?['body/bodyPreview'],0,45)

Here it will extract 45 characters from the body of the email.

Power Automate get line from email body
Power Automate get a line from the email body

Next, we will add an action that will create an item using the extracted data in the SharePoint list. We have already a Sharepoint list named ‘Task list‘ having columns such as Title, Description. Click on +New step > Create item.

Set the parameters such as:

  • Site address- Specify the SharePoint site address
  • List name- Choose the ShatrePoint list name
  • Title- Select the Subject name from the dynamic content.
  • Description- Select the OutPut from the Compose.
Using a flow to extract character from email body
Using a flow to extract characters from email body

Let’s save the flow and test it. Sent an email to ourselves from another user.

power automate extract line from email body
power automate extract line from email body

This is how to extract lines from the email body using Power Automate.

You may like the following Power Automate tutorials:

Conclusion

From this Power Automate Tutorial, we discussed all send an email action in Power Automate. Also, we learned the below topics:

  • How to do email body formatting in Power Automate
  • How to use email body html in Power Automate
  • How to add an image in Power automate send email
  • How to bold Power Automate email body
  • How to use variable in Power Automate email body
  • How to create email with options in Power Automate
  • How to Format approval email in power automate
  • How to extract email body to excel using Microsoft flow
  • How to save email body to pdf using Power Automate
  • How to create a planner task from email body using Power Automate
  • How to use dynamic content in Power Automate email body
  • How to get the email body preview using Power Automate
  • How to get date from email body using Power Automate
  • How to get image from email body and save it using Power Automate
  • How to save email attachment to sharepoint using Microsoft Flow
  • How to send an email form response using Microsoft Flow
  • How to work with Power Automate email body contains
  • How to get line from email body using Power Automate
  • >