I’m slightly stuck with something in my app and haven’t been able to find an answer.
In my app users are allowed to send emails to a list of users. Right now, users have to manually add each email address to the list of recipients.
I’m trying to figure out a solution for letting users bulk import email addresses through the UI, either through pasting them into a multiline input or by using the csv upload.
Unfortunately I’ve not been able to get either of those to work.
Does anyone have any idea of a solution, would be much appreciated!
Is each email address associated with another registered user on your system; or are the recipients (email addresses) not associated with an account on your system? And if the latter, how is the list of addresses stored? Is it a field of the User data type that is just a “list of texts”?
The recipients are not users with an account in my system, they are essentially people who are being sent a survey.
I’ve set the data up as Recipients (List of Texts) with each text being the recipients email address.
Use the bubble’s new feature format text as.
Just put this at the end of Do a search for and then format it as a list
Thanks for the suggestion, I’m not sure this works for what I am trying to do.
Trying to add a list of comma separated email addresses to a list unless I’m getting it wrong.
If you have any ideas would be super appreciated!
If I understand correctly, you need to parse a string into a list. Ideally, there’d be a built-in dynamic expression operator to split a string using a user-defined string as the delimiter; but I don’t think that’s available yet in Bubble.
However, it can be done using a simple regular expression (regex). See the following demo…
The key is the regex which splits the multi-line input, minpEmailAddresses, on the newline character…
Once you have the list, use
merged with to merge it with the user’s existing list that’s already in the DB so as to eliminate duplicates.
It’d be a good idea to also use the
:lowercase operators for consistent formatting of the addresses.
Thanks very much for this - sounds like it should work I will give it a try today!
If I get it going will post some screenshots of the setup
Yes worked perfectly! Set the data into the repeating group, then added a extra step to save the contents of the repeating group to the database.
Video of the flow in action for those interested… https://www.loom.com/share/1b212f9f4edb467e9ad681b4fe4530f1
Thanks very much, I would never have figured that out!
This topic was automatically closed after 70 days. New replies are no longer allowed.