View as Markdown
CircleCI icon

CircleCI ACTION

Trigger a Pipeline

Trigger a pipeline given a pipeline definition ID. Supports all integrations except GitLab. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's CircleCI account once, then configure and run Trigger a Pipeline from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "circleci-trigger-pipeline",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    circleci: { authProvisionId: "apn_xxxxxxx" },
    projectSlug: "Project Slug",
    definitionId: "Definition ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Trigger a Pipeline inputs
Property Type Description
projectSlug Project Slug string
Project slug in the form vcs-slug/org-name/repo-name (found in Project Settings)
Required
definitionId Definition ID string
The unique ID for the pipeline definition. This can be found in the page Project Settings > Pipelines.
Required
configBranch Config Branch string
The branch that should be used to fetch the config file. Note that branch and tag are mutually exclusive. To trigger a pipeline for a PR by number use pull//head for the PR ref or pull//merge for the merge ref (GitHub only)
Optional
configTag Config Tag string
The tag that should be used to fetch the config file. The commit that this tag points to is used for the pipeline. Note that branch and tag are mutually exclusive.
Optional
checkoutBranch Checkout Branch string
The branch that should be used to check out code on a checkout step. Note that branch and tag are mutually exclusive. To trigger a pipeline for a PR by number use pull//head for the PR ref or pull//merge for the merge ref (GitHub only)
Optional
checkoutTag Checkout Tag string
The tag that should be used to check out code on a checkout step. The commit that this tag points to is used for the pipeline. Note that branch and tag are mutually exclusive.
Optional
parameters Parameters object
An object containing pipeline parameters and their values. Pipeline parameters have the following size limits: 100 max entries, 128 maximum key length, 512 maximum value length.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
circleci-trigger-pipeline
Version
0.0.3
App
CircleCI
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes