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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Contacts that are ...
Power Automate
Answered

Get Contacts that are members of a Dynamics 365 CE Marketing List

(1) ShareShare
ReportReport
Posted on by 37

I am looking to retrieve the Contacts that are members of a Dynamics 365 CE marketing list. Can someone help point me in the right direction on this? I can connect to the CDS instance no problem and I can see Contacts and Marketing Lists, I just don't know the ODATA or other syntax magic to get the members of the particular Marketing List that I desire. Thanks.

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @smoupre,

     

    You can refer to this document that uses filter expressions in OData URIs to limit the results that are returned in CDS. 

    https://docs.microsoft.com/en-us/dynamics-nav/using-filter-expressions-in-odata-uris

     

    For example, I want to get the member name is equal to "Michel", please notice that the dynamic content should have two single quotes after the operator:

    Annotation 2019-12-24 092439.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Greg_Deckler Profile Picture
    37 on at

    Thanks @v-litu-msft. So what property then do I filter on for the marketing lists that a Contact is a member of?

  • Verified answer
    PowerBack19 Profile Picture
    679 on at

    @smoupre - The simplest method is to create a flow from within a Solution using the "Common Data Service (current environment)" option. I did a test on this and it work perfectly. See points and screen shots below. 

     

    • Go to the maker site of https://make.powerapps.com and select the correct environment.
    • Choose "Solutions" on the left.
    • Create a solution. 
    • Open the solution and select "+New" from the top and choose "Flow".
      • This will launch Power Automate.

    Note: I'm not sure what your trigger is to kick off the flow. In my screen shots below, I just used the Flow Button to start it.

     

    • Search for the "Common Data Service (current environment)" using the search field.
    • Once you select it, choose "List Records".
    • Now comes the cool part: Since you are using the "CDS (current env)" option, there are multiple ways to filter the records. Below you can see I am using Fetch Xml.
      • To get the Fetch Xml code you need, just do an Advanced Find in Dynamics 365 and start with Contacts, then choose "Marketing Lists" as the related entity.
      • I chose the filter of "Name" equals "<enter your marketing list name>"

    Dynamics 365 - Advanced FindDynamics 365 - Advanced Find

     

    • Click the "Download Fetch Xml" and open it in Notepad.
    • Copy the Fetch Xml and paste it in the "Fetch Xml Query" field.
    • It will look like this:

    Power Automate - Filter with Fetch XmlPower Automate - Filter with Fetch Xml

     

    I tested the output of this by putting the values into an HTML table:

    Power Automate - Output within HTML TablePower Automate - Output within HTML Table

     

     

     

     

     

     

     

     

     

     

     

     

     

    Here is the resulting output within the HTML table:

    Power Automate - HTML Table outputPower Automate - HTML Table output

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 570

#2
Valantis Profile Picture

Valantis 405

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard