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
@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.
I guess it can be done using MS GRAPH, but please do not ask how exactly - looks like a task for a consultant.
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.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1