Skip to main content

Automation

Launch pipelines and manage Platform resources from scripts and other tools with the Seqera API, the Seqera CLI, or seqerakit. For example, launch a pipeline when new data arrives from a sequencer, or when a previous run completes.

Prerequisites

You need the following:

  • An organization and workspace. See Set up your workspace.
  • A pipeline added to your workspace.
  • A Platform access token. To create one, select your avatar in the top right, then select Your tokens.

Seqera API​

The Seqera API is the lowest-level programmatic interface. It covers every operation available in the UI. The Seqera Cloud API is available at https://api.cloud.seqera.io.

Authenticate every request with your access token in an Authorization: Bearer header. See Seqera API for the full endpoint reference.

The following request launches the nextflow-io/hello pipeline in a workspace. Replace <WORKSPACE_ID>, <ACCESS_TOKEN>, <COMPUTE_ENV_ID>, and <BUCKET> with your values:

curl -X POST "https://api.cloud.seqera.io/workflow/launch?workspaceId=<WORKSPACE_ID>" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"launch": {
"computeEnvId": "<COMPUTE_ENV_ID>",
"pipeline": "https://github.com/nextflow-io/hello",
"workDir": "s3://<BUCKET>/work",
"revision": "master"
}
}'

The response contains the workflowId of the new run.

Find your organization and workspace IDs​

Many API endpoints take an organization ID, such as /orgs/{orgId}/workspaces, or a workspace ID, such as the workspaceId query parameter. The two are different numbers. If you use a workspace ID where an endpoint expects an organization ID, the request fails with a permission error.

  • Organization ID: Select your organization, then Settings. The organization ID is the number in the page URL.
  • Workspace ID: Select your organization, then the Workspaces tab. Each workspace lists its ID.

To list these IDs from the command line, run tw organizations list and tw workspaces list.

Seqera CLI​

The Seqera CLI (tw) manages Platform resources from the command line. Use it to launch pipelines, manage compute environments, and monitor runs. The CLI is built on the Seqera API. Unlike the API, the CLI refers to resources by name instead of by ID.

The following command launches the nextflow-io/hello pipeline in a workspace. Replace <ORGANIZATION>/<WORKSPACE> and <COMPUTE_ENV_NAME> with your values:

export TOWER_ACCESS_TOKEN=<ACCESS_TOKEN>
tw launch https://github.com/nextflow-io/hello \
--workspace <ORGANIZATION>/<WORKSPACE> \
--compute-env <COMPUTE_ENV_NAME>

To launch a pipeline from the workspace Launchpad, use its Launchpad name, such as nf-core-rnaseq, instead of the repository URL. If the workspace has a primary compute environment, you can omit --compute-env.

If you set TOWER_WORKSPACE_ID to your workspace ID, you can also omit --workspace. For example, to launch the nextflow-io-hello Launchpad pipeline:

$ tw launch nextflow-io-hello

Workflow 3E76vIs2MMrgwl submitted at [jane-doe-org-0715 / jane-doe-wsp] workspace.

https://cloud.seqera.io/orgs/jane-doe-org-0715/workspaces/jane-doe-wsp/watch/3E76vIs2MMrgwl

To list the most recent runs in the workspace:

$ tw runs list --max 3

Pipeline runs at [jane-doe-org-0715 / jane-doe-wsp] workspace:

ID | Status | Project Name | Run Name | Username | Submit Date
----------------+-----------+-------------------+----------------+----------+-------------------------------
3E76vIs2MMrgwl | SUBMITTED | nextflow-io/hello | thirsty_kalman | jane-doe | Thu, 12 Nov 2026 00:19:52 GMT
35NuH2tGOiEif4 | SUCCEEDED | nextflow-io/hello | sick_elion | jane-doe | Wed, 11 Nov 2026 21:13:03 GMT
2a1oNAK7Btceyz | SUCCEEDED | nextflow-io/hello | hello-world | jane-doe | Wed, 11 Nov 2026 21:12:35 GMT

See Seqera CLI for installation instructions and the command reference.

seqerakit​

seqerakit is a Python wrapper for the Seqera CLI. It reads a YAML file that defines Platform resources and creates them. Resources include workspaces, compute environments, and pipelines. It can also launch pipelines. Keep the file under version control to manage your Platform setup as code.

To launch the nextflow-io/hello pipeline with seqerakit:

  1. Create a file called hello.yml. Replace <ORGANIZATION>/<WORKSPACE> and <COMPUTE_ENV_NAME> with your values:

    launch:
    - name: "hello-world"
    workspace: "<ORGANIZATION>/<WORKSPACE>"
    compute-env: "<COMPUTE_ENV_NAME>"
    pipeline: "https://github.com/nextflow-io/hello"
  2. Run seqerakit:

    export TOWER_ACCESS_TOKEN=<ACCESS_TOKEN>
    seqerakit hello.yml

See the seqerakit repository for installation instructions and more examples.

Learn more​

These blog posts cover automation in more depth: