I’m asking a help of advance-Bubbles user to help me find best solution.
In bubble I have a list of advertisements in DB. Users with help of filters finds ads. that fits filters. There is a button that marks current adv. as “seen”. So in the end - there would be no adv. shown in Repeating Group.
I’m trying to create some notification mechanism (send email) when at least one adv. appears for current user.
I understand that with current bubble setup and with my “basic paid plan” there is no chance to create “real-time” notification mechanism. What I’m trying to achieve is that Bubble each X minutes searches for adv. using saved filter and if results.count > 0 - send email to user.
So which one the custom event I should look first? Trigger a custom event when data changes? Schedule API workflow on a list?
Much appreciate in advance if some one could help me with this.
It would be good to think about the triggering event. (Ex. User A creates a new Ad in the system. User B is interested in the type of Ad that User A created).
In this case, here’s what I’d recommend. When User A creates an Ad, schedule an API workflow on a list of Users, that is set up as "Do a search for User’s who have an interest in the Ad type that User A just created. Then have that API workflow send an email to the relevant user. (Just keep in mind that this scenario sends your user’s an email every time there is a match).
@dan1 thanks for you answer.
Thing is that advertisements are appearing via API. Idea is create site which aggregates ads from others platforms so that users no need to look up every and each.
I’d say it really depends on how you’re looking to set up your database. (Ie. do you want to ingest the data (create records in your Bubble database) from these APIs or do you just want to ping the API for results when the user is on the current page). That would dictate how you set up your workflows for notifications.
Working with ad platforms isn’t really an area I claim much understanding. So I’ll leave it to others to chime in.
Well all adv. records are in Bubble DB. Each user has a list of already seen records. Idea is to notify user with email (or notification) when new adv. which matches users saved filter appears.
Great to hear. Mind sharing (to the level of detail you’re comfortable) how you implemented your solution? It’s helpful for others who encounter similar issues in the future.
So I’ve created an API endpoint which need to be filled with all search filter and parameters as well as User as a User type.
From web page I’m scheduling (by pressing a button) to run a Workflow again a list. In my situation it’s a list of users.
The overall scenario looks like this: After button has been pressed - Workflow takes each users (by searching all Users with some needed filter) on-by-one, passes user and all other saved parameters to API workflow and after returns some actions (if results is expected). In my situation it’s a - Send email.
There are to downsides: 1) I can’t schedule this to run this each 3 hours for example 2) There is a pause between each users passes to workflow. Bubble do not recommend to set this pause not less as 5 seconds. So If I need to run this against 100 users it will take around 8 minutes (in good conditions) to go trough each users.
Thanks for sharing. I think you’re safe to go less than 5 seconds. (You could set it at a lower value and Bubble may/will override this if it feels it needs more time to process).