Automation for Jira
ScriptRunner provides an action for Automation for Jira, that lets you run your own code.
At this stage the only function available is a "custom script", but you can call other ScriptRunner functions programmatically.
The issue object that triggered the event
The ApplicationUser that initiated the event
An ErrorCollection - use it to record error conditions, eg
errorCollection.addErrorMessage("Something went wrong")
Use this if you need to retrieve any information about the rule that is currently firing