web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Power Automate Dynamics Marketing Insights

(0) ShareShare
ReportReport
Posted on by 90

Hello All,

Can we programatically access data from dynamics maketing insights in power automate?

Kind Regards

Abhilash Reddy

I have the same question (0)
  • Suggested answer
    protc Profile Picture
    Microsoft Employee on at

    HI Abhilash,

    Thank you for your query.

    Marketing Insights are not available to access through Web API hence it is not possible to access it through Power Automate or a customer connector.

    Please refer to this post for more info. on how to programmatically access Marketing Insights: https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/408077/marketing-insight-api-data-for-plugin .

  • Abhilash_Reddy Profile Picture
    90 on at

    Dear Protim,

    Thank you for the information.

    I also checked the blog and found that

    pkoval.com/.../

    community.dynamics.com/.../performing-organization-requests-from-c-for-dynamics-365

    OrganizationRequest request = new OrganizationRequest("msdyncrm_ListWidgetData"); request.Parameters.Add("WidgetRequest",

       "{\"WidgetId\":" +

        "\"MessageEmailDeliveredByContactList\"," +

        "\"Top\":25," +

        "\"SkipToken\":\"\"," +

        "\"LanguageId\":\"1033\"," +

        "\"OffsetFromUtcInMinutes\":120," +

        "\"Filter\":" +

            " {\"DateFrom\":\"2019-07-25T09:57:39.486Z\"," +

            " \"DateTo\":\"2019-08-25T09:57:39.486Z\"," +

            " \"Properties\":[{\"Name\":\"MessageId\"," +

            " \"Value\":\"47bd8737-f67a-e911-a972-000d3aba0352\"}]}}");

    var response = _service.Execute(request);

    So we should use this OrganizationRequest("msdyncrm_ListWidgetData") in a plugin on Contact update/create with inputs of language,datefrom, dateto?

    Is there any possibility to use javascript for the same? Any idea?

    Kind Regards

    Abhilash.

  • Abhilash_Reddy Profile Picture
    90 on at

    Able to capture the count of the Dynamics insights using below code in browser console.

    var data = {

    WidgetRequest: '{"WidgetId":"MessageEmailOpenedByContactList",' +

       '"Top":15,' +

       '"SkipToken":"",' +

       '"LanguageId":"1033",' +

       '"OffsetFromUtcInMinutes":120,' +

       '"Filter":' +

       '{"DateFrom":"2020-11-17T18:20:34.711Z",' +

       '"DateTo":"2020-12-29T18:20:34.711Z",' +

       '"Properties":[' +

       '{"Name":"MessageId",' +

       //'"Value":"8fba7c3c-1b39-eb11-a813-000d3ab29b65"' +

    //'"Value":"4aec99e2-d93e-eb11-a813-000d3ab29b65"' +

    '"Value":"242473a8-c32d-eb11-a813-000d3ab29b65"' +

       '}' +

       ']}' +

       '}'

    };

    var req = new XMLHttpRequest();

    req.open("POST", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/msdyncrm_ListWidgetData", true);

    console.log("URL : " + Xrm.Page.context.getClientUrl() + "/api/data/v9.1/msdyncrm_ListWidgetData");

    req.setRequestHeader("OData-MaxVersion", "4.0");

    req.setRequestHeader("OData-Version", "4.0");

    req.setRequestHeader("Accept", "application/json");

    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");

    req.onreadystatechange = function() {

     if (this.readyState === 4) {

         req.onreadystatechange = null;

       if (this.status === 204 || this.status === 200) {

         var results = JSON.parse(this.response);

    console.log(typeof results );

    var finalresult=results.WidgetData ;

    console.log(typeof finalresult);

    var jsonData = JSON.parse(finalresult);

    console.log("Json Length : " + jsonData.data.length);

       } else {

         var error = JSON.parse(this.response).error;

         Xrm.Utility.alertDialog("Error in Action: " + error.message);

       }

     }

    };

    req.send(JSON.stringify(data));

    Now we want to create new dashboard with the values from the dynamics insights

    What is the best approach for this

    We are thinking to have custom fields on the Marketing Email Form and update them whenever there is an update on the dynamics insight

    Is it possible to use either

    1) Javascript ?

    Or

    2) Plugin ?

    Also what should be the triggering points when we use any one of the above approaches.

    If we go via JS route when should the Javascript trigger on which fields?

    If we go via Plugin route what are the fields to be considered?

    Or there is any other approach for this?

    Kind Regards

    Abhilash Reddy.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 202 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans