Strapi + Gatsby auto trigger build (other than Netlify...)

Hi there,

I have a hosted Gatsby site and a Strapi CMS hosted on Heroku.

I’d like to trigger a build/redeploy on platform whenever a specific event occurs on Strapi (create, delete, update). does not offer incoming webhooks build capabilities…

Their Rest API seems to do the job though. But the OAuth2 is causing problems.

To make API calls I need an Access Token.
It is generated via a POST with my API Token in the body. The response gives me the Access Token.
Detailed infos here

Is there a way to setup Strapi so that anytime those events occurs (create, delete, update), Strapi first grabs this Access Token (middleware ?) and then use it in the Headers to make the call (webhook ?) to redeploy my site ?
Or maybe you have a better idea how to handle this ?

Hope what I’m saying makes sense… Anyway thanks for your help.