Skip to main content

Power Automate Flow How to Create Email Message with a Table of list of record.

 

Power Automate Flow How to Create Email Message with a Table of list of record.

 

If you are working on a scenario where you must include a list of records in an email, then I would say keep on reading.

Let’s pick a simple scenario, when and account is assigned to a user lets send the list of Contacts associated to the account to the new Owner.

 


Our next step is going to be , to retrieve all associated Contacts to the account, we are going to use the List records action from the Common Data Service, I prefer to use the Filter Query if you are not comfortable with rest calls just go ahead and use the Fetch Xml Query you can use advance find to build the appropriate Fetch Query


 

Here there are two options you can take:

  1.  Call Create HTML Table and build your table
  2. Build a list then pass the list to Create Html Table

I personally prefer the second approach, its cleaner, it will give you the ability to select which fields you want to include in your table and there is the ability to name the table columns as well.

For Creating the list of records, we are going to call the Select Action and pass the output of List records


Here we can select the fields that we are going to include on our table and add name for column header as well

Next we are going to add Create HTML Table and assign the from parameter the Output of our Select


  1. From -> Assign Output of our Select
  2. Columns -> Automatic

a.       Here you can select Custom and add define the table include or exclude other columns

After this its quite easy, we just have to Create a new record

1.       Entity Name: - Email Message

2.       Subject:- Add the subject for your email

3.       To, From:- Populate this accordingly based on who is sending and who is receiving the email message

4.       Description:- Create HTML Table (Output)


 

I hope this was helpful 😊

 

Comments

Popular posts from this blog

How to Close/Resolve Case in Power Automate Flow

 How to Close/Resolve case from Power automate flow from your DataVerse Connector Add a New Row Table Name: Case Resolutions Subject: Add your subject here Case (Cases): incidents({Case Id Guid})

Azure DevOps Fork Repos between two Organization

  Azure DevOps Fork Repos between two Organization This weekend I embarked on a topic a bit foreign to myself, on the surface seemed a bit simple. The idea is to fork my Azure DevOps Repo to a different organization and push changes between them. Bad news DevOps doesn’t allow to fork Repos to a different organization, you have only the capability to fork to a different Projects within the same Organization. I’m pretty much sure there are so many other ways to solve this issue, but this is the one that I found to be easy to implement. Import Repo to the new Organization Remember here you have to generate a personal token to be able to import the Repo you have to be a member of the new organization as well This might take a few minutes depending on the size of your project, once its complete you will receive a confirmation email, or just refresh it after few minutes So far all looks good, you can clone the solution in your new Organizati...

Using Adaptive Cards on Power Virtual Agent

  Adaptive Card for Power Virtual Agent its on preview, this feature will enable you to enhance your bot with a better visual responses. Here is a demo of a Power Virtual Agent I have embedded on Teams Its quite easy to implement you can use Adaptive Card Designer to generate JSON for your Adaptive Card. You can start by selecting "Ask with Adaptive Card" Here will be able to configure You can Use Adaptive Card Designer for designing your Card, its quite easy to work with. If you are skilled developer you can take advantage of the JSON. This is your JSON template: {     "type" : "AdaptiveCard" ,     "$schema" : "http://adaptivecards.io/schemas/adaptive-card.json" ,     "version" : "1.5" ,     "body" : [] } T