Send email notification to multiple recipients

Hi I am trying to send multiple emails to recipients that have selected to watch when new comments get added to specific tickets. However, the email doesn’t get sent.

What I have done:

  1. insert the records in the comments table
  2. add the setup mailer
  3. set up the DB query that holds the information for the users that selected to be notified by email when a comment is added.
  4. Added a repeat step and it source is the query created in step 4
  5. Add the send mail step

I know I am missing something, or not doing it correctly, but I can’t figure out what it is.
Any help will be much appreciated.

Note: the email gets send without a problem, if I do not use the repeat step and only send one email.

Thanks

J

In this case I think it’s just the wrong value connected in the email recipient inside the repeat. Make sure that you select the repeat value and not directly the value of the db query

Is it always the same number of email recipients? If so, I have been able to solve this by setting up a ‘Send Mail’ for each recipient. That way I didn’t have to use a repeat.

Also, although likely not related, you don’t need the ‘Setup Mailer’ step. That should now be set up in your globals.

Hi htatd, thanks for the suggestion. The value was being pulled from the repeat step.

@brad, thanks for the tip regarding the about the “setup mailer” it was removed!
Unfortunately, the number of people that will receive an email after a comment is added to the system can vary some times it can be 1, 2 or 10.

Any other ideas will be appreciated.

Thanks

J

Hi,

I would disable (temporarily) the security restrict and manually define values in the insert step. Then in the repeat step, disable the send mail and export the repeat_user_email value and run the action to see what the output is…
The repeat works as it should? Does it output the user_email field?
Then if it works fine, check the send email step

1 Like

As @famousmag says, I would disable the Send Mail action but add a Set Value action, make sure it’s output is ticked and set its value to be user_email from the repeat. Then run the script directly and see what the repeat is actually outputting.

2 Likes