<!-- BusyBot node reference — https://busybot.net/tools/currents-trigger/ -->

> Node: Currents Trigger (`currents_trigger`) · Webhook trigger · v1
> Category: Development · Credentials: Currents API (`currentsApi`)
> Updated: 2026-08-16

# Currents Trigger

> Trigger workflow on Currents test run events

## Overview

Starts a workflow when Currents.dev CI/CD test orchestration events fire via webhook. Supports run started, run finished, run canceled, and run timeout events. Verifies incoming webhooks using a shared secret header (x-webhook-secret) and timestamp freshness check (x-timestamp) to prevent replay attacks. Currents sends separate webhook events for each group in a run, so multi-group runs will trigger multiple events. Outputs the full Currents webhook payload including run details, project info, and event metadata.

**Category:** Development  
**Tool Name:** `currents_trigger`  
**Version:** 1

**Appearance:** Icon: `lucide-TestTube` | Color: `#17b794`

## Node Type

**Trigger** — webhook (receives incoming HTTP callbacks)

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | None (trigger node) |
| Output | `Output` |

## Credentials

This tool requires **Currents API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/currents-api/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Project ID | `string` | Yes | — | The Currents project ID to receive webhook events for. Found in the Currents Dashboard under project settings. |
| Events | `multiOptions` | Yes | `[]` | The Currents events to listen for. |
| | | | | Options: `RUN_CANCELED` (a run is manually canceled), `RUN_FINISH` (a run completes), `RUN_START` (a new run begins), `RUN_TIMEOUT` (a run exceeds the time limit) |

## Output Data

Each delivery from Currents produces one output item. The webhook payload is copied onto the item unchanged, and three fields are added:

- `_trigger` — always `currents_webhook`
- `_timestamp` — ISO 8601 timestamp of when the request arrived
- `_webhookEvent` — the Currents event name, taken from the payload's `event` field

The Currents payload itself carries:

- `event` — the event name, e.g. `RUN_FINISH`
- `runId`, `groupId`, `projectId` — identifiers for the run, the group within the run, and the project
- `status` — the run status
- `tags` — the run's tags
- `commit` — the commit under test, with `sha`, `branch`, `authorName`, `authorEmail`, `message`, and `remoteOrigin`
- `createdAt`, `completedAt`, `duration` — run timing
- `machineCount`, `specCount`, `testCount`, `passCount`, `failCount`, `skipCount` — run totals

Deliveries whose `event` is not one of the selected events are acknowledged without starting the workflow.

Reference the payload downstream by expression, e.g. `{{ $json.commit.branch }}` or `{{ $json.failCount }}`.

## Usage Examples

- start workflow when a CI test run finishes
- trigger on Currents run timeout
- listen for canceled test runs in Currents
- monitor Currents test run start events

## Example Configuration

Listen for run completion only:

```json
{
  "id": "currents-trigger",
  "type": "currents_trigger",
  "typeVersion": 1,
  "position": [250, 300],
  "parameters": {
    "projectId": "proj_abc123def456",
    "events": ["RUN_FINISH"]
  }
}
```

Listen for several events at once:

```json
{
  "id": "currents-trigger-multi",
  "type": "currents_trigger",
  "typeVersion": 1,
  "position": [250, 300],
  "parameters": {
    "projectId": "proj_xyz789uvw012",
    "events": ["RUN_START", "RUN_FINISH", "RUN_CANCELED"]
  }
}
```

Monitor test completion to trigger deployment workflows:

```json
{
  "id": "deployment-trigger",
  "type": "currents_trigger",
  "typeVersion": 1,
  "position": [250, 300],
  "parameters": {
    "projectId": "proj_cicd_production",
    "events": ["RUN_FINISH"]
  }
}
```

Get notified when runs are canceled or time out:

```json
{
  "id": "failure-monitor",
  "type": "currents_trigger",
  "typeVersion": 1,
  "position": [250, 300],
  "parameters": {
    "projectId": "proj_quality_assurance",
    "events": ["RUN_CANCELED", "RUN_TIMEOUT"]
  }
}
```

Track all phases of test execution:

```json
{
  "id": "full-lifecycle-monitor",
  "type": "currents_trigger",
  "typeVersion": 1,
  "position": [250, 300],
  "parameters": {
    "projectId": "proj_comprehensive_testing",
    "events": ["RUN_START", "RUN_FINISH", "RUN_CANCELED", "RUN_TIMEOUT"]
  }
}
```

### Trigger Behavior

- **Activation:** When the workflow is activated, a webhook endpoint is registered with the service.
- **Deactivation:** The webhook is automatically unregistered when the workflow is deactivated.
- **Payload:** The incoming webhook payload is parsed and output as workflow items.
- **Verification:** Supports signature verification where applicable.

## Tips

Entry point that fires when Currents.dev sends a webhook for test run events (start, finish, canceled, timeout). Verifies the webhook secret header and filters by selected event types. Outputs the full event payload for downstream processing.

### Important Notes

- The `projectId` must be a valid Currents project ID from your dashboard
- At least one event must be selected in the `events` array
- When runs have multiple groups, you will receive separate webhook events for each group
- The trigger will activate for any run in the specified project that matches the selected events