CircleCI
Trigger and monitor CircleCI pipelines
Triggers
Section titled “Triggers”Actions
Section titled “Actions”Instructions
Section titled “Instructions”Create a Personal API Token in CircleCI → User Settings → Personal API Tokens
On Workflow Completed
Section titled “On Workflow Completed”Triggers when a CircleCI workflow completes.
Use Cases
Section titled “Use Cases”- 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
Configuration
Section titled “Configuration”- Project Slug: The CircleCI project slug (e.g., gh/username/repo)
Event Data
Section titled “Event Data”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
Webhook Setup
Section titled “Webhook Setup”This trigger automatically sets up a CircleCI webhook when configured. The webhook is managed by SuperPlane and cleaned up when the trigger is removed.
Example Data
Section titled “Example Data”{ "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"}Get Flaky Tests
Section titled “Get Flaky Tests”The Get Flaky Tests component identifies flaky tests in a CircleCI project using the Insights API.
Use Cases
Section titled “Use Cases”- 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
Configuration
Section titled “Configuration”- Project Slug: CircleCI project slug (e.g., gh/username/repo)
Output
Section titled “Output”Emits a circleci.flakyTests payload with a list of flaky tests and their flakiness data.
Example Output
Section titled “Example Output”{ "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"}Get Last Workflow
Section titled “Get Last Workflow”The Get Last Workflow component retrieves the most recent workflow for a CircleCI project.
Use Cases
Section titled “Use Cases”- 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)
How It Works
Section titled “How It Works”- Fetches recent pipelines for the project (optionally filtered by branch)
- Iterates through pipelines to find workflows
- Returns the first workflow matching the optional status filter
Configuration
Section titled “Configuration”- Project Slug: CircleCI project slug (e.g., gh/username/repo)
- Branch: Optional branch filter
- Status: Optional workflow status filter (success, failed, etc.)
Output
Section titled “Output”Emits a circleci.workflow payload with the most recent matching workflow details.
Example Output
Section titled “Example Output”{ "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"}Get Recent Workflow Runs
Section titled “Get Recent Workflow Runs”The Get Recent Workflow Runs component fetches recent individual runs for a named CircleCI workflow via the Insights API.
Use Cases
Section titled “Use Cases”- 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
How It Works
Section titled “How It Works”- Calls the CircleCI Insights endpoint for the given project and workflow name
- Returns a list of individual workflow runs (up to 90 days back)
- Each run includes its status, duration, branch, timestamps, and credits used
Configuration
Section titled “Configuration”- 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)
Output
Section titled “Output”Emits a circleci.workflowRuns payload containing an array of recent workflow runs with fields like id, status, duration, branch, createdAt, stoppedAt, and creditsUsed.
Example Output
Section titled “Example Output”{ "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"}Get Test Metrics
Section titled “Get Test Metrics”The Get Test Metrics component fetches test performance data from the CircleCI Insights API.
Use Cases
Section titled “Use Cases”- 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
Configuration
Section titled “Configuration”- Project Slug: CircleCI project slug (e.g., gh/username/repo)
- Workflow Name: Name of the workflow to get test metrics for
Output
Section titled “Output”Emits a circleci.testMetrics payload with most failed tests, slowest tests, and test run summaries.
Example Output
Section titled “Example Output”{ "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"}Get Workflow
Section titled “Get Workflow”The Get Workflow component fetches details for a CircleCI workflow.
Use Cases
Section titled “Use Cases”- Workflow inspection: Fetch current workflow status, jobs, and metadata
- Workflow context: Use workflow fields to drive branching decisions in later steps
Configuration
Section titled “Configuration”- Workflow ID: The ID of the CircleCI workflow to retrieve (supports expressions)
Output
Section titled “Output”Emits a circleci.workflow payload containing workflow fields like id, name, status, createdAt, and stoppedAt.
Example Output
Section titled “Example Output”{ "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"}Run Pipeline
Section titled “Run Pipeline”The Run Pipeline component starts a CircleCI pipeline and waits for it to complete.
Use Cases
Section titled “Use Cases”- 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
How It Works
Section titled “How It Works”- Triggers a CircleCI pipeline with the specified location (branch or tag) and parameters
- Waits for all workflows in the pipeline to complete (monitored via webhook)
- Routes execution based on workflow results:
- Success channel: All workflows completed successfully
- Failed channel: Any workflow failed or was cancelled
Configuration
Section titled “Configuration”- 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)
Output Channels
Section titled “Output Channels”- Success: Emitted when all workflows complete successfully
- Failed: Emitted when any workflow fails or is cancelled
Example Output
Section titled “Example Output”{ "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"}