workflow-completed and job-completed), signed with HMAC-SHA256 (circleci-signature header) using the webhook secret Kestrel generates at connect time. Kestrel verifies the signature before evaluating workflows.
Prerequisites
- Organization Admin role in Kestrel
- A CircleCI organization with at least one project
- A CircleCI personal API token for a user that follows the projects your workflows will manage
Setup
1
Create an API token
In CircleCI (
app.circleci.com), go to User Settings → Personal API Tokens and click Create New Token. Give it a name (e.g. kestrel) and copy the token — it is shown only once.The token is sent as the Circle-Token header to the CircleCI v2 API. Kestrel sees the projects the token’s user follows, so follow the projects you want available in workflows.2
Connect in Kestrel
- Navigate to Integrations → CircleCI in your Kestrel dashboard.
- Paste your API token.
- Optionally set a custom API base URL for self-hosted CircleCI server installs (defaults to
https://circleci.com/api/v2). - Click Connect CircleCI — Kestrel validates the token by listing your followed projects and generates a webhook secret for signed deliveries.
3
Register webhooks (for triggers)
Actions work as soon as the token is connected. To have CircleCI events trigger workflows, add an outbound webhook to each project you care about:
- On the Kestrel CircleCI integration page, copy the Webhook URL and the Webhook secret.
- In each CircleCI project, open Project Settings → Webhooks → Add Webhook.
- Set the Receiver URL to the copied webhook URL and paste the webhook secret as the Secret token.
- Select the workflow-completed and/or job-completed events and save.
Project slugs use the
vcs/org/repo form, e.g. gh/acme/api. The project dropdowns in the workflow builder list your followed projects automatically.How It’s Used
In Workflows
Trigger blocks (webhook):- Workflow Failed — fires when a workflow completes with
failedorerrorstatus - Workflow Succeeded — fires when a workflow completes successfully
- Workflow Completed (any status) — fires when a workflow finishes with any status
- Job Failed — fires when a job completes with
failedstatus (finer-grained than workflow-completed)
{{signal.project_slug}}, {{signal.pipeline_id}}, {{signal.workflow_id}}, {{signal.workflow_name}}, {{signal.job_name}}, {{signal.job_number}}, {{signal.status}}, and {{signal.branch}} for downstream steps.
Action blocks:
- Trigger Pipeline — trigger a pipeline on a branch or tag, optionally with pipeline parameters (one
KEY=VALUEper line) - Wait for Pipeline — poll a pipeline’s workflows until they all finish and branch on the overall result
- Get Workflow Status — fetch a pipeline’s workflow statuses without waiting
- Rerun Workflow — rerun a workflow, optionally only its failed jobs (the go-to auto-remediation for flaky builds)
- Cancel Workflow — cancel a running workflow (stop stuck or unwanted runs to free credits)
- Approve On-Hold Job — approve an on-hold approval job so a gated workflow can proceed (e.g. auto-approve staging deploys after checks pass; gate behind an Approval node for production)
- Get Job Test Results — fetch a job’s test results with a failure summary (great for Slack posts or AI analysis)
- Investigate CircleCI — run a read-only AI investigation across pipelines, workflows, jobs, and test results
{{signal.project_slug}} and {{signal.workflow_id}} from the trigger.
Example (CI failure RCA — the flagship CircleCI flow): When a workflow fails on main, fetch the failed job’s test results, run an AI investigation, then post the root cause to Slack #ci and open a Jira ticket.
Example (flaky-build remediation): When a workflow fails, rerun from failed once automatically; if the rerun also fails, page on-call via PagerDuty with the investigation summary.
Example (gated deploys): When a staging workflow succeeds, run smoke checks, then approve the on-hold production deploy job — or route a Slack approval first.
Disconnecting
- Navigate to Integrations → CircleCI
- Click Disconnect
- Confirm the disconnection