How to create a group that will be shown & hidden every few seconds? ( social proof/ FOMO widget)?

What is the best approach to build something like this for my app?

I know we would use floating group, but how to make it hide/show every few seconds plus changing the content from the database?


Note that you can set up a workflow to execute every n seconds. Design your group to have a type so that you can send it your promo things. In your workflow:

Step 1: Element > Display data (data to send: whatever thing from your db you want to display, perhaps it’s a random item or just the next item by date or whatnot) ONLY WHEN the group is not visible.

Step 2: Element > Toggle group. (This toggles Element visibility. If it’s hidden it goes visible and vice versa.)

Step 3. Do whatever housekeeping you need ONLY WHEN the group is not visible. You will note then that this step will Execute on opposite iterations of the “every n seconds” workflow.

(Example of the housekeeping u might do: you might take the group’s current thing and push it onto a list of things held in a custom state. In this way you could keep track of what’s been shown. Or you might hold on to the thing’s Created date or similar so that you can show the next most recent item, etc.)

1 Like

Thank you @keith, I will test this today.