I want to trigger a function every time there is any change in the db how do I do that?
for example lets say I have a blog and a user commented, I want to trigger a server function
you can trigger it by defining it from function settings from console
for example here I'm triggering one of my cloud function when new document is created in users collection
you can define the event in function settings. first of all deploy your function then goto appwrite console >functions >your-function > settings then find Events. and add event.
you can learn more about events here: https://appwrite.io/docs/advanced/platform/events
got it, it is such a small section in the documentation for important feature
thanks!
@sophex89 Can I mark this as solved?
Recommended threads
- 408 Timeout / Curl Error 7 in Executor w...
Hey everyone, I am losing my mind over a routing loop/timeout issue on a fresh self-hosted setup. I have a single Linux VPS (IP: 45.141.37.105) and one domain (...
- functions returning error 401 in local
I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running versi...
- router_deployment_not_found
I updated my function a few times and now i am getting the error: router_deployment_not_found I even reverted back to my original code but i am still getting th...