How 2 Access Newly Created Document Data in Database Trigger Function for a Blog Newsletter System.
- 0
- Functions
- REST API
ππΌ I have a "blogs" collection in my production database "blogify"
ππΌ I want to write a function "sendNewsletter" which sends the newsletter immediately after someone wrote the blog and the audience subscribed to them.
ππΌ I would like to add an event to listen the "blogs" collection... and after some blog is created, this function should be executed.
ππΌ My Question is: In the context of a database trigger or event listener for new blog post creation, how can the "sendNewsletter" function access the details of the newly created blog post document? Specifically, what methods or techniques can be used to retrieve the content of the document that triggered the function, so that the function can identify the author and their subscribers?
PLEASE HELP ME OUT!
How 2 Access Newly Created Document Data in Database Trigger Function for a Blog Newsletter System.
Recommended threads
- Timed out waiting for runtime error
execution id 6a3e0791978712d81ee0 im having issue with appwrite function runtime performance. even after 4gbram and cpu same function sometimes completes in a...
- Function crash first run after a while
Big issue Iβm facing , almost all functions crash or run for a very long time the first time i run them after a long time without running them I have a βhelp-c...
- 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...