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
- Function global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...