Skip to Content

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-schema.yaml
action: provider: github | vercel | slack | email method: string # provider-specific method name params: # method-specific parameters key: value
FieldTypeRequiredDescription
providerstringYesTarget service (github, vercel, slack, or email)
methodstringYesThe operation to perform
paramsobjectYesMethod-specific parameters (can be empty {} for some methods)

GitHub Actions

Interact with GitHub repositories, pull requests, and issues.

Methods

MethodDescriptionParams
pr_commentPost a comment on a pull requestbody
create_issueCreate a new issuetitle, body, labels (optional)
add_labelAdd a label to a PR or issuelabel

pr_comment

Posts a comment on the pull request that triggered the rule. Best used with webhook triggers on PR events.

pr-comment.yaml
action: provider: github method: pr_comment params: body: "This PR has {{condition.result}} lines changed. Consider breaking it into smaller PRs for easier review."
ParamTypeRequiredDescription
bodystringYesMarkdown-formatted comment text

create_issue

Creates a new issue in the repository.

create-issue.yaml
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"
ParamTypeRequiredDescription
titlestringYesIssue title
bodystringYesIssue body (supports Markdown)
labelsstringNoComma-separated label names

add_label

Adds a label to the triggering pull request or issue.

add-label.yaml
action: provider: github method: add_label params: label: "large-pr"
ParamTypeRequiredDescription
labelstringYesLabel name to apply

Vercel Actions

Manage Vercel deployments.

Methods

MethodDescriptionParams
rollbackRoll back to the previous deployment(none required)
redeployTrigger a new deployment(none required)

rollback

Rolls back to the last successful deployment. Useful for automated recovery when a workflow or health check fails.

rollback.yaml
action: provider: vercel method: rollback params: {}

redeploy

Triggers a fresh deployment of the current production branch.

redeploy.yaml
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

MethodDescriptionParams
send_messagePost a message to a channelchannel, text
send_dmSend a direct message to a useruser, text

send_message

Posts a message to a specified Slack channel.

slack-send-message.yaml
action: provider: slack method: send_message params: channel: "#engineering" text: "Stale PRs detected in acme/webapp. Oldest: {{condition.result}} days. Checked at {{now}}."
ParamTypeRequiredDescription
channelstringYesChannel name (include # prefix)
textstringYesMessage text (supports Slack markdown)

send_dm

Sends a direct message to a specific Slack user.

slack-send-dm.yaml
action: provider: slack method: send_dm params: user: "U12345678" text: "Your PR has been open for {{condition.result}} days. Please review or close it."
ParamTypeRequiredDescription
userstringYesSlack user ID
textstringYesMessage text

Email Actions

Send emails via the configured email provider (Resend).

Methods

MethodDescriptionParams
sendSend an emailto, subject, body

send

Sends an email to one or more recipients.

email-send.yaml
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."
ParamTypeRequiredDescription
tostringYesRecipient email address (supports template variables)
subjectstringYesEmail subject line
bodystringYesPlain 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.

template-usage.yaml
action: provider: slack method: send_message params: channel: "#alerts" text: | Rule: {{rule.name}} Result: {{condition.result}} Time: {{now}} Owner: {{org.owner.email}}

Complete Examples

vercel-cost-spike.yaml
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