# CircleCI

> Trigger CircleCI pipeline runs on any branch or tag with parameters, watch runs, workflows and jobs through to their outcome, cancel or rerun workflows, collect job artifacts, and manage the environment variables in projects and contexts.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/circleci

## Actions

### Cancel workflow

Cancel a running workflow. CircleCI cancels it in the background, so check it with Get workflow afterwards.

**Inputs**

- Workflow ID (`circleci_workflow_id`, text, required): The workflow's id, from List workflows or a run's workflows - or paste the workflow's CircleCI URL.

**Outputs**

- `cancel_requested` (true/false)
- `workflow_id` (text)

**Example output**

```json
{
  "cancel_requested": true,
  "workflow_id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091"
}
```

### Delete context environment variable

Remove an environment variable from a context by name.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Context (`context_id`, text, required): The context. Pick one, or paste its id or settings-page URL.
- Variable name (`name`, text, required): Letters, digits and underscores, e.g. DEPLOY_TOKEN.

**Outputs**

- `context_id` (text)
- `deleted` (true/false)
- `name` (text)

**Example output**

```json
{
  "context_id": "6f5e4d3c-2b1a-4098-8765-43210fedcba9",
  "deleted": true,
  "name": "DEPLOY_TOKEN"
}
```

### Delete project environment variable

Remove an environment variable from a project by name.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.
- Variable name (`name`, text, required): Letters, digits and underscores, e.g. DEPLOY_TOKEN.

**Outputs**

- `deleted` (true/false)
- `name` (text)
- `project_id` (text)

**Example output**

```json
{
  "deleted": true,
  "name": "DEPLOY_TOKEN",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
```

### Get job

Get one job with every step it ran - each step's command, outcome, exit code and timings - to see where a build failed.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from List jobs or a run's workflows.

**Outputs**

- `ended_at` (text)
- `id` (text)
- `name` (text)
- `outcome` (text)
- `parallelism` (number)
- `phase` (text)
- `pipeline_id` (text)
- `project_id` (text)
- `started_at` (text)
- `steps` (list)
- `type` (text)
- `user_id` (text)
- `workflow_id` (text)

**Example output**

```json
{
  "ended_at": "2026-10-01T12:03:41Z",
  "id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
  "name": "test",
  "outcome": "failed",
  "parallelism": 1,
  "phase": "ended",
  "pipeline_id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "started_at": "2026-10-01T12:00:05Z",
  "steps": [
    {
      "command": "npm test",
      "ended_at": "2026-10-01T12:03:40Z",
      "execution": 0,
      "exit_code": 1,
      "name": "Run tests",
      "num": 102,
      "outcome": "failed",
      "phase": "ended",
      "started_at": "2026-10-01T12:01:00Z",
      "stderr_bytes": 512,
      "stdout_bytes": 20480,
      "type": "run"
    }
  ],
  "type": "build",
  "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2",
  "workflow_id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091"
}
```

### Get pipeline

Get one pipeline: its name, description, the repository it checks out and where its config file is read from.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.
- Pipeline (`pipeline_id`, text, required): The pipeline (the configuration the project builds from). Most projects have one.

**Outputs**

- `checkout` (object)
- `config` (object)
- `config_file_path` (text)
- `created_at` (text)
- `description` (text)
- `id` (text)
- `name` (text)
- `project_id` (text)
- `repo_full_name` (text)

**Example output**

```json
{
  "checkout": {
    "type": "github_app",
    "vcs": {
      "provider": "github",
      "repo_full_name": "acme/api",
      "repo_id": "123"
    }
  },
  "config": {
    "file_path": ".circleci/config.yml",
    "file_type": "yaml",
    "hosted": null,
    "type": "github_app",
    "vcs": {
      "provider": "github",
      "repo_full_name": "acme/api",
      "repo_id": "123"
    }
  },
  "config_file_path": ".circleci/config.yml",
  "created_at": "2026-03-02T10:15:00Z",
  "description": null,
  "id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
  "name": "build-and-test",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "repo_full_name": "acme/api"
}
```

### Get pipeline run

Get one pipeline run: its phase (queued, started, ended), current outcome, any errors, what triggered it and the commit it built.

**Inputs**

- Run ID (`run_id`, text, required): The run's id, as returned by Trigger pipeline run or List pipeline runs.

**Outputs**

- `branch` (text)
- `commit_author_login` (text)
- `commit_author_name` (text)
- `commit_body` (text)
- `commit_subject` (text)
- `commit_url` (text)
- `created_at` (text)
- `current_outcome` (text)
- `errors` (list)
- `event_action` (text)
- `event_type` (text)
- `id` (text)
- `number` (number)
- `origin_repository_url` (text)
- `phase` (text)
- `pipeline_id` (text)
- `pipeline_name` (text)
- `project_id` (text)
- `revision` (text)
- `tag` (text)
- `target_repository_url` (text)
- `trigger_id` (text)
- `trigger_name` (text)
- `trigger_type` (text)
- `user_id` (text)
- `vcs_provider` (text)
- `warnings` (list)

**Example output**

```json
{
  "branch": "main",
  "commit_author_login": "ada",
  "commit_author_name": "Ada Lovelace",
  "commit_body": "",
  "commit_subject": "Bump dependencies",
  "commit_url": "https://github.com/acme/api/commit/4f2a9c1",
  "created_at": "2026-10-01T12:00:00Z",
  "current_outcome": "succeeded",
  "errors": [],
  "event_action": null,
  "event_type": "push",
  "id": "7c6b5a49-3827-4615-a0b9-c8d7e6f5a4b3",
  "number": 208,
  "origin_repository_url": "https://github.com/acme/api",
  "phase": "ended",
  "pipeline_id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
  "pipeline_name": "build-and-test",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "revision": "4f2a9c1e7b3d5a6f8e0c2b4d6a8f0e1c3b5d7a9f",
  "tag": null,
  "target_repository_url": "https://github.com/acme/api",
  "trigger_id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
  "trigger_name": "GitHub push",
  "trigger_type": "github_app",
  "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2",
  "vcs_provider": "github",
  "warnings": []
}
```

### Get workflow

Get one workflow's phase and outcome - for example to wait until it has finished.

**Inputs**

- Workflow ID (`circleci_workflow_id`, text, required): The workflow's id, from List workflows or a run's workflows - or paste the workflow's CircleCI URL.

**Outputs**

- `auto_rerun` (object)
- `created_at` (text)
- `current_outcome` (text)
- `ended_at` (text)
- `id` (text)
- `name` (text)
- `outcome` (text)
- `phase` (text)
- `project_id` (text)
- `run_id` (text)
- `tag` (text)
- `user_id` (text)

**Example output**

```json
{
  "auto_rerun": null,
  "created_at": "2026-10-01T12:00:01Z",
  "current_outcome": "succeeded",
  "ended_at": "2026-10-01T12:03:42Z",
  "id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
  "name": "build",
  "outcome": "succeeded",
  "phase": "ended",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "run_id": "7c6b5a49-3827-4615-a0b9-c8d7e6f5a4b3",
  "tag": null,
  "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2"
}
```

### List contexts

List an organization's contexts - the shared sets of environment variables jobs can use - optionally narrowed by part of a name.

**Inputs**

- Organization (`org_id`, text, required): The CircleCI organization. Pick one, or paste its id.
- Name contains (`name`, text): Only contexts whose name contains this.
- Page cursor (`cursor`, text): The next_cursor from a previous page. Leave empty for the first page.
- Page size (`limit`, number): How many to return on this page. From 1 to 50.

**Outputs**

- `contexts` (list): Contexts
- `count` (number)
- `has_more` (true/false)
- `next_cursor` (text)

**Example output**

```json
{
  "contexts": [
    {
      "created_at": "2025-11-20T09:00:00Z",
      "id": "6f5e4d3c-2b1a-4098-8765-43210fedcba9",
      "name": "production"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_cursor": null
}
```

### List job artifacts

List the files a job stored as artifacts - test reports, coverage, build outputs - with a download URL for each.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from List jobs or a run's workflows.

**Outputs**

- `artifacts` (list): Artifacts
- `count` (number)

**Example output**

```json
{
  "artifacts": [
    {
      "execution": 0,
      "path": "coverage/index.html",
      "url": "https://output.circle-artifacts.com/output/job/9a8b/artifacts/0/coverage/index.html"
    }
  ],
  "count": 1
}
```

### List jobs

List the jobs of a workflow with each one's number, type, phase, outcome and timings.

**Inputs**

- Workflow ID (`circleci_workflow_id`, text, required): The workflow's id, from List workflows or a run's workflows - or paste the workflow's CircleCI URL.

**Outputs**

- `count` (number)
- `jobs` (list): Jobs

**Example output**

```json
{
  "count": 1,
  "jobs": [
    {
      "ended_at": "2026-10-01T12:03:41Z",
      "id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
      "name": "test",
      "number": 412,
      "outcome": "succeeded",
      "phase": "ended",
      "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "started_at": "2026-10-01T12:00:05Z",
      "type": "build",
      "workflow_id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091"
    }
  ]
}
```

### List organizations

List the CircleCI organizations you belong to, or find one by its slug (such as gh/acme). Returns each organization's id, name and version-control provider.

**Inputs**

- Organization slug (`slug`, text): Find one organization by slug, e.g. gh/acme.
- Page cursor (`cursor`, text): The next_cursor from a previous page. Leave empty for the first page.
- Page size (`limit`, number): How many to return on this page. From 1 to 50.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `next_cursor` (text)
- `organizations` (list): Organizations

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "organizations": [
    {
      "avatar_url": "https://avatars.githubusercontent.com/u/1",
      "id": "5e1c3d2a-8f7b-4c6d-9e0a-1b2c3d4e5f60",
      "name": "acme",
      "vcs_provider": "github"
    }
  ]
}
```

### List pipeline runs

List a project's recent pipeline runs, or your own recent runs across every project, newest first. Each run includes its outcome, branch, commit, and its workflows with their jobs.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text): The project whose runs to list. Leave empty and turn on Only my runs to list yours everywhere.
- Only my runs (`only_mine`, true/false): List your own recent runs across all projects. Default: `false`.
- Page cursor (`cursor`, text): The next_cursor from a previous page. Leave empty for the first page.
- Page size (`limit`, number): How many to return on this page. From 1 to 50.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `next_cursor` (text)
- `runs` (list): Runs, newest first

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "runs": [
    {
      "branch": "main",
      "commit_author_login": "ada",
      "commit_author_name": "Ada Lovelace",
      "commit_body": "",
      "commit_subject": "Bump dependencies",
      "commit_url": "https://github.com/acme/api/commit/4f2a9c1",
      "created_at": "2026-10-01T12:00:00Z",
      "current_outcome": "succeeded",
      "errors": [],
      "event_action": null,
      "event_type": "push",
      "id": "7c6b5a49-3827-4615-a0b9-c8d7e6f5a4b3",
      "number": 208,
      "origin_repository_url": "https://github.com/acme/api",
      "phase": "ended",
      "pipeline_id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
      "pipeline_name": "build-and-test",
      "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "revision": "4f2a9c1e7b3d5a6f8e0c2b4d6a8f0e1c3b5d7a9f",
      "tag": null,
      "target_repository_url": "https://github.com/acme/api",
      "trigger_id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
      "trigger_name": "GitHub push",
      "trigger_type": "github_app",
      "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2",
      "vcs_provider": "github",
      "warnings": [],
      "workflow_count": 1,
      "workflows": [
        {
          "auto_rerun": null,
          "created_at": "2026-10-01T12:00:01Z",
          "current_outcome": "succeeded",
          "ended_at": "2026-10-01T12:03:42Z",
          "id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
          "job_count": 1,
          "jobs": [
            {
              "ended_at": "2026-10-01T12:03:41Z",
              "id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
              "name": "test",
              "number": 412,
              "outcome": "succeeded",
              "phase": "ended",
              "started_at": "2026-10-01T12:00:05Z",
              "type": "build"
            }
          ],
          "jobs_truncated": false,
          "name": "build",
          "outcome": "succeeded",
          "phase": "ended",
          "tag": null
        }
      ],
      "workflows_truncated": false
    }
  ]
}
```

### List pipelines

List a project's pipelines - the configurations it builds from - with each one's name, repository and config file path.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.

**Outputs**

- `count` (number)
- `pipelines` (list): Pipelines

**Example output**

```json
{
  "count": 1,
  "pipelines": [
    {
      "checkout": {
        "type": "github_app",
        "vcs": {
          "provider": "github",
          "repo_full_name": "acme/api",
          "repo_id": "123"
        }
      },
      "config": {
        "file_path": ".circleci/config.yml",
        "file_type": "yaml",
        "hosted": null,
        "type": "github_app",
        "vcs": {
          "provider": "github",
          "repo_full_name": "acme/api",
          "repo_id": "123"
        }
      },
      "config_file_path": ".circleci/config.yml",
      "created_at": "2026-03-02T10:15:00Z",
      "description": null,
      "id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
      "name": "build-and-test",
      "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "repo_full_name": "acme/api"
    }
  ]
}
```

### List project environment variables

List the names of a project's environment variables. CircleCI only ever shows the values masked.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.

**Outputs**

- `count` (number)
- `environment_variables` (list): Environment variables (values masked)

**Example output**

```json
{
  "count": 1,
  "environment_variables": [
    {
      "name": "DEPLOY_TOKEN",
      "value": "xxxxa1b2"
    }
  ]
}
```

### List projects

List an organization's CircleCI projects, the projects you follow, or find one project by its slug (such as gh/acme/api). Narrow an organization's projects by name and sort by name or recent activity.

**Inputs**

- Organization (`org_id`, text): The CircleCI organization. Pick one, or paste its id.
- Only followed projects (`following`, true/false): Only projects you follow. Default: `false`.
- Project slug (`slug`, text): Find one project by slug, e.g. gh/acme/api. Use it on its own, without the other filters.
- Name contains (`name`, text): Narrow the organization's projects by name.
- Sort by (`order_by`, text): How to order the projects. One of: `name`, `last_active_at` (Most recently active). Default: `name`.
- Page cursor (`cursor`, text): The next_cursor from a previous page. Leave empty for the first page.
- Page size (`limit`, number): How many to return on this page. From 1 to 50.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `next_cursor` (text)
- `projects` (list): Projects

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "projects": [
    {
      "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "is_followed": true,
      "name": "api",
      "org_id": "5e1c3d2a-8f7b-4c6d-9e0a-1b2c3d4e5f60",
      "org_name": "acme"
    }
  ]
}
```

### List workflows

List the workflows of a pipeline run, with each one's phase and outcome.

**Inputs**

- Run ID (`run_id`, text, required): The run's id, as returned by Trigger pipeline run or List pipeline runs.
- Order (`order_by`, text): Which workflows come first. One of: `created desc` (Newest first), `created asc` (Oldest first). Default: `created desc`.
- Page cursor (`cursor`, text): The next_cursor from a previous page. Leave empty for the first page.
- Page size (`limit`, number): How many to return on this page. From 1 to 50.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `next_cursor` (text)
- `workflows` (list): Workflows

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "workflows": [
    {
      "auto_rerun": null,
      "created_at": "2026-10-01T12:00:01Z",
      "current_outcome": "succeeded",
      "ended_at": "2026-10-01T12:03:42Z",
      "id": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
      "name": "build",
      "outcome": "succeeded",
      "phase": "ended",
      "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "run_id": "7c6b5a49-3827-4615-a0b9-c8d7e6f5a4b3",
      "tag": null,
      "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2"
    }
  ]
}
```

### Rerun workflow

Rerun a finished workflow as a new workflow: every job, only the failed jobs and what depends on them, or jobs you choose. Optionally with SSH enabled for debugging. Returns the new workflow's id.

**Inputs**

- Workflow ID (`circleci_workflow_id`, text, required): The workflow's id, from List workflows or a run's workflows - or paste the workflow's CircleCI URL.
- Only failed jobs (`from_failed`, true/false): Rerun only the failed jobs and their dependents. Default: `false`.
- Enable SSH (`enable_ssh`, true/false): Rerun with SSH access enabled. Default: `false`.
- Jobs to rerun (`job_ids`, list): Rerun only these jobs (ids from List jobs). Leave empty to rerun every job.

**Outputs**

- `rerun_of` (text)
- `workflow_id` (text)

**Example output**

```json
{
  "rerun_of": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
  "workflow_id": "4d5e6f70-8192-4a3b-b4c5-d6e7f8091a2b"
}
```

### Set context environment variable

Create or replace an environment variable in a context, so every job using that context gets the new value.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Context (`context_id`, text, required): The context. Pick one, or paste its id or settings-page URL.
- Variable name (`name`, text, required): Letters, digits and underscores, e.g. DEPLOY_TOKEN.
- Value (`value`, text, required): The value. CircleCI stores it encrypted and never shows it again.

**Outputs**

- `context_id` (text)
- `created_at` (text)
- `name` (text)
- `updated_at` (text)

**Example output**

```json
{
  "context_id": "6f5e4d3c-2b1a-4098-8765-43210fedcba9",
  "created_at": "2025-11-20T09:05:00Z",
  "name": "DEPLOY_TOKEN",
  "updated_at": "2026-10-01T12:00:00Z"
}
```

### Set project environment variable

Add an environment variable to a project, for its builds to read - for example to rotate a deploy token.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.
- Variable name (`name`, text, required): Letters, digits and underscores, e.g. DEPLOY_TOKEN.
- Value (`value`, text, required): The value. CircleCI stores it encrypted and never shows it again.

**Outputs**

- `name` (text)
- `project_id` (text)
- `value` (text)

**Example output**

```json
{
  "name": "DEPLOY_TOKEN",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "value": "xxxxa1b2"
}
```

### Trigger pipeline run

Start a new run of a project's pipeline on a branch or tag, optionally with pipeline parameters. The config is read from the same branch or tag unless you name another. Returns the new run's id to watch with Get pipeline run or List workflows.

**Inputs**

- Organization (`org_id`, text): The organization whose projects to offer below. Only used to fill the Project list - it is not sent.
- Project (`project_id`, text, required): The project. Pick one, or type its slug (gh/acme/api), its id, or paste its CircleCI URL.
- Pipeline (`pipeline_id`, text, required): The pipeline (the configuration the project builds from). Most projects have one.
- Branch (`branch`, text): The branch to build. Leave this and Tag empty for the default branch.
- Tag (`tag`, text): A tag to build instead of a branch.
- Config branch (`config_branch`, text): Read the config from this branch instead. Usually left empty.
- Config tag (`config_tag`, text): Read the config from this tag instead. Usually left empty.
- Pipeline parameters (`parameters`, object): Values for parameters your config declares. true/false are sent as booleans and whole numbers as integers; wrap a value in double quotes, e.g. "123", to send it as text.

**Outputs**

- `created_at` (text)
- `pipeline_id` (text)
- `project_id` (text)
- `run_id` (text)
- `user_id` (text)

**Example output**

```json
{
  "created_at": "2026-10-01T12:00:00Z",
  "pipeline_id": "0f9e8d7c-6b5a-4f3e-2d1c-0b9a8f7e6d5c",
  "project_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "run_id": "7c6b5a49-3827-4615-a0b9-c8d7e6f5a4b3",
  "user_id": "3d4e5f60-7182-4394-a5b6-c7d8e9f0a1b2"
}
```
