Get List of Users

I have a notification system in place that normally the recipient would be the ‘User’. I made a simple “dashboard” where I have a simple input box and a button. I want to type some text in the input box, and send it with the button. This should send to every user.

I figured I’d be smart and set it up where when the user registers, it does an “Add user to Mailing_List” where I have a list of users setup under the Mailing_List data type. This will basically make one big list of every user when they register.

So, how do I get that list of users? So far I tried Search for Mailing_Lists but it wants more data after that. What would I put after that so it gets the list of users?

Adding “:first item” to the above search will work for you. But this an extremely inefficient and non-scalable way of setting up your database. Lists can contain a maximum of 10K items.

You should rather have a field on user stating if they’re added to the mailing list. Then you should setup a backend workflow to send emails to users and trigger that via schedule api workflow on a list from the frontend.

This is the least you should do but this could be further optimized via batching users in the backend and then sending them emails.

I thought of a better way but just not sure how to implement it. I could do a search for users (for users) or a search for users each item’s emails (for emails). When I put this in, it still wants more data so Im not sure whats missing. This won’t send out an email to everyone, rather just show up as a notification for everybody when they log in. The notification plugin just uses the user’s email to verify they are a user. It’s weird but don’t worry about that part lol

ah nevermind I think I got it!

This topic was automatically closed after 70 days. New replies are no longer allowed.