How automations work
An automation is an organization-level rule made of connected steps:- A trigger starts the rule from a campaign, workflow, repository, schedule, issue status, or webhook event.
- Optional controls branch or delay the rule before later steps run.
- Actions run work, update issue state, scan code, create campaigns, call a webhook, or hand repository work to a coding agent.
- Execution logs show what ran and where a rule needs attention.
Create an automation
Choose a trigger
Start from the event that should wake up the rule. Automations can react to task status changes, workflow completions or failures, pull request state changes, completed CI checks, Jira or Linear status changes, schedules, and incoming webhooks.
Add filters and controls
Narrow the trigger to the cases that matter. Pull request triggers can filter by repository, Codemod bot PRs, author login, and title regex. CI triggers can filter by check result. Task and issue triggers can filter by previous or next status.Add If / Switch when the rule needs to branch based on event data, or Delay when later work should wait before continuing.
Add actions
Add the work Codemod should perform after the trigger. Actions can run a linked workflow, update an issue status, run a coding agent against selected repositories, scan codebases, create a campaign, or send an HTTP webhook.
Use runtime fields
Automation templates can insert fields from the trigger and earlier steps. The editor exposes available fields, and templates support Handlebars syntax such as
{{field}}, {{#each scan.rows}}...{{/each}}, {{json value}}, and {{expr jsExpression}}.Triggers
Automations currently support these shipped trigger categories:- Campaign and workflow events: task status changes, workflow completions, and workflow failures.
- Code and CI events: pull request state changes and completed CI checks. CI checks can match
Failure,Success,Timed Out, orAction Required. - Project management events: Jira or Linear issue status changes, matched by exact status names.
- Schedules and webhooks: cron schedules with a timezone, or incoming HTTP
POSTpayloads.
Actions and controls
Use actions to start the next unit of work:- Run Workflow starts the linked workflow for the task associated with the incoming event.
- Update Issue Status moves the mapped Jira or Linear issue to a selected status.
- Coding Agent checks out one or more repositories, follows a prompt, and can commit changes or open a pull request when configured.
- Scan Codebase runs an ast-grep or JSSG query against selected repositories.
- Create Campaign creates a follow-up campaign project with a templated title and optional description.
- Webhook sends an HTTP request with the automation context or a custom body.
Scan code before acting
The Scan Codebase action uses the same query model as Insights. It can run ast-grep rules or JSSG queries and return either:- A scalar result available as
scan.totalCount - Table rows available as
scan.rows
Before you start
Make sure your organization has the integrations needed for the repositories, issues, or events you want to automate:GitHub integration
Connect GitHub repositories that automations and campaigns can act on.
GitLab integration
Connect GitLab repositories and webhook events.
Jira integration
Connect Jira projects when automations need issue status events or updates.
Related docs
Campaigns
Run coordinated migrations and track the work automations create.
Insights
Measure code patterns and migration progress before or after automation.