Use cases
React to connection lifecycle events
Run integration logic when a connection is validated, created, or deleted.
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.
Tenklo supports this with event functions. They run automatically for a specific integration and connection event.
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.
These functions are not called by your app directly. Tenklo runs them when the configured lifecycle event occurs.
How Tenklo fits in
- Your user creates or deletes a connection.
- Tenklo detects the lifecycle event.
- Tenklo runs the event function with that connection's credentials.
- The function validates, initializes, registers, or cleans up provider-side resources.
- The execution appears in Tenklo 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.