Power Dynamics
  • Power Dynamics
  • 🍕My name
  • D365 CE
    • Copilot
      • 🥐Add Copilot into Rich Text Control
    • Sales
      • Copilot in D365 Sales
      • Export record to PDF
    • Customer Experience
      • Contact Center (Omnichannel)
        • 🐚Internal Live Chat in MDA
        • 📢Add Chat Widget to Power Pages - Proactive Chat
      • Attachment Control
      • Case Routing: Basic Routing rule set
      • Custom SLA for any Entity
      • Customer Insight
        • Journey - Custom Trigger - Call Power Automate
    • Field Service
  • Power Platform
    • Analytics
    • Dataverse
      • Use case for the feature of Record ownership across Business Unit
      • 💡Workaround: Change the OOB "Exchange Rate" of a record
      • Using a Virtual Entity to store historical log (sample)
      • Disable Empty Address record
      • Using Adaptive card
      • Block Unmanaged Customizations
      • 🪃Recycle Bin on Dataverse (Preview)
    • Model Driven App
      • 💡Run SSRS report on MDA mobile
      • 💡Tip: Create a Security Role with "App Opener" minimum privileges
      • Tag @person to notify in MDA
      • Auto search on the Lookup field
      • Activities with multiple related records
      • Embedded Power BI - Dashboard
      • Embedded Power BI - Form
      • "Custom Help" - Is it help?
      • New modern Command Bar
      • Tip: Hide the button "Add Existing Record" on subgrid
      • Custom Page - Why not?
      • Hiding sensitive column data
    • Canvas App
    • Fabric & Power BI
      • New Text slicer
      • Dataverse link to Microsoft Fabric
      • 💡Leveraging Interactive Warehouse Floor Maps in Power BI
      • Calculation Group for Time Intelligence
    • Power Automate
      • ✅Sequential Approval
      • 📤Create an Appointment by Outlook Graph API
      • Dowload SSRS Report and Send email
      • Power Automate: Add a table in Email
      • 💡Tips: Get "DisplayName" of the Lookup field on Power Automate
      • E-sign: Power Automate & DocuSign
  • D365 Finance & Operation
    • General
      • 🇻🇳D365 FnO - Virtual entities: Use case
    • Finance
      • Consolidating Customer & Vendor Balances
    • Supply Chain
      • Landed Cost Series
        • Landed Cost- Essential Configuration
        • Landed Cost Scenarios 1
Powered by GitBook
On this page
  • My propose: Using Power Automate
  • Creating Power Automate
  • **Action: Create HTML Table {}
  • Add step Send Email (V2)
  • First Testing...
  • **Using Compose {} action & Final Flow

Was this helpful?

  1. Power Platform
  2. Power Automate

Power Automate: Add a table in Email

#PowerAutomate, #Email, #Notification, #Table, #Json

PreviousDowload SSRS Report and Send emailNextTips: Get "DisplayName" of the Lookup field on Power Automate

Last updated 1 year ago

Was this helpful?

Hi guys, Last week, my client approached me with a request: they wanted the system to be capable of sending email notifications to the sales manager, containing a list of new Deals daily. (It means the list of Deals has "New" status)

...and I said, "Yes, sure". -> Now, we will do that.

My propose: Using Power Automate

The details of my Power Automate:

  • Type of Power Automate: Scheduled.

  • Frequency: Daily at 00:05 am

  • The flow will filter all Deal records that have the status reason "New"

  • Then send this list to the Sales Manager. For instance, I will send it to a specific email: "dung@ntd.asia"

  • Using the Create HTML table {} action of Data Operation is to generate a table from Dataverse records.

My steps: Schedule Flow -> Get List rows (from Dataverse) -> Create HTML Table -> Send Email (V2)

First of all, I have the list of Active Deals below and I expect the system will send 2 Deals with the New Status to my email "dung@ntd.asia".

Creating Power Automate

In my solution, choose Cloud Flow > click New to create

After creating, I added new step "List rows" from "Dataverse" > select my table Deal and set Filter for this step.

My sample, I filter Deals has Status Reason = "New"' ==> statuscode eq 1

**Action: Create HTML Table {}

In the 3rd step, I added an action Create HTML Table {} in "Data Operation"

Run testing and check the Output of step "Create HTML table". Because I selected the option Automatic of Columns, so all columns of the Deal entity will be shown below.

Then I edit the option Column to Custom -> and create the custom mapping for the table

After using custom mapping, we have the result:

Add step Send Email (V2)

I added the Send Email (V2) to the final step. In this step, I used the Output of action "Create HTM table {}" and added it to the email's body.

First Testing...

After finishing the first version, I tested and saw the table has no border:

**Using Compose {} action & Final Flow

Then, I edit my Power Automate and use the action Compose {} of Data Operation. This action I used this to add a border for the table.

I used the expression Replace() to take the table and replace the reference to the table object to include a format style.

My expression:

replace(body('Create_HTML_table'),'<table>','<table border=”1″>')

And the latest version of Power Automate, in the email body, I used the Output of step "Compose".

-> Running Test and check the result: The table has a border :)

Thank you and hoping well. [NTD]yns.asia ... Thank you.

🎉
☕
❤️
invite me a cup.
List of dealss
Scheduled Cloud Flow
List Rows: Deals has New status
Action: Create HTML table from "List rows Deals" step
The output of step "Create HTML table"
Custom mapping
The output of step "Create HTML table": Using Custom Mapping
Final Power Automate
1st version -Default table has no border
Latest version - using "Compose {}" and "Replace ()"
The table with border.