_images/login_button.png _images/signup_button.png


Reading time: 2-3 minutes


Webhooks are very simple, yet very powerful way to integrate with external systems such as Slack, email, or any other system via an HTTP post request. The webhook, a simple application designed to handle incoming HTTP requests, will parse and process a payload from Scalr then integrate with the external systems when events occur during a Terraform run, such as:

  • Run complete - When the run is completed successfully

  • Run errored - When the run is prevented from continuing due to an error in the code, cancellation, or a policy failure.

  • Run needs attention - When someone will need to review a plan based on the workspace not having auto-approval or if a policy is override is required.

During any of these events Scalr will send a payload to an endpoint that the the administrator or workspace owner has defined.

Endpoint Configuration

Endpoints can be configured at in environments. An endpoint is required as it is the URL that Scalr will send the payload to. To create an endpoint, click on integrations and then endpoints on the main toolbar. Enter the required information:


A secret key is generated. This key must be used in the webhook code to verify that Scalr is the source of the payload.

Webhook Configuration

The webhook configuration is where the endpoint and trigger events are defined. Webhooks can be created at the environments or in workspaces.

To create a webhook at the environment level, click on integrations and then webhooks. If a webhook is created in an environment then all workspaces within that environment will inherit it. To create a webhook at in a workspace, go to the main dashboard of that workspace, click on webhooks, and then new webhook.

On the webhook page configure it with the following settings:


After a Terraform run has triggered one of the events the payload that was sent to the webhook can be viewed.


All webhook events will be logged under the deliveries. These can be seen via Integrations in the environment or in the workspace deliveries tab:


Each delivery will also show the payload that was sent for that event:

    "message":"Updated instance\n",