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
- Worker functions stuck on "Fetched 0 fun...
Appwrite Version: 1.9.0 Bug Description: The appwrite-worker-functions container gets stuck in an infinite loop logging "Fetched 0 functions..." while scheduled...
- I am using s3 for app storage but is it ...
_APP_STORAGE_DEVICE=s3 puts everything to the s3 storage but i need to be able to keep the function builds and site in the local and not waste the cloud storage...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...