Hi,
In my app i need to send email for Users and O365 group members.
Am using variable in Send Email To address.
So i need to get all O365 members Email in that variable.
Its an array value.
How to convert this array into string?
Thanks,
Dhinesh
Solved! Go to Solution.
Presuming an array like this:
["a@example.com","b@example.com","c@example.com"]
You can turn it into a string separated by Semicolons, which should be suitable for the To field in Actions like "Send and Email" Action, like this:
join(outputs('Compose'),';')
instead of outputs('Compose') above you can put whatever Action Block Outputs is having the Array of e-mail addresses.
Example below:
When testing the run, it is successful:
Output is
a@example.com;b@example.com;c@example.com
In send an email Action's To field, in order to send to multiple people you need a string with each email addresss separated by a semicolon. If it is an Array of e-mail addresses right now, then using the join expression and the Array as first argument, and then the semicolon character in single quotes as the second argument should accomplish the goal.
Check if the above helps @Dhinesh28R
Presuming an array like this:
["a@example.com","b@example.com","c@example.com"]
You can turn it into a string separated by Semicolons, which should be suitable for the To field in Actions like "Send and Email" Action, like this:
join(outputs('Compose'),';')
instead of outputs('Compose') above you can put whatever Action Block Outputs is having the Array of e-mail addresses.
Example below:
When testing the run, it is successful:
Output is
a@example.com;b@example.com;c@example.com
In send an email Action's To field, in order to send to multiple people you need a string with each email addresss separated by a semicolon. If it is an Array of e-mail addresses right now, then using the join expression and the Array as first argument, and then the semicolon character in single quotes as the second argument should accomplish the goal.
Check if the above helps @Dhinesh28R
Hi @poweractivate,
In my O365 Ad group am having 3 users .
But its shows only one users.
My flow is correct or not?
Its not sending mail to O365 group members.
Thanks,
Dhinesh
1. If you are appending to a variable, The Send an E-mail maybe need to be outside and after the Apply to Each
2. It depends on "value" in Apply to Each. The problem may be with the Action Block that is outputting "value" - double check it to see if it needs to be adjusted.
Try join(array()) and see if it works. It depends what is the value of the string though.