We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Email to User Group

jezzanuena
Regular Contributor
Regular Contributor

Hello! Regarding this topic. I was trying to do the same, but it does not work for me. Could somebody help? https://forums.saviynt.com/t5/general-discussions/using-user-groups-in-email-templates/m-p/2820/thre... 

25 REPLIES 25

rushikeshvartak
All-Star
All-Star

What’s error share logs and your condition currently configured 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello, @rushikeshvartak Thank you for the response. Here you go:

This is the group. It has members with active email addresses:

jezzanuena_0-1672875927211.png

Here is the email template with the query provided in the link above which mentioned that worked:

jezzanuena_1-1672875993709.png

And here are the email templates configured at the endpoint level:

jezzanuena_2-1672876065715.png

Am not sure if there's anything that I missed reason it didn't work.

 

 

Try attaching email template in workflow


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Still did not send any emails.

jezzanuena_0-1672889462784.png

 

what is error in logs


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

What is the error in logs when you use the template at endpoint level?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

shubhamj596
Regular Contributor
Regular Contributor

Hi,

 

I tried using the same syntanx:

 

${com.saviynt.ecm.identitywarehouse.domain.Users.findAllByIdInList(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.findAllByUser_groupkey(com.saviynt.ecm.identitywarehouse.domain.Usergroups.findByUser_groupname("test-usergroup")?.id)?.userkey).email?.join(',')}

under the endpoint to send the email, it gives the below error:

shubhamj596_0-1672994862143.png

Regards,

Shubham

 

What version of Saviynt you have in your environment. Looking at error it is not recognizing the variable


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

shubhamj596
Regular Contributor
Regular Contributor

Version is 2020.1

did you tried in email body variables are general methods of saviynt so ideally it should work


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi, @rushikeshvartak hmm, it didn't work, so when I tried to remove the email body and retain the "Test" plus hard coding my email address to the TO field, it did work. hence it seems that there is something wrong with the following:

${com.saviynt.ecm.identitywarehouse.domain.Users.findAllByIdInList(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.findAllByUser_groupkey(com.saviynt.ecm.identitywarehouse.domain.Usergroups.findByUser_groupname("IT Users")?.id)?.userkey).email?.join(',')}

try group name without space


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

So this is what it looks like now, it still didn't work. Have you tried this before?

jezzanuena_0-1673322012939.png

 

jezzanuena_1-1673322026881.png

[This post has been edited by a Moderator to remove sensitive information from the screenshots.]

Try creating new template


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I tried a different group name, the one without a space in it. I also tried to bold format the group name as well as the one without a format, but nothing worked. :'(

Print content in email body to check what values are populated


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Used "Test" in the body. Works good with hard coding the email but not with the syntax provided above

Screenshot ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I quite don't understand. Does it work for you? How?

jezzanuena
Regular Contributor
Regular Contributor

Hello All! I used "Test" in the body but it didn't work.

Print Below in Email Body (Make sure you have group marked bold

${com.saviynt.ecm.identitywarehouse.domain.Users.findAllByIdInList(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.findAllByUser_groupkey(com.saviynt.ecm.identitywarehouse.domain.Usergroups.findByUser_groupname("test-usergroup")?.id)?.userkey).email?.join(',')}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Oh yeah! Thank you for pointing that out. 

Hmm as for the email: I did what I understood in your instructions but nothing happened though. 

jezzanuena_0-1673239256424.png

 

hardcode your email in to address


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sorry not yet resolved. I mistakenly click Accept... button

Screenshot


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.