Hi community!
I am struggling with updating several documents at once.
Use-case:
User 1 bookmarks a social post (post 1)
User 2 bookmarks a social post (post 1)
User 3 comments post 1
Actions:
I want user 3 to trigger an action that creates a Notification document that updates user 1 and user 2 notification subcollection that user 3 has commented on a post they follow.
I managed to create a infinite loop 😅 and a single document update, but not both at once. (see below, current updated with a loop stop to stop the infinite loop)
Loop action > 0: Checks if someone has bookmarked the post
Action 6: queries a user document where the user has bookmarked the post
Action 7: Create the notification in the right subcollection that controls notifications
Action 8: update notification badge to red (for unseen notification)