Skip to content

CircleCI

Trigger and monitor CircleCI pipelines

Create a Personal API Token in CircleCI → User Settings → Personal API Tokens

Triggers when a CircleCI workflow completes.

  • Workflow chaining: Start SuperPlane workflows when CircleCI workflows complete
  • Status monitoring: Monitor CI/CD workflow results
  • Notifications: Send alerts when workflows succeed or fail
  • Post-processing: Process artifacts after workflow completion
  • Project Slug: The CircleCI project slug (e.g., gh/username/repo)

Each workflow completion event includes:

  • workflow: Workflow information including ID, name, status, and URL
  • pipeline: Parent pipeline information including ID, number, and trigger details
  • project: Project information
  • organization: Organization information

This trigger automatically sets up a CircleCI webhook when configured. The webhook is managed by SuperPlane and cleaned up when the trigger is removed.

{
"data": {
"happened_at": "2021-09-01T22:49:34.317Z",
"id": "3888f21b-eaa7-38e3-8f3d-75a63bba8895",
"pipeline": {
"created_at": "2021-09-01T22:49:03.544Z",
"id": "1285fe1d-d3a6-44fc-8886-8979558254c4",
"number": 130
},
"project": {
"id": "84996744-a854-4f5e-aea3-04e2851dc1d2",
"name": "repo",
"slug": "github/username/repo"
},
"type": "workflow-completed",
"workflow": {
"created_at": "2021-09-01T22:49:03.616Z",
"id": "fda08377-fe7e-46b1-8992-3a7aaecac9c3",
"name": "build-test-deploy",
"status": "success",
"stopped_at": "2021-09-01T22:49:34.170Z",
"url": "https://app.circleci.com/pipelines/github/username/repo/130/workflows/fda08377-fe7e-46b1-8992-3a7aaecac9c3"
}
},
"timestamp": "2021-09-01T22:49:34.317Z",
"type": "circleci.workflow.completed"
}

The Get Flaky Tests component identifies flaky tests in a CircleCI project using the Insights API.

  • Test reliability: Identify tests that pass and fail inconsistently
  • CI stability: Find flaky tests that cause unreliable builds
  • Quality improvement: Prioritize fixing flaky tests for better developer experience
  • Project Slug: CircleCI project slug (e.g., gh/username/repo)

Emits a circleci.flakyTests payload with a list of flaky tests and their flakiness data.

{
"data": {
"flakyTests": [
{
"classname": "auth_test.go",
"file": "pkg/auth/auth_test.go",
"jobName": "test",
"pipelineName": "build-pipeline",
"source": "go",
"testName": "TestUserAuthentication",
"timesFlaky": 8,
"workflowName": "build-test-deploy"
},
{
"classname": "cache_test.go",
"file": "pkg/cache/cache_test.go",
"jobName": "test",
"pipelineName": "build-pipeline",
"source": "go",
"testName": "TestCacheInvalidation",
"timesFlaky": 3,
"workflowName": "build-test-deploy"
}
],
"totalFlakyTests": 2
},
"timestamp": "2021-09-01T22:55:34.317Z",
"type": "circleci.flakyTests"
}

The Get Last Workflow component retrieves the most recent workflow for a CircleCI project.

  • Latest status check: Get the most recent workflow to check project health
  • Branch monitoring: Monitor the latest workflow on a specific branch
  • Status filtering: Find the last workflow with a specific status (e.g., last successful build)
  1. Fetches recent pipelines for the project (optionally filtered by branch)
  2. Iterates through pipelines to find workflows
  3. Returns the first workflow matching the optional status filter
  • Project Slug: CircleCI project slug (e.g., gh/username/repo)
  • Branch: Optional branch filter
  • Status: Optional workflow status filter (success, failed, etc.)

Emits a circleci.workflow payload with the most recent matching workflow details.

{
"data": {
"createdAt": "2021-09-01T22:49:03.544Z",
"id": "fda08377-fe7e-46b1-8992-3a7aaecac9c3",
"name": "build-test-deploy",
"pipelineId": "1285fe1d-d3a6-44fc-8886-8979558254c4",
"status": "success",
"stoppedAt": "2021-09-01T22:55:34.317Z"
},
"timestamp": "2021-09-01T22:55:34.317Z",
"type": "circleci.workflow"
}

The Get Recent Workflow Runs component fetches recent individual runs for a named CircleCI workflow via the Insights API.

  • Workflow health monitoring: See recent run statuses and durations at a glance
  • Performance tracking: Monitor how long workflow runs take over time
  • Branch comparison: Compare recent runs across branches
  1. Calls the CircleCI Insights endpoint for the given project and workflow name
  2. Returns a list of individual workflow runs (up to 90 days back)
  3. Each run includes its status, duration, branch, timestamps, and credits used
  • Project Slug: CircleCI project slug (e.g., gh/username/repo)
  • Workflow Name: Name of the workflow to fetch runs for
  • Branch: Optional branch filter (defaults to the project’s default branch)

Emits a circleci.workflowRuns payload containing an array of recent workflow runs with fields like id, status, duration, branch, createdAt, stoppedAt, and creditsUsed.

{
"data": {
"runs": [
{
"branch": "main",
"createdAt": "2021-09-01T22:49:03.544Z",
"creditsUsed": 150,
"duration": 384,
"id": "fda08377-fe7e-46b1-8992-3a7aaecac9c3",
"isApproval": false,
"status": "success",
"stoppedAt": "2021-09-01T22:55:27.544Z"
},
{
"branch": "main",
"createdAt": "2021-08-31T14:22:10.000Z",
"creditsUsed": 160,
"duration": 412,
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"isApproval": false,
"status": "failed",
"stoppedAt": "2021-08-31T14:29:02.000Z"
}
]
},
"timestamp": "2021-09-01T22:55:34.317Z",
"type": "circleci.workflowRuns"
}

The Get Test Metrics component fetches test performance data from the CircleCI Insights API.

  • Test health monitoring: Track most failed and slowest tests
  • CI optimization: Identify tests that slow down your pipeline
  • Quality tracking: Monitor test success rates across runs
  • Project Slug: CircleCI project slug (e.g., gh/username/repo)
  • Workflow Name: Name of the workflow to get test metrics for

Emits a circleci.testMetrics payload with most failed tests, slowest tests, and test run summaries.

{
"data": {
"mostFailedTests": [
{
"classname": "auth_test.go",
"failedRuns": 5,
"flaky": true,
"testName": "TestUserAuthentication",
"totalRuns": 42
}
],
"slowestTests": [
{
"classname": "migration_test.go",
"failedRuns": 1,
"flaky": false,
"p50DurationSecs": 12.5,
"testName": "TestDatabaseMigration",
"totalRuns": 42
}
],
"testRuns": [
{
"pipelineNumber": 130,
"successRate": 0.95,
"testCounts": {
"error": 0,
"failure": 2,
"skipped": 1,
"success": 38,
"total": 41
},
"workflowId": "fda08377-fe7e-46b1-8992-3a7aaecac9c3"
}
],
"totalTestRuns": 42
},
"timestamp": "2021-09-01T22:55:34.317Z",
"type": "circleci.testMetrics"
}

The Get Workflow component fetches details for a CircleCI workflow.

  • Workflow inspection: Fetch current workflow status, jobs, and metadata
  • Workflow context: Use workflow fields to drive branching decisions in later steps
  • Workflow ID: The ID of the CircleCI workflow to retrieve (supports expressions)

Emits a circleci.workflow payload containing workflow fields like id, name, status, createdAt, and stoppedAt.

{
"data": {
"createdAt": "2021-09-01T22:49:03.544Z",
"id": "fda08377-fe7e-46b1-8992-3a7aaecac9c3",
"jobs": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"jobNumber": 42,
"name": "build",
"projectSlug": "gh/acme/my-app",
"startedAt": "2021-09-01T22:49:05.000Z",
"status": "success",
"stoppedAt": "2021-09-01T22:52:10.000Z",
"type": "build"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"jobNumber": 43,
"name": "test",
"projectSlug": "gh/acme/my-app",
"startedAt": "2021-09-01T22:52:15.000Z",
"status": "success",
"stoppedAt": "2021-09-01T22:54:30.000Z",
"type": "build"
}
],
"name": "build-test-deploy",
"status": "success",
"stoppedAt": "2021-09-01T22:55:34.317Z"
},
"timestamp": "2021-09-01T22:55:34.317Z",
"type": "circleci.workflow"
}

The Run Pipeline component starts a CircleCI pipeline and waits for it to complete.

  • CI/CD orchestration: Trigger builds and deployments from SuperPlane workflows
  • Pipeline automation: Run CircleCI pipelines as part of workflow automation
  • Multi-stage deployments: Coordinate complex deployment pipelines
  • Workflow chaining: Chain multiple CircleCI workflows together
  1. Triggers a CircleCI pipeline with the specified location (branch or tag) and parameters
  2. Waits for all workflows in the pipeline to complete (monitored via webhook)
  3. Routes execution based on workflow results:
    • Success channel: All workflows completed successfully
    • Failed channel: Any workflow failed or was cancelled
  • Project Slug: CircleCI project slug (e.g., gh/username/repo)
  • Location: Branch or tag to run the pipeline
  • Pipeline definition ID: Find in CircleCI: Project Settings → Project Setup.
  • Parameters: Optional pipeline parameters as key-value pairs (supports expressions)
  • Success: Emitted when all workflows complete successfully
  • Failed: Emitted when any workflow fails or is cancelled
{
"data": {
"pipeline": {
"created_at": "2021-09-01T22:49:03.544Z",
"id": "1285fe1d-d3a6-44fc-8886-8979558254c4",
"number": 130
},
"workflows": [
{
"id": "fda08377-fe7e-46b1-8992-3a7aaecac9c3",
"name": "build-test-deploy",
"status": "success"
}
]
},
"timestamp": "2021-09-01T22:49:34.317Z",
"type": "circleci.workflow.completed"
}