Email module with Templates - send to multiple recipients

1
Hi there, I successfully integrated the E-mail module with templates into my app. A few test runs turned out to be working and now I have the following problem challenge: My app manages responsibilities and returns one or more (!) responsible colleagues to the user which they could talk to. For every responsible colleague I – of course – track the required email address in the respective entity. There seems to be a discrepancy between my loop that reduces the list of all colleagues to only those responsible and the email module.  The loop returns a list (which is also displayed in the app) but email expects only “one” colleague. I wonder how I can break down the list for the email module (called via a Microflow call in the main Microflow) so that every colleague that remains on the list receives an email that there is a new “item” (so to say). Thank you in advance.
asked
4 answers
2

Hi Philipp,

the email module can handle emails with many receivers in CC/TO/BCC.

I recall, somewhere there is a @constant setting the delimiter/separator between email-addresses (preset “;”).

BR, Boris

answered
1

Hello,

you can separate between them using comma ‘,’
Idk if it will help you or not but you can do the below:
- create variable ‘Recipients’
- get a list of all cst emails who you want to send them the email
- get the head of the list ‘HeadRecipient’ and change the var ‘Recipients’ to the ‘HeadRecipient’

- get the tail of the list of the list and check if empty then send the email if not make a loop on the tail and inside the loop change the var ‘Recipients’ to ($Recipients+','+$IteratorRecipient/Email)

you can set the sent ‘To’ Value to your ‘recipient’ string which contains all of strings emails separated by ‘,’.

answered
0

You can solve it to create a string with all email addresses separated by a semi-column ; 

  1. Create a string variable
  2. Iterate over the list of colleques
  3. Change the string variable
if
$StringVariable = ''
then
$IteratorColegue/EmailAddress
else
'; ' + $IteratorColegue/EmailAddress

 

answered
0

Thank you for your feedback. As it seems to be impossible to embed a screenshot in a direct response, I will use the “Your answer” to respond.

I just don’t know, what to do with that string variable then (see screenshot).

I created it in the loop that reduces the list of all colleagues (buyers in my app) to only the relevant / responsible ones.

Further down that Microflow I call the CreateAndSendEmail Microflow. 

Now that I have this string variable, how can I hand it over to the (sub-)Microflow (or am I thinking in the wrong direction here)??

answered