Some integration work should happen around the connection lifecycle rather than from a user action or schedule. For example, you may need to verify credentials before accepting a connection, register provider webhooks after authorization, or clean up subscriptions before a customer disconnects. Nango supports this with event functions. They run automatically for a specific integration and connection event.Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
When this fits
Use event functions when you need to:- Validate credentials or provider permissions during connection creation.
- Register external webhook subscriptions after a connection is created.
- Fetch account context and store it as connection metadata.
- Clean up provider resources before a connection is deleted.
How Nango fits in
- Your user creates or deletes a connection.
- Nango detects the lifecycle event.
- Nango runs the event function with that connectionβs credentials.
- The function validates, initializes, registers, or cleans up provider-side resources.
- The execution appears in Nango logs.
What to read next
- Event functions - supported events, function syntax, testing, and deployment.
- Webhook functions - register and process external webhooks.
- Storage - store account context on the connection.
- Functions SDK reference -
createOnEvent()reference.