Skip to main content
Automations let you turn recurring codebase maintenance into rules that run when something happens, such as a campaign task moving status, a pull request check failing, a scheduled scan, or an incoming webhook. Use automations when Codemod should watch for a condition, inspect code or event payloads, and start the next action without someone repeating the same manual setup.

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.
For example, an automation can react when a campaign-generated pull request has a failing CI check, run a codebase scan, and then start follow-up work with the relevant event fields already available.

Create an automation

1

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.
2

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.
3

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.
4

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}}.
5

Save and monitor

Save the automation after the graph is configured. Incoming webhook endpoints are generated after the rule is saved. Use execution logs to review runs, inspect trigger payloads and action results, and diagnose failed steps.

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, or Action 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 POST payloads.

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.
Use If / Switch to branch on event data and Delay to wait before later steps run.

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
Use scan output in later templates to decide whether to create a campaign, send a webhook, or ask a coding agent to work only when the query finds matching code.

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.

Campaigns

Run coordinated migrations and track the work automations create.

Insights

Measure code patterns and migration progress before or after automation.