Lifecycle events let you customize Nango’s behavior at different points in a Connection’s lifecycle.

How lifecycle events work

Lifecycle events are triggered by the Nango platform when certain things happen for a Connection. You can customize Nango’s behavior by registering an event handler Function for an event and specific integration. For example: You register a post-connection-creation event handler function on your Salesforce integration. Nango will call this function once for each Salesforce connection, immediately after it has been created. All lifecycle event executions are logged in Nango’s logs. To implement a lifecycle event handler, follow our implementation guide.

Supported lifecycle events

Nango currently supports the following events:
  • validate-connection occurs when a connection is being created and allows for custom validation of the connection credentials. This will reject and delete the connection if it fails the validation.
  • post-connection-creation occurs when a connection has been created.
  • pre-connection-deletion occurs before a connection is deleted.
Check out the lifecycle events reference for details.

Common use cases for lifecycle events

  • Integration-specific validation logic for API keys or other credentials (e.g., check permissions to access a specific endpoint)
  • Register webhook subscriptions after a connection has been created
  • Fetch account configuration information from the external API
  • Deregister webhook subscriptions when a connection is deleted
  • Revoke an access token on the external API when a connection is deleted