Scenario Notification Channels

Notification channels are executed whenever a scenario is finished and a report is available. As notification channels are environment specific, configure them in the "Notification Channels" section of a "Builds" tab in the dashboard.

Blackfire supports the following notification channels: email, webhook, native third party services integrations.

Tip

If you need different notification channels for your testing, staging, or production environments, create several environments with different configurations.

Email

Note

This notification channel is only available to our Premium and Enterprise users.

The email notification channel sends emails whenever a build is completed, depending on its configuration.

First, configure email recipients:

  • If you check the "Include environment members", email will be sent to all members of the environment;
  • The "emails" input allows you to add emails from people who are not part of the environment (or if you want to select only a few people from the environment members).

Then, configure when emails must be sent:

  • On success: an email is always or never sent when the builds succeeds, or only when the status changes;
  • On failure: an email is always or never sent when the builds fails, or only when the status changes;

Note

You can create more than one email notification channel if you need to configure notifications for different groups of people.

Webhook

Note

This notification channel is only available to our Enterprise users.

The most generic notification channel is the webhook. Configure a URL on the Environment notification channels configuration and Blackfire will POST on this URL when a build starts, progresses, or is completed. The body of each HTTP request is a JSON payload representing the build.

Here is an example when the build is pending:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "state": "pending",
    "description": "Profiling... 83%",
    "context": "blackfireio",
    "external_id" => "",
    "external_parent_id" => "",
    "summary" => "",
    "report_web_url": "https://blackfire.io/build/6f425645-9901-45ad-a4dc-9c2511a3dedf",
    "report_api_url": "https://blackfire.io/api/v1/build/6f425645-9901-45ad-a4dc-9c2511a3dedf"
}

And one when the build is completed:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "state": "failure",
    "description": "The Blackfire build failed",
    "context": "blackfireio",
    "external_id" => "",
    "external_parent_id" => "",
    "summary" => "5 failing, 2 successful tests",
    "report_web_url": "https://blackfire.io/build/6f425645-9901-45ad-a4dc-9c2511a3dedf",
    "report_api_url": "https://blackfire.io/api/v1/build/6f425645-9901-45ad-a4dc-9c2511a3dedf"
}

The state can have the following values: queued, pending, success, failure, or error.

The report_api_url and report_web_url are the URLs where the full report is available from the API or the web.

Note

You can configure several webhooks if needed.

Native Integrations

Blackfire supports a number of native integrations with third-party tools. Please check their dedicated documentation: