Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Can we pass custom data from email script to notification template?

I've a Notification (sysevent_email_action) that will be using a Email Script (sys_script_email). The notification is defined on "Global" table and under "Send when", it's set as "Event is fired". The event contains parm1 data which will be processed inside the email script.

I was wondering if from inside the email script, I can define a variable and then use that variable inside the notification template?

So, the flow is:

(a) Event abc is fired with event.parm1 containing some data

(b) Notification gets executed when abc is triggered

(c) Notification calls an email script

(d) Inside the email script, abc's parm1 is accessed and a variable is defined. Let's say something like this:

    (function runMailScript(current, template,
 email, email_action, event) {
    
             var eventData = JSON.parse(event.parm1);
             // do something with eventData
             // then define a variable
             var data_to_use_in_template = eventData.foo;
             var data_to_use_in_template2 = eventData.bar;
    
    })(current, template, email, email_action, event);

(e) In Notification template, somehow use data_to_use_in_template and data_to_use_in_template2 that got populated with data in email script.

Hi,

Thank you for responding back. Here are details of the order:

Foo: ${data_to_use_in_template}

Bar: ${data_to_use_in_template2}
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!