Do you want to be notified when a Netlify deployment completes, or do you want to trigger a deployment manually?
Netlify offers a handy functionality, called outgoing webhooks , which lets you receive a webhook whenever certain conditions are met, e.g. whenever a build was successful or when it failed.
Because Notify17’s main focus is on handling webhooks, it is very easy to connect these two systems together:
- Create a template to support the webhook.
- Create the webhook.
- (Optional) Use an action to deploy your build.
1. The template
To get started with Netlify’s webhooks, import and save the following template in your Notify17 account:
2. How to set up a new webhook?
You can find more reference about webhooks in Netlify’s docs .
Navigate to Netlify’s dashboard
Setup the webhook:
- Choose the event you want to be notified about, e.g. Deploy succeeded
- In the URL to notify field, copy and paste your notification template URL
- Click on Save
That’s it, you will not be notified whenever e.g. a build will be successfully completed!
3. Deploy your build using an action
There may be cases where you don’t want Netlify to automatically deploy a build, e.g. you have production builds which need to be tested beforehand using a different URL.
In these cases, you are probably using locked deploys , which force you to manually click on a Publish button when you want to deploy a specific build.
You can easily delegate this business to a Notify17 notification action: whenever a build completes, you will receive a notification (e.g. set up in the previous sections of this use case), and this notification will contain a Deploy button, which you can use to deploy the build.
To set this action up:
Generate a personal access token, by navigating to Netlify’s user settings .
- Enter a meaningful description, e.g. Notify17, and click on Generate token
- Copy your token, and use it in the next step!
Import the following action template, and replace
REPLACE_API_TOKENwith the personal access token you just generated in the previous step.
- Save the notification template.
That’s it! Whenever a build will succeed, you will be notified about it, and you will be able to use the handy Deploy button.