When you enter Groovy code into the Notice Request form, you are in fact providing the implementation of a method of a Groovy class that N4 will construct at runtime. The method you are implementing is passed two object instances:
an instance of GroovyEvent, which represents the Event that has occurred, in a parameter called "event"
an instance of GroovyApi, which provides general API's into N4, in a parameter called "api".
The method has void return type.