@@ -11,11 +11,10 @@ With outbound webhooks, you can conveniently trigger various actions when an eve
1111
1212To enable users to define outbound webhooks upon deployment completion, follow these simple steps:
1313
14- - Navigate to your Application's Settings page and locate the Outbound webhooks section.
15-
16- - Click on ` Add new webhook ` to open the modal form.
17-
18- - Fill out the required information in the form and proceed by clicking the ` Create outbound ` webhook button.
14+ - Go to ** App** > ** Settings** page
15+ - Scroll down to ** Outbound webhooks** section
16+ - Click on ** Add new webhook** to open the modal form
17+ - Fill out the required information in the form and proceed by clicking the ** Create outbound** webhook button
1918
2019</section >
2120
@@ -37,3 +36,38 @@ When the `Request method` is selected as `Post`, you can specify the request pay
3736| ` $SK_DEPLOYMENT_STATUS ` | A string indicating the deployment status. It's either success or failed. |
3837
3938</section >
39+
40+ ## Examples
41+
42+ ### Receive an Email Notification when a deployment fails
43+
44+ Requirements:
45+
46+ - Create an Environment-level API key (** Environment** > ** Config** > ** API Keys** )
47+ - [ Configure mailer] ( /docs/features/mailer ) for your environment
48+
49+ Steps:
50+
51+ - Go to ** App** > ** Settings**
52+ - Scroll down to ** Outbound webhooks**
53+ - Click on ** Add new webhook**
54+ - Fill the form like below and click ** Create outbound webhook**
55+
56+ | | | |
57+ | -------------- | ------------------------------- | ------------------------------------------------------- |
58+ | Request URL | https://api.stormkit.io/v1/mail | Replace ` stormkit.io ` with your instance if self-hosted |
59+ | Enable headers | On | |
60+ | Header 1 | ` Content-Type ` | ` application/json ` |
61+ | Header 2 | ` Authorization ` | ` <your-api-key> ` |
62+ | Request Method | ` POST ` | |
63+ | Payload | See example below | |
64+ | Trigger When | After each failed deployment | |
65+
66+ ``` json
67+ {
68+ 69+ "from" :
" Savas <[email protected] >" ,
70+ "subject" : " Deployment failed" ,
71+ "body" : " Hi, <br /> Deployment failed: $SK_DEPLOYMENT_ENDPOINT"
72+ }
73+ ```
0 commit comments