Skip to main content
October 4, 2023
Question

Send Email to Multiple Recipients where one Constants is USER type and another one Email Type

  • October 4, 2023
  • 3 replies
  • 0 views

Hi Community ,
I want to send email on the basis of Two Constants.


1. Constant Type is of User
2. Constant Type is of Email. ( bcz it is a Group Email for e.g. Support Group)

How to write expression on Email Node in Process Model for this.

Please help me on this.

Many Thanks !

Regards,
Abdus Samad

3 replies

October 4, 2023

Create a rule that obtains the email of every user contained in your constant using user(ri!user,"email") and then, append it to your second constant of email. Once you only have emails as text format, you can cast them to email recipient type

toemailrecipient(
  toemailaddress("example@mail.com")
)

This value can be used in your Send E-mail Smart Service

October 4, 2023

Hey Jesus ,


My first constant is of USER Type only.
And When we use just USER CONSTANT , it directly fetch Email .Correct me if I am wrong.
The other one is directly Email type.

Can you please give me the complete expression which we will have to implement as I am getting little bit confused.

Regards,
Abdus Samad

October 4, 2023

Hi abduss0004,

1) Create an expression rule having input  named "value" and type as any type. Attached code here for reference

 toemailrecipient(
toemailaddress(
ri!value
)

2) Pass two values user constant and email from parent rule. You can able to send email to these two email address successfully.