Power Automate
How to send an email with HTML table in Power Automate
Category: CDS,Microsoft Flow,Power Automate,PowerApps,Uncategorized Author: debajit prod Date: 2 days ago Comments: 0

Do you have the following requirements? You want create a HTML table in Power Automate from JSON data You want to send an email with HTML table in the body of the email using Power Automate If you have these requirements and you are wondering on how to accomplish the same, you are on the …

How to send an email with HTML table in Power Automate Read More »

Source: Debajit


Update entity from Canvas App with Power Automate
Category: Calling flow from Canvas App,Canvas Apps,Dynamics 365,Embedding Canvas app in Model apps,Executing Power Automate from Canvas app,Microsoft Flow,Power Automate,Update entity form data using Power Automate,Updating CSD data using Power Automate Author: Mahender Date: 1 week ago Comments: 0

Introduction This is third article about using Bing maps in Canvas app. In earlier articles we discussed about how we can show event organizer data in the gallery control and render them in the Bing maps. Today we are going to discuss how to update entity data from canvas app. Canvas app with Bing Maps in Dynamics 365 CE –… Read more »
Source: Mahendra Pal


How to pass an array from PowerApps to Power Automate
Category: Canvas Apps,Parse JSON,Pass Array to PowerAutomate,Power Automate,PowerApps Author: debajit prod Date: 1 week ago Comments: 0

Do you have the following requirements? You want to pass an array from a Canvas App to a Power Automate You want to pass an array from Model Driven apps to Power Automate. You have to parse JSON data in your canvas app and perform further processing. If your requirement is similar to this, this …

How to pass an array from PowerApps to Power Automate Read More »

Source: Debajit


Query related entity data in CDS using FetchXml in Power Automate
Category: Dynamics 365,Fetchxml in Power Automate,Model driven apps,Power Automate Author: debajit prod Date: 4 weeks ago Comments: 0
  • How do I use FetchXml in Power Automate?
  • How do I access related entity fields when using Fetchxml in PowerAutomate?

If you are having any of the above questions, you are at the right place. Strictly speaking, this blog is more about how to access related entity information in PowerAutomate through FetchXml. But as I am going to explain from the beginning, if you are not aware of the basics as well, this blog might help you with that too.

To demo this scenario, I am using the below fetchxml.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="contact">
    <attribute name="fullname" />
    <attribute name="parentcustomerid" />
    <attribute name="emailaddress1" />
    <attribute name="contactid" />
    <order attribute="fullname" descending="false" />
    <filter type="and">
      <condition attribute="statecode" operator="eq" value="0" />
      <condition attribute="parentcustomerid" operator="eq" value="{B56B3F4B-1BE7-E611-8101-E0071B6AF231}" />
    </filter>
    <link-entity name="account" from="accountid" to="parentcustomerid" visible="false" link-type="outer" alias="pa">
      <attribute name="address1_composite" />
 <!-- string field -->
      <attribute name="industrycode" />
 <!-- optionset field -->
    </link-entity>
  </entity>
</fetch>

Quite evident from the above fetchxml, I am retrieving all the contacts associated with an account. For the account record, I am retrieving the value of “Address 1” field which is of type text and “Industry” field which is of type optionset. Also note the alias – “pa” I am using while I join with the account entity. And below is my Power Automate flow.

Power Automate FetchXml
Power Automate FetchXml

Quite a simple flow nonetheless. Below are the steps for the flow.

  • Declare couple of variables to store the Account Address and Industry
  • Run the fetchxml
  • Iterate through the items returned by FetchXml and set the value of Account address and industry.

You might be thinking, it’s quite a mundane one. And to be honest it is. But what does baffle infact a lot is your related entity data (in this case for account entity) does not show up in the Dynamic content pane of Power Automate flow.

Dynamic content - Power Automate Flow
Dynamic content – Power Automate Flow

Then how do I get it. It’s actually quite easy. Just select any placeholder value from Dynamic content pane and then from the side menu (ellipsis), choose “Peek Code“.

Peek code Power Automate
Peek code Power Automate

Copy the expression that you see in the value

Peek code Power Automate

Now to get the Industry code all we need to do is use the appropriate field names in the expression. Below are the expressions for Industry code and Address 1 fields.

Industry - items('Apply_to_each')?['pa.industrycode']
Address 1 - items('Apply_to_each')?['pa.address1_composite']
Variables - Power Automate Flow
Variables – Power Automate Flow

As you can see, I now have the correct values. Or is it? There is a small glitch though. The Account Industry is showing as 5 instead of name. That is because it is Optionset and if you put the field name in the expression, it will always give you the optionset value. If you want the Optionset text you need to use the below expression.

items('Apply_to_each')?['pa.industrycode@OData.Community.Display.V1.FormattedValue']

Very much similar to the format we use to retrieve optionset text using WebApi.

Hope this helps!

You may also like the below posts

Debajit Dutta
(Business Solutions MVP)

Source: Debajit


Power Automate vs Azure Logic Apps
Category: Logic Apps,Power Automate,PowerPlatform Author: Nishant Rana Date: 4 weeks ago Comments: 0

Power Automate Azure Logic Apps Power Automate is built on top of Azure Logic Apps It is a SaaS service for workflow automation across several different apps and SaaS services. It is a PaaS service for workflow automation across several different apps, SaaS services, and IaaS services for enterprise integration. For more of self-service and … Continue reading “Power Automate vs Azure Logic Apps”
Source: Nishant Rana


Approvals – Power Automate & Dynamics 365
Category: Microsoft Dynamics 365,Power Automate Author: Nishant Rana Date: 2 months ago Comments: 0

Source: Nishant Rana


Use markdown to format approval emails – Power Automate and Dynamics 365
Category: Approvals,Dynamics 365,Microsoft Dynamics 365,Power Automate Author: Nishant Rana Date: 2 months ago Comments: 0

Let us update our previous flow, to use markdown to format the approval email. Markdown is the lightweight mark-up language for adding formatting elements to the plain text. Refer the Markdown cheat sheet We’d update the Details property of Start and wait for an approval action. Below we have added some sample text that uses … Continue reading “Use markdown to format approval emails – Power Automate and Dynamics 365”
Source: Nishant Rana


1 2 3 6