Skip to content

Build Event Handlers overview

Build Event Handlers let your integration hook into the Netlify build process of a site that is using your integration. The old way of doing this was through Netlify Build Plugins. Build Event Handlers are only active on a site level (learn more about integration levels)

Build Event Handlers expand what Netlify builds are capable of. For example, Build Event Handlers allow you to:

  • speed up builds by optimizing and debugging your build cache
  • import and convert data from external source s
  • check for broken links in a site after building
  • analyze and optimize site asset handling for better runtime performance
  • generate content like sitemaps, RSS feeds, and search indexes

Inject functions and edge functions during the build step

You also have the option to create an integration that injects functions and/or edge functions during the build step. This SDK functionality is currently in beta and we welcome all feedback. Learn more about function injection and edge function injection.

You can use the Netlify SDK utility tools to run, test, and build your integration as you work.

Once you publish your integration, it will be available for Netlify users to add to their sites or teams.


  • Get started: how to generate the boilerplate and add the basic scaffolding for a build event handler in your integration.
  • Hook into build events: overview of Netlify’s build-deploy lifecycle events that a build event handler can hook into.
  • Values & methods: overview of data available to your build event handler, and the utilities and APIs you can use in your code.
  • Call API Handlers: how to interact with the Integration API or Netlify API from a build event handler.
  • Debug & test: how to test your build event handler locally on a test site.
  • Migrate Build Plugins: how to migrate an existing build plugin to a build event handler in your integration.