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
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...
- How to verify an user using AppWrite Fun...
I have seen similar questions but none whose solutions serve me. I have a function to verify a user with their secret and their id: https://blahblah.appwrite.gl...