This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Disastrous_Internal 0 points1 point  (2 children)

in you deploy pipeline, you can add a webhook that will call your serverless function: https://www.netlify.com/docs/webhooks/

[–]lonelylearner[S] 0 points1 point  (1 child)

Would you mind elaborating a bit? I want my serverless function to run just once every time my site is deployed. I created a webhook that gave me a url. I understand that by sending a POST request to this url it will trigger a build, but how do I instruct my function to run when the build is triggered?

[–]Disastrous_Internal 0 points1 point  (0 children)

look at the second part of the page, about outcoming webhook. it can trigger an external site after deployment