
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 10:52 PM
Hi there,
I'm relatively new to ServiceNow, just finished the fundamentals path and I'm on my first project.
I worked as webdeveloper for many years, so I do have a quite good understanding of many programming languages and logics. Only a hard time sometimes to use old javascript, as I've used ES6 a lot and servicenow cannot handle modern stuff ;))
To my issue.
I'm using "Flow Designer" and face a problem here. I need to create an eventQueue that fires and event for sending an email. I don't want to send the email directly in flow, it just should create that queue element for the sysevent table.
For many things there are actions available, but why not for creating an event?
What I want to achieve would be quite easy ..
gs.eventQueue('pfx_time_entries_rejected', Result, Result.u_ts_employee);
Is there an easy way to eventQueue something in Flow Designer or do I actually have to create a record into the sysevent table? Or even worse, write an own action somehow for this simple additional step?
Of course I invested some hours searching for this topic first, before asking here 😉 But, as a new servicenow developer, it can be quite overwhelming finding stuff ;))
I'm also quite surprised that there is no button for a custom action. I mean, every other system does have mostly the ability to add an action with custom code. But here are only predefined actions and not a blank action to write own code.
hope someone can help me.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 11:06 PM
Hi Michael,
In Flow designer you can create an action. Give this action the "Run script" and inside of that you can make your eventQueue call.
You can test the custom action before saving+publishing.
Once published, from your main flow you can add an action and you will find your custom action in the list.
Alternatively, you don't need to go through all this trouble and instead use the createRecord OOTB action to create a new record for the event.
Useful resource for events/custom actions in flow:
https://community.servicenow.com/community?id=community_article&sys_id=3450a52fdbcf2740afc902d5ca96190b
Hope this helps.
Please mark my answer as Correct/Helpful based on impact
Regards,
Dan H

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 09:49 PM
Thank you, that was it.
Seems also to not matter what item is as instance.. works perfectly fine with the triggered object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 02:39 AM
Wow.. that was quick, seems like the servicenow community is the way to go 😉
Sadly I can only mark one correct answer, even though both are very right and helpful.
Well, seems like it is as I thought. Either i create the record into the table directly or create a custom action.
Thank you guys very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 02:45 AM
No problem. Happy to help 🙂