
Hello Beautiful People,
I'm working on a feature where I need to execute certain actions in a function when a user account is deleted. This function would ideally be triggered by the account deletion event in Appwrite.
My key question is: Does Appwrite pass any specific data (like userID
or other identifiers) to the function when it is triggered by an account deletion event? If so, how can I capture and utilize this data within my function?
I'm specifically looking to understand:
- The nature of the data passed to the function on such an event.
- The method or syntax for accessing this data within the function. Any guidance, code snippets, or pointers to relevant documentation would be immensely helpful.
Thank you for your assistance!

Got the solution. The users id can be accessed through the request object passed by the event through JSON.stringify(req.body)

yes, the body always contains the payload of the event. so, if you have a function that triggers on document update, the body would be the updated document.
In addition, the headers have some additional info too, such as who triggered the function: https://appwrite.io/docs/products/functions/development#headers
Recommended threads
- error code:524 for functions running lon...
We are having this issue, no longer the function runtime or code, if it goes longer than 1 minute, there's no logs at all, just this error: **error code: 524**
- Invalid `specification` param: Specifica...
I'm self-hosting my appwrite instance on my Macbook, and I created a Python function using the command `appwrite init functions` and it outputed the below into ...
- Local function throws EACCES error when ...
I am developing an Appwrite function locally. Up until now, the process has been as smooth as butter: I edit my files, save them, and this triggers a rebuild of...
