Some variables are in scope that you can use in your action:
- Table (uppercase T), the class of Saltcorn tables you can use to find tables in which you can then insert, update etc rows.
- table (lower case t), the table of the row triggering the action, if available
- row, the row triggering the action, if available
- user, the logged in user
- Actions, an object containing the system actions. The keys are the action names and the values are functions which run the action. Configuration values can be passed in as the argument to the function. TODO example
- emitEvent, a function that causes an event to be committed when run. The arguments are: emitEvent(eventType: string, channel: string, payload: object) – note, this is three distinct arguments. Only the first argument, the event type, is mandatory.
- channel, a string denoting the channel of the triggering event available
- Any functions supplied by plugins are also available