cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sienna28
Level 8

Flow - How to remove duplicate email addresses from array variable?

In my flow, I have read email addresses from a list into an array variable.

 

I have some duplicate email addresses in there and I would like to keep one version only.

 

How can I remove duplicates and build up a string of email addresses, seperated by semicolons,  to use in the To: field of the email to be sent? 

 

So address1; address2;address3;address4 etc

 

Thank you

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
xyzzyx666
Level 8

Re: Flow - How to remove duplicate email addresses from array variable?

Hi @sienna28,

 

Could you please share a screenshot of your flow’s configuration?

You can try to use Union to remove the duplicate email address and use join with(;)to change "," to ";".

I have tested as next.

Step1: create one SP list(the list has two same eamil adress to test).

sp.png

 

Step2:Configure the flow: Use Union and Join

flow1.png

flow2.png

Step3:check it and then test

flow3.png

 

 

Hope this can be helpful.

 

BR,

xyz

 

View solution in original post

TopShelf-MSFT
Level 10

Re: Flow - How to remove duplicate email addresses from array variable?

Thanks for your help in this thread @xyzzyx666

 

@sienna28 thanks for your post - can you review the information provided and let us know if it answers your question?

 

@TopShelf-MSFT

View solution in original post

5 REPLIES 5
xyzzyx666
Level 8

Re: Flow - How to remove duplicate email addresses from array variable?

Hi @sienna28,

 

Could you please share a screenshot of your flow’s configuration?

You can try to use Union to remove the duplicate email address and use join with(;)to change "," to ";".

I have tested as next.

Step1: create one SP list(the list has two same eamil adress to test).

sp.png

 

Step2:Configure the flow: Use Union and Join

flow1.png

flow2.png

Step3:check it and then test

flow3.png

 

 

Hope this can be helpful.

 

BR,

xyz

 

View solution in original post

TopShelf-MSFT
Level 10

Re: Flow - How to remove duplicate email addresses from array variable?

Thanks for your help in this thread @xyzzyx666

 

@sienna28 thanks for your post - can you review the information provided and let us know if it answers your question?

 

@TopShelf-MSFT

View solution in original post

Tldp1
Level: Power Up

Re: Flow - How to remove duplicate email addresses from array variable?

Hi,

 

Could you please share what the actions are? The screenshots provided are very hard to read.


@TopShelf-MSFT wrote:

Thanks for your help in this thread @xyzzyx666

 

@sienna28 thanks for your post - can you review the information provided and let us know if it answers your question?

 

@TopShelf-MSFT


 

Jasong911
Level: Powered On

Re: Flow - How to remove duplicate email addresses from array variable?

hi, 

 

this solution doesn't show what you append to the array variable? 

 

also doesn't show the exact expression you used for Compose/Join?

 

could you please clarify?

DTreg1
Level 8

Re: Flow - How to remove duplicate email addresses from array variable?

@Jasong911 

 

Did you ever happen to figure out the rest of the expressions?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,288)