Content Deep Dive
How to use event-triggered Netlify Functions
Blog post from Netlify
Post Details
Company
Date Published
Author
Charlie Gerard
Word Count
383
Language
English
Hacker News Points
-
Summary
Netlify Functions are serverless functions written in Node.js, TypeScript, or Go that can be used for various tasks such as fetching data and sending notifications. They can be triggered automatically by certain Netlify events, allowing developers to automate their projects with event-driven functionality. For example, a deploy-failed function can be named after the event it's triggered by, such as `deploy-failed.js`, and can send a Slack notification with a GIF when a deployment fails. The use of background functions allows for longer-running jobs, while the Giphy API is used to fetch a random 'fail' GIF for the notification.