Template Configuration for Content Deploys - How does it work?

Greetings. I see the documentation for template configuration however it’s unclear how exactly it works.

Example configuration:

  incoming-hooks = ["Contentful"]

The documentation suggests that [“Contentful”], ["DatoCMS "], or even perhaps [“Ghost”] might be valid values yet it’s unclear how it works. Can the value be arbitrary (Eg: [“MyCMS”])? Is this an array type value? What does Netlify do with this value? How is the content added? Build time, runtime, …?

Still digging for the answer. Any clarification is appreciated.


:wave: :wave: :wave:

Hey @tempest-mind,
Thanks for the bump! I agree, not totally clear how that attribute works. I’m going to ask our backend team and get back to you. In the meantime, this page has some examples of working templates so you can see what their netlify.toml files look like:

Alright, got some answers for you! The way this works is that if you add one or more strings to that incoming-hooks array, we’ll create a build hook for each string, with the string value as the build hook name. You’ll be able to see the hooks in your site dashboard at a link like this: https://app.netlify.com/sites/SITE-NAME/settings/deploys#build-hooks

Then the idea is that you can get the build hook URL and provide it to some other service (for example, in the service’s UI).

Let us know if you have any other questions on this!

1 Like

Many thanks for following up, @jen !

I can confirm that the template configuration in the netlify.toml file does create a build hook when using Netlify’s “Deploy” mechanism. Meaning, this will work when clicking a Deploy button.

However, the incoming-hooks template configuration in a netlify.toml file will not work for Netlify sites created outside the Deploy mechanism. Meaning, this configuration is not useful when creating a Netlify site by simply connecting to a git repository. It appears that the configuration is ignored.

If my understanding is correct then it is still a bit confusing when this configuration is applicable. There might be a good logical reason however that part is still unknown to me. Feel free to correct my understanding!


You’re correct- the incoming-hooks section of the netlify.toml is only available as part of a template, which is deployed with the “Deploy to Netlify” button.

If you want to deploy your own repo with Netlify (without making it a template that others can deploy), you can add build hooks in your site dashboard- not in the netlify.toml file. Here are our docs on build hooks again:

Agreed that this could be clearer in our docs and/or on the template.netlify.com site :slight_smile: I’ve flagged for our docs team.

1 Like