In my app i need to send emails to Multiple Users from multiple source.
First i set an one variable. In that variable two mail ids are there.
After that am getting mail addresses from O365 group.
Now i append O365 to existing Initialized variable.
Now am giving that variable into a Send email To address.
O365 member to append variable:
Now am getting Duplicates mail ids when am getting a mail.
How to avoid duplicate in a To address?
Hey! Check if the 2 emails are the same. If yes, just send to 1, if not, send to both
If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!
How to check a variable?
I append my O365 group members mail to existing variable.
Then how i check ? IS it possible?
Following is my example looks like,
O365 group members mail,
Now am getting mail like this in To address,
But what i actually i want is,
This can be achieved using an array variable, the union and join functions.
Start with an array variable. Append each email address using the Append to Array action:
This will result in varEmail containing the following email addresses, including duplicates:
Then we use the Union function to remove the duplicate email addresses:
The expression to use is:
This will result in the duplicates being remove. The result stored in the Compose Remove Duplicates:
Finally, we join all the email addresses together, with each email address separated using the semi-colon character (;) to create an Outlook ready recipient list:
The join expression is:
The recipient list looks like this with no duplicates:
Hope this helps.
My variable is String type its not an array.
Its cant accept by union function. It's getting following error ,
Unable to process template language expressions in action 'Compose' inputs at line '1' and column '3351': 'The template language function 'union' expects either a comma separated list of arrays or a comma separated list of objects as its parameters. The function was invoked with parameters of type 'String'.
If it does not contain variable values in a O365 yes condition is ok,
If it is contain am how to avoid duplicate ?
Hi @Dhinesh28R ,
Based on the screenshot provided, if it does not contain the email, it will append the email, otherwise skip.
I am on mobile hence the designer is set to responsive.
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
The initial variable needs to be of type Array in order for the flow to work.
Initializing the array with a number of email addresses:
["James@james.com", "firstname.lastname@example.org", "email@example.com"]
But you should only append element of the array at a time. This means that your flow may require some modifications.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.