Run Event

trigger.currents_event
TriggerBusiness appsconnection requiredruns in-engine

Registers an HTTP webhook on one Currents project on publish and starts one run per delivered event.

Start a run when a Currents CI test run starts, finishes, times out or is cancelled.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
Currents
Secret shape
the API key, or {"api_key": "…"}
Resolved by
config.connection_id, else node.connection_id
Note
The key needs Currents' webhooks:read and webhooks:write scopes — a read-only key lists runs happily and still fails to publish. Publishing also needs MANTLE_APP_PUBLIC_BASE_URL set to a URL Currents can reach.

Configuration

2 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
project_id
The Currents project to watch. Leave blank to use the project_id on the connection; currents.list_projects returns every projectId. Webhooks are per project — watching two means two triggers.
stringNo———
events
Which run-lifecycle events to subscribe to. Currents accepts exactly these four.
arrayNo["RUN_FINISH"]1–4 characters; array of string—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "events": [
    "RUN_FINISH"
  ]
}

Output

One shape.

currents run event

The flattened Currents delivery: which event, which run, and the run's test tallies.

FieldTypeExample
event
Which lifecycle event fired: RUN_START, RUN_FINISH, RUN_TIMEOUT or RUN_CANCELED. Branch on this when the trigger subscribes to more than one.
stringRUN_FINISH
run_url
The Currents dashboard URL for the run — the thing to put in a Slack message, and the run's own identity.
stringhttps://app.currents.dev/run/8f2c0f1d6a4b
build_id
The CI build id the run reported itself under, exactly as CI gave it.
stringdemo-build-cdx3314
group_id
The run group, on multi-group runs only — Currents sends one delivery per group. Empty on a single-group run.
stringchromium
tags
The run and test tags Currents recorded.
array—
commit.sha
Commit the run was against, or empty when CI reported none.
string—
commit.branch
Branch the run was against.
string—
commit.authorName
Commit author's name.
string—
commit.authorEmail
Commit author's email address.
string—
commit.message
Commit message.
string—
commit.remoteOrigin
Repository URL the commit came from.
string—
commit.defaultBranch
The repository's default branch.
string—
overall
Overall number of tests in the run.
number24
passes
Number of passed tests.
number21
failures
Number of failed tests — branch on this to tell a green run from a red one.
number2
pending
Number of tests that were not executed.
number0
skipped
Number of skipped tests.
number1
retries
Number of test retries in the run.
number3
flaky
Number of tests Currents classified as flaky.
number1
sent_at
Currents' x-timestamp header — its own epoch timestamp for this request. It changes on every retry, so it is reported but never used to decide whether a delivery is fresh or a duplicate.
string1793491200000
payload
The delivery exactly as Currents sent it, for anything the fields above do not lift out.
object—
{
  "build_id": "demo-build-cdx3314",
  "commit": {
    "authorEmail": "ada@example.com",
    "authorName": "Ada Lovelace",
    "branch": "main",
    "defaultBranch": "main",
    "message": "Fix the flaky checkout spec",
    "remoteOrigin": "https://github.com/acme/app.git",
    "sha": "0f4c3b1e9a77c0f2d1e4b6a8c9d0e1f2a3b4c5d6"
  },
  "event": "RUN_FINISH",
  "failures": 2,
  "flaky": 1,
  "group_id": "chromium",
  "overall": 24,
  "passes": 21,
  "payload": {
    "buildId": "demo-build-cdx3314",
    "event": "RUN_FINISH"
  },
  "pending": 0,
  "retries": 3,
  "run_url": "https://app.currents.dev/run/8f2c0f1d6a4b",
  "sent_at": "1793491200000",
  "skipped": 1,
  "tags": [
    "nightly"
  ]
}

Notes

  • Publishing creates the webhook on the project; unpublishing, disabling or archiving deletes it. A workflow that is off is off at Currents too.
  • Currents does not sign its deliveries. Each one is authenticated by a random token Mantle registers as an X-Mantle-Webhook-Token header and compares in constant time; anyone holding that token could have written the body.
  • A run with several groups emits one delivery per group, each with its own group_id — so a 3-browser run starts three runs of this workflow, not one.
  • A redelivery is recognised by the event name and the run's own identity (run_url, else build_id and group_id). The ingress remembers a key for 24 hours.

See Run Event run in a workflow.

In a technical demo we add the Currents connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.