- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 05:11 AM
If yes, how to pass this object to event so that the script getting fired by the event will be able to use all the email entities. (like any string passed in the email in key value format)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 05:19 AM
Hi @nirwan_ritik,
Yes it is an object. This article explains it a bit:
Accessing email object variables (servicenow.com)
You could pass this object as JSON string to the event:
var emailJson = JSON.stringify(email);
In the script action you could use it again as:
var email = JSON.parse(event.parm1)
I think you could send the sys_email global variable as GlideRecord in the inbound action, without having to query it first. If that doesn't work, you'll have to query the record first to pass it.
So all in all it would look something like this:
var emailJson = JSON.stringify(email);
var dt = new GlideDateTime();
dt.addSeconds(20*60);
gs.eventQueueScheduled('<<eventname>>', sys_email, emailJson, parm2 (optional), dt);
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 05:19 AM
Hi @nirwan_ritik,
Yes it is an object. This article explains it a bit:
Accessing email object variables (servicenow.com)
You could pass this object as JSON string to the event:
var emailJson = JSON.stringify(email);
In the script action you could use it again as:
var email = JSON.parse(event.parm1)
I think you could send the sys_email global variable as GlideRecord in the inbound action, without having to query it first. If that doesn't work, you'll have to query the record first to pass it.
So all in all it would look something like this:
var emailJson = JSON.stringify(email);
var dt = new GlideDateTime();
dt.addSeconds(20*60);
gs.eventQueueScheduled('<<eventname>>', sys_email, emailJson, parm2 (optional), dt);
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 05:41 AM
This really helped, Thanks 🙂