CREATE A STYLE HTML TABLE IN AN EMAIL USING POWER AUTOMATE:

Introduction:

In this blog I will show how to customize an email using Power Automate.

Steps:

  • At first I have created a list as given in the screenshot below:
  • Then go to your Power Automate page of your site.
  • Then select create and then  select “Instant Cloud Flow” as given in the screenshot below:

Then you have to select “Get items” action from SharePoint as given in the screenshot below:

After that you have to save and run this flow, and after running the flow you have to download a json schema from the output section and copy the json values into a notepad as mentioned in the screen shot below.

  • Here in json schema there is a “Value” that I have marked above is an array which contains each item of the list.
  • Then you select the ‘’select’’ action from ‘’Data Operation’’ as given in the screenshot below.

In the ‘’Select’’ action choose the ‘’value’’ in “From” as given in the screenshot below:

  • After it you have to put the field name that you want to display in the table so put the field name in the “Enter Key” in the “Map” as a json object and after that for the “Enter value” section you have to go to that notepad in which you put the json schema. From that json schema you have to go to the ‘’value’’ array and then you have go the “Expression” and inside it put a function “item (). Field name”.
  • Note: Here ‘’Field name’’ is the field that you want to display in the table. You should go to that json script notepad and inside the “value” array you should choose the field name that you want to display in the table format.
  • Above statements are expressed in the screenshots below:

After filling all the values the action look like as the screenshot below:

After Then you have to create a table in html to display the item values. For that you have to add a new action called as “Create  Html table” and select “output” as shown in the screenshots below:

To customise the table create your own html file in the code editor with using id as mentioned in the screenshot below:

Note: Remember one thing that you should change the table with the “outputs value” of the “Compose” as shown in the screenshot below:

Then add an action “Compose” and  inside it in the “Expression” create a function “replace()” and replace the “output” value with your “table id” as given in the screenshots below:

After that you have to select an action “Send an Email ” to send the customizable table of your list items to someone in the screenshot below:

Next you have do that create a variable to store your list items styling html code under the “Get items” action for that you have to choose “initialize variable” .In the place of “Type” select “String” and in the place of “Value” put your html styles as given in the screenshot below:

The last work you have to do is in the “Send an email” action  in the body put the “output” and under it put the variable name that you have created to store your list items styling as given in the screenshot below:

Then you have to run your flow and check the email that you give in the “Send an email” action. In this action give the “Recipient name”, “Subject” and “Email body” as shown in the screenshots below:

And now it is the time to check the output in the email as given in the screenshot below:

Conclusion:

In this blog I have showed how to create an html style table in an email by using Microsoft Flow.

Key Words:

“Customize table using power automate”

Share

Add Your Comments

Your email address will not be published. Required fields are marked *