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
- [v1.8.1] Getting error "(role: applicati...
... but that scope doesn't exist. I am trying to get a function to run and modify tables in the database dynamically. I set everything up and eventually got: ...
- Scheduled function silently stopped firi...
Function is scheduled `* * * * *` and is `enabled: true`, but Appwrite Cloud has stopped queueing executions. Last execution: **2026-05-30 00:47 UTC** (~46h...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I canβt fin...