Actions
Actions define what a rule does when it fires. Each action targets a specific provider and calls a method with parameters. Action params support template variables for dynamic content.
Schema
action:
provider: github | vercel | slack | email
method: string # provider-specific method name
params: # method-specific parameters
key: value| Field | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | Target service (github, vercel, slack, or email) |
method | string | Yes | The operation to perform |
params | object | Yes | Method-specific parameters (can be empty {} for some methods) |
GitHub Actions
Interact with GitHub repositories, pull requests, and issues.
Methods
| Method | Description | Params |
|---|---|---|
pr_comment | Post a comment on a pull request | body |
create_issue | Create a new issue | title, body, labels (optional) |
add_label | Add a label to a PR or issue | label |
pr_comment
Posts a comment on the pull request that triggered the rule. Best used with webhook triggers on PR events.
action:
provider: github
method: pr_comment
params:
body: "This PR has {{condition.result}} lines changed. Consider breaking it into smaller PRs for easier review."| Param | Type | Required | Description |
|---|---|---|---|
body | string | Yes | Markdown-formatted comment text |
create_issue
Creates a new issue in the repository.
action:
provider: github
method: create_issue
params:
title: "Cost alert: Vercel spend exceeded threshold"
body: "MTD spend is ${{condition.result}} as of {{now}}. Rule: {{rule.name}}."
labels: "billing,automated"| Param | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Issue title |
body | string | Yes | Issue body (supports Markdown) |
labels | string | No | Comma-separated label names |
add_label
Adds a label to the triggering pull request or issue.
action:
provider: github
method: add_label
params:
label: "large-pr"| Param | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label name to apply |
Vercel Actions
Manage Vercel deployments.
Methods
| Method | Description | Params |
|---|---|---|
rollback | Roll back to the previous deployment | (none required) |
redeploy | Trigger a new deployment | (none required) |
rollback
Rolls back to the last successful deployment. Useful for automated recovery when a workflow or health check fails.
action:
provider: vercel
method: rollback
params: {}redeploy
Triggers a fresh deployment of the current production branch.
action:
provider: vercel
method: redeploy
params: {}Rollback and redeploy actions operate on production deployments. Use conditions carefully to avoid unintended deployments.
Slack Actions
Send messages to Slack channels or direct messages to users.
Methods
| Method | Description | Params |
|---|---|---|
send_message | Post a message to a channel | channel, text |
send_dm | Send a direct message to a user | user, text |
send_message
Posts a message to a specified Slack channel.
action:
provider: slack
method: send_message
params:
channel: "#engineering"
text: "Stale PRs detected in acme/webapp. Oldest: {{condition.result}} days. Checked at {{now}}."| Param | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Channel name (include # prefix) |
text | string | Yes | Message text (supports Slack markdown) |
send_dm
Sends a direct message to a specific Slack user.
action:
provider: slack
method: send_dm
params:
user: "U12345678"
text: "Your PR has been open for {{condition.result}} days. Please review or close it."| Param | Type | Required | Description |
|---|---|---|---|
user | string | Yes | Slack user ID |
text | string | Yes | Message text |
Email Actions
Send emails via the configured email provider (Resend).
Methods
| Method | Description | Params |
|---|---|---|
send | Send an email | to, subject, body |
send
Sends an email to one or more recipients.
action:
provider: email
method: send
params:
to: "{{org.owner.email}}"
subject: "Weekly repo summary for {{rule.name}}"
body: "You have {{condition.result}} open PRs as of {{now}}. Review them at your earliest convenience."| Param | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient email address (supports template variables) |
subject | string | Yes | Email subject line |
body | string | Yes | Plain text email body |
Use {{org.owner.email}} to dynamically send to the organization owner without hardcoding addresses.
Using Template Variables in Actions
All action params support template variables. Variables are resolved at execution time.
action:
provider: slack
method: send_message
params:
channel: "#alerts"
text: |
Rule: {{rule.name}}
Result: {{condition.result}}
Time: {{now}}
Owner: {{org.owner.email}}Complete Examples
Slack alert
name: vercel-cost-spike
trigger:
type: schedule
cron: "0 */6 * * *"
condition:
provider: vercel
check: billing.mtd
operator: gt
value: 50
action:
provider: slack
method: send_message
params:
channel: "#billing"
text: "Vercel MTD spend: ${{condition.result}} (threshold: $50). Checked at {{now}}."Next Steps
- Template Variables for dynamic param values
- Conditions to control when actions fire
- Triggers to configure execution timing
- YAML Syntax for full schema reference