Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Find Contacts on an Account that Meet Criteria Then Write Them to an Excel File

(0) ShareShare
ReportReport
Posted on by

Hello,

 

What's the best way to use a flow to find contacts on a Dynamics 365 online account that meet specific criteria then write them to an Excel file? 

 

It needs to be done without getting  Apply to Each involved which happens with the "List records" action.  The Apply to Each causes multiples to be written to the Excel file. If there are 4 contacts on the account and 2 of them meet the criteria then each record gets written to Excel 8 times.  This is not good since some accounts have 20 or more contacts. I just want the selected contacts to be written once. Is it possible?

 

Thanks,

Beth

 

 

 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: Find Contacts on an Account that Meet Criteria Then Write Them to an Excel File

    @VictorIvanidze thanks for responding.

     

    I won't ask how to use MS GRAPH.  😄

  • Community Power Platform Member Profile Picture
    on at
    Re: Find Contacts on an Account that Meet Criteria Then Write Them to an Excel File

    @alrez thanks for responding.

     

    I was able to use filters so that only the contacts that meet the criteria are getting written to Excel. The problem is they are written too many times!  For now I guess I'll just use remove duplicates in Excel and go on with my life.  

     

     

     

     

  • VictorIvanidze Profile Picture
    12,536 on at
    Re: Find Contacts on an Account that Meet Criteria Then Write Them to an Excel File

    I guess it can be done using MS GRAPH, but please do not ask how exactly - looks like a task for a consultant.

  • alrezac Profile Picture
    on at
    Re: Find Contacts on an Account that Meet Criteria Then Write Them to an Excel File

    Hi,

     

    looking through your ask here you seem to be asking for some conflicting things. If you do a search for contacts even with a filter, that could potentially return multiple results (even if it doesn't). Regardless, you should be able to use conditions within your For Each to skip the records that you do not want to write. You would just need to be cleaver with how you are passing the values and what you are filtering by.

     

    Regards,

     

    Alex

     

    -------

     

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1