Sending webhook
Outgoing webhooks send an HTTP request to a URL of your choice when an alert fires. Use them to connect BugBug with tools that don't have a built-in integration, or to send a custom message when the built-in Slack or Discord templates aren't enough.
Before you start, set up the receiving endpoint in your external service. You will need its URL, and the request format it expects, to fill in the form.
Set the method and URL
In Method, choose POST or GET. In Webhook URL, paste the address of your endpoint.

You can use variables in the URL too, for example https://example.com/hook?run={{testRunId}}.
Define the request body
The Body field is optional. If you fill it in, it must be valid JSON. BugBug sends it with the Content-Type: application/json header.
Use variables to put run details into the body. For example, an alert for finished tests can send the test name and the result:

To start from a complete payload, click fill with example above the Body field. BugBug inserts an example for the event you selected in the "When" section. You can find the same payloads in Example payloads.
Test the webhook
Before you save the alert, click Send test alert. BugBug sends the request with example data and shows the response from your endpoint.
Do this every time you change the URL or body. It catches problems such as an invalid URL, missing credentials, or a body format your service doesn't accept.

How BugBug delivers webhooks
BugBug waits up to 30 seconds for a response and follows redirects.
If your endpoint responds with a server error (5xx), BugBug retries the request up to 3 times. A client error (4xx) is retried once. Timeouts and connection errors are not retried.
Retries send the same
{{eventId}}, so you can use it to ignore duplicates.
Variables reference
All variables you can use in the webhook URL and body.
Common variables
{{eventId}}
UUID
Unique event ID for deduplication
{{eventName}}
string
Notification event (e.g., testFinished, suiteFinished)
{{status}}
string
Run status (running, passed, failed, error)
{{profileName}}
string
Run profile name
{{runMode}}
string
Run mode (cloud, local, recording)
{{started}}
string
ISO 8601 start timestamp
{{finished}}
string
ISO 8601 end timestamp
{{durationMs}}
int
Duration in milliseconds (e.g., 330500)
{{triggeredBy}}
string
What started the run (e.g. user, scheduler, api, webhook, cli)
{{organizationId}}
UUID
Organization ID
{{organizationName}}
string
Organization name
{{projectId}}
UUID
Project ID
{{projectName}}
string
Project name
{{projectUrl}}
URL
Link to project in webapp
{{timestampMs}}
int
Current epoch timestamp in milliseconds
{{timestamp}}
int
Alias for timestampMs (backward compatibility)
{{schemaVersion}}
string
Webhook payload schema version (e.g., v1)
{{objectsLimit}}
int
Maximum number of items per list (e.g., 10)
Test run variables
Available when the webhook is triggered by a test run event.
{{testName}}
string
Test name
{{testId}}
UUID
Test ID
{{testRunId}}
UUID
Test run ID
{{testRunUrl}}
URL
Link to test run details in webapp
{{testUrl}}
URL
Link to test definition in webapp
{{browser}}
string
Combined browser string (e.g., "Chrome 120.0")
{{browserName}}
string
Browser name
{{browserVersion}}
string
Browser version
{{os}}
string
Operating system name
{{screenSizeType}}
string
Screen size type (desktop, mobile, etc.)
{{extensionVersion}}
string
BugBug extension version
{{failedStepUrl}}
URL
Deep-link to first failed step (only for failed/errored runs)
{{failedStepId}}
UUID
Step Id of failed step
{{suiteId}}
UUID
Parent suite ID (if run within a suite)
{{suiteRunId}}
UUID
Parent suite run ID
{{suiteName}}
string
Parent suite name
{{suiteRunUrl}}
URL
Link to parent suite run details
{{scheduleId}}
UUID
Parent schedule ID (if run within a schedule)
{{schedulerRunId}}
UUID
Parent scheduler run ID
{{scheduleName}}
string
Parent schedule name
Suite run variables
Available when the webhook is triggered by a suite run event.
{{suiteId}}
UUID
Suite ID
{{suiteRunId}}
UUID
Suite run ID
{{suiteName}}
string
Suite name
{{suiteRunUrl}}
URL
Link to suite run details
{{suiteUrl}}
URL
Link to suite configuration
{{failedTestsCount}}
int
Number of failed tests
{{passedTestsCount}}
int
Number of passed tests
{{erroredTestsCount}}
int
Number of errored tests
{{totalTestsCount}}
int
Total number of tests (including skipped)
{{failedTests}}
JSON
Failed tests details (see structure below)
{{passedTests}}
JSON
Passed tests details (see structure below)
{{erroredTests}}
JSON
Errored tests details (see structure below)
{{failedTestsTruncated}}
bool
true if failed tests list was truncated to 10
{{passedTestsTruncated}}
bool
true if passed tests list was truncated to 10
{{erroredTestsTruncated}}
bool
true if errored tests list was truncated to 10
{{scheduleId}}
UUID
Parent schedule ID (if run within a schedule)
{{schedulerRunId}}
UUID
Parent scheduler run ID
{{scheduleName}}
string
Parent schedule name
Schedule run variables
Available when the webhook is triggered by a schedule run event.
{{scheduleId}}
UUID
Schedule ID
{{schedulerRunId}}
UUID
Scheduler run ID
{{scheduleName}}
string
Schedule name
{{scheduleUrl}}
URL
Link to schedule configuration
{{failedSuites}}
JSON
Failed suite runs (see structure below)
{{passedSuites}}
JSON
Passed suite runs (see structure below)
{{erroredSuites}}
JSON
Errored suite runs (see structure below)
{{failedSuitesTruncated}}
bool
true if failed suites list was truncated to 10
{{passedSuitesTruncated}}
bool
true if passed suites list was truncated to 10
{{erroredSuitesTruncated}}
bool
true if errored suites list was truncated to 10
{{failedTestsCount}}
int
Number of failed tests across all suites
{{passedTestsCount}}
int
Number of passed tests
{{erroredTestsCount}}
int
Number of errored tests
{{totalTestsCount}}
int
Total number of tests (including skipped)
{{failedTests}}
JSON
Failed tests details
{{passedTests}}
JSON
Passed tests details
{{erroredTests}}
JSON
Errored tests details
{{failedTestsTruncated}}
bool
true if failed tests list was truncated to 10
{{passedTestsTruncated}}
bool
true if passed tests list was truncated to 10
{{erroredTestsTruncated}}
bool
true if errored tests list was truncated to 10
JSON structures
failedTests / passedTests / erroredTests
All three lists share the same structure:
Note: Test lists are limited to 10 entries to prevent oversized payloads.
failedSuites / passedSuites / erroredSuites
Available only in schedule run events:
Example payloads
These are the same payloads that fill with example inserts in the alert form.
Test Run
Suite Run
Schedule Run
Last updated
Was this helpful?
