Skip to main content
This event occurs when a user removes a connection. It also occurs when a workspace uninstalls your app: one time for the workspace connection and one time for each user connection. The registered handler runs before the connection is deleted, meaning that if the handler throws an error, the connection will not be removed. You can use the handler to perform any necessary teardown work.

During an uninstall

When a workspace uninstalls your app, Attio removes the connection even if the handler fails:
  • If the handler throws, Attio calls it again, for a maximum of 5 attempts. The minimum time between attempts is 30 seconds. After the last attempt, Attio removes the connection.
  • If the handler runs for longer than the 30-second server function timeout, Attio stops it. Unlike a throw, a timeout is not retried: Attio removes the connection.
  • In two cases, the handler cannot run, so Attio removes the connection without it and your cleanup does not happen:
    • The member who created the connection is not an active member of the workspace now. The handler runs as this member.
    • The OAuth access token of the connection is expired, and Attio cannot refresh it. The handler cannot use the connection.
See Cleaning up on uninstall.

Example

Here’s an example that cleans up a webhook handler.
TypeScript