Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How we call script Include from email templates?

gaurav_p1
Kilo Contributor
 
2 REPLIES 2

Satishkumar B
Giga Sage

Hi @gaurav_p1 

 

 

You can invoke an email script within an email template using the syntax `${mail_script:script name}`.

Inside the email script, you can access a Script Include using the code `var scriptInclude = new emailScriptUtil().getNotifDetails();`.

———————————————-
Please consider marking my reply as Helpful👍 and/or Accept Solution☑️, if applicable. Thanks!

SN_Learn
Kilo Patron

Hi @gaurav_p1 ,

 

You can call a email script in email template with the below syntax:

${mail_script:script name}

 

In Email script, you can call script include as below:

var scriptInclude = new emailScriptUtil().getNotifDetails();

 

Here, 'emailScriptUtil' is script include name and 'getNotifDetails' is function name of that script include.

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.