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
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- 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...