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
- TablesDB can't be used in Appwrite Funct...
I have written a function (DART) and it won't deploy. Here is what I get : 2026-03-14T17:09:41.459693680Z Compiling ... 2026-03-14T17:09:42.915619217Z ../build...
- Local appwrite run functions --user-id n...
Hi, I'm running into an issue when testing Appwrite functions locally with user impersonation. I'm using a self-hosted Appwrite instance and running functions ...
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...