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
- Functions not executing after usage rese...
Hi team, Last month my project hit 100% usage and functions stopped working (expected). Now the new month has started and usage has reset, requests are going ...
- Functions never end and always fail (sta...
Hi ! I'm using Appwrite Cloud Pro and function execution from appwrite website is KO. Deploying starter function template, execution is always Failed and the ...
- Provider error when creating a function ...