Netlify Trigger
The Netlify trigger allows you to kickstart seamless workflows based on real-time events in your hosting environment.
It automates tasks triggered by deployment status changes or new form submissions, streamlining the connection between your content and live site deployments.
Prerequisites
Start with adding your Netlify account by following the steps given below:
Connect your Netlify Account
- Navigate to your project and click Automations in the top navigation panel.
- Click + New Automation and from the dropdown options, click Create New. Enter a Name and an optional Description. Click Create.
- Click Configure Trigger from the left navigation panel.
- Within the Configure Trigger, click the Netlify connector.Click to enlarge
- Under Choose Trigger tab, select the Netlify Trigger.Click to enlarge
- In the Authorize modal, enter a Title and a Token.
- You can generate a new token from the Personal access token section in your Netlify console. Navigate to User settings > Applications > New access token > Generate token.Click to enlarge
Additional Resource For more information, refer to the Obtain a token in Netlify UI document.
Then click Authorize.Click to enlarge
Set up the Netlify Trigger
Perform the following steps to set up the Netlify trigger connector:
- From the left navigation panel, click Configure Trigger.
- Within the Configure Trigger, click the Netlify connector.Click to enlarge
- Under the Choose Trigger section, select Netlify Trigger.Click to enlarge
Note After successfully configuring a trigger, if you re-configure any other trigger you will be prompted to revert to the previously configured trigger. You can revert back to the last trigger configurations by clicking the Revert Changes button.
-
Let’s look at it in detail.
Netlify Trigger
The Netlify Trigger event lets you trigger an automation when you perform deployment related activities in your Netlify account.
Let’s look at the steps to set up the trigger event.
- Under the Choose Trigger tab, select Netlify Trigger.
- On the Netlify Trigger Configure Trigger page, enter the details given below:
- Click + Add New Account button to connect your Netlify account as shown in the Connect your Netlify Account step.
- Select the Site ID from the Lookup drop-down.
The Site ID is a unique identification given to a project configured in Netlify. You can select the desired project for which you want to configure the Netlify connector.
- Select the trigger event from the drop-down, i.e., Deployment succeeded.
The Netlify Trigger supports the following events:
- Deployment started: Triggered when Netlify begins building a new deployment.
- Deployment succeeded: Triggered when a deployment completes successfully and goes live.
- Deployment failed: Triggered when a deployment fails during the build or publish process.
- Deployment locked: Triggered when deployments are temporarily disabled for a site.
- Deployment unlocked: Triggered when deployments are re-enabled for a site.
- Form submission received: Triggered when a new form submission is captured by Netlify.Click to enlarge
- Click Proceed.
- Click Test Trigger to execute and test the trigger that you configured.
- If successful, the system dsiplays the following output. If it looks appropriate, click Save and Exit. Click to enlarge
This sets up the Netlify trigger connector.