Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Issue with Email Template Variable ${tasks?.endpoint?.getOwnersEmail()} for Endpoint Owners

markmch
New Contributor
New Contributor

Hi Saviynt Team,

I hope this message finds you well.

I am encountering an issue with our email template for analytics reports. Specifically, the variable ${tasks?.endpoint?.getOwnersEmail()} does not seem to be functioning as expected when used in the "To" field of the email template. Our objective is to automatically send the analytics report to the owners of the endpoint (typically user groups) upon execution.

Here are the details:

  • Expected Functionality: The variable ${tasks?.endpoint?.getOwnersEmail()} should retrieve and populate the email addresses of the endpoint owners (user groups) in the "To" field.
  • Current Issue: The emails are not being sent to the endpoint owners when this variable is used. However, the template functions correctly when a specific email address is manually entered in the "To" field.

I have reviewed the available documentation on supported variables and attempted several troubleshooting steps, but the issue persists. Could you please assist with the following:

  1. Confirm whether the variable ${tasks?.endpoint?.getOwnersEmail()} is supported for use in the "To" field of analytics email templates.
  2. Provide any necessary corrections or alternative solutions to achieve the desired functionality.

Any guidance or support you can provide to resolve this issue would be greatly appreciated.

Thank you for your assistance.

Best regards,

markmch_0-1721755817478.png

 

5 REPLIES 5

dgandhi
All-Star
All-Star

Use ${task?.endpoint?.getOwnersEmail()} , you were trying tasks but it should be task

This should work, assuming that owner is added at below location at endpoint level

dgandhi_0-1721757823561.png

 

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

It's using User Group as Owner Type and I have test with ${task?.endpoint?.getOwnersEmail()}, but it's not working.

markmch_1-1721768183338.png

 

This email is triggering from analytics. In analytics query you need to attach report owner as endpoint owner group and then use ${ownerEmail}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

rushikeshvartak
All-Star
All-Star
  • task object is not exposed from analytics report
  • Please validate supported variables.

    Purpose :

    To get what variables are present to use in the email template.

    Email Template steps :

    keep Advanced HTML CSS flag is checked

    Keep your email Address in TO

    TO /CC/BCC & Subject - Don't use any dynamic variables

    Add only below code in Email Body
    ${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}

    Output : using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

It's printing the following:

date = 2024-07-23 20:42:54br> endpoint = nullbr> totalRecords = 255br> analyticsConfig = com.saviynt.ecm.analytics.AnalyticsConfigES : 1499br> endpointDisplayName = nullbr> baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECMbr> ownerEmail = br> out = java.io.PrintWriter@34eaad70br> [date:2024-07-23 20:42:54, endpoint:null, totalRecords:255, analyticsConfig:com.saviynt.ecm.analytics.AnalyticsConfigES : 1499, endpointDisplayName:null, baseUrlForEmail:https://release-n-plus-one.saviyntcloud.com/ECM, ownerEmail:, out:java.io.PrintWriter@34eaad70]

Appears not to be linking even the endpoint field.