Available actions for trigger rules
@repo/trigger-rules
package supports various action types that can be performed in response to events.
Property | Description | Required |
---|---|---|
template | Email template ID | Yes |
recipient | Email recipient | Yes |
subject | Email subject | No (can be defined in template) |
data | Template variables | No |
cc | Carbon copy recipients | No |
bcc | Blind carbon copy recipients | No |
Property | Description | Required |
---|---|---|
target | Notification target (user ID, role, or team) | Yes |
channel | Notification channel (slack, email, in-app) | Yes |
message | Notification message | Yes |
priority | Notification priority (low, medium, high) | No |
data | Additional data for the notification | No |
Property | Description | Required |
---|---|---|
url | Webhook URL | Yes |
method | HTTP method (GET, POST, PUT, DELETE) | Yes |
headers | HTTP headers | No |
payload | Request payload | No |
timeout | Request timeout in milliseconds | No |
Property | Description | Required |
---|---|---|
name | Function name (must be registered) | Yes |
args | Function arguments | No |
Property | Description | Required |
---|---|---|
operation | Database operation (insert, update, delete, query) | Yes |
table | Database table name | Yes |
where | Condition for update/delete/query | Depends on operation |
data | Data for insert/update | Depends on operation |
returning | Fields to return | No |
Property | Description | Required |
---|---|---|
name | Event name | Yes |
payload | Event payload | Yes |
delay | Delay in milliseconds before triggering | No |
Property | Description | Required |
---|---|---|
level | Log level (debug, info, warn, error) | Yes |
message | Log message | Yes |
data | Additional data to log | No |
{{field.path}}
syntax:
Variable | Description | Example |
---|---|---|
{{now}} | Current timestamp | "timestamp": "{{now}}" |
{{rule.id}} | Current rule ID | "ruleId": "{{rule.id}}" |
{{rule.name}} | Current rule name | "ruleName": "{{rule.name}}" |
{{env.VARIABLE}} | Environment variable | "apiKey": "{{env.API_KEY}}" |