How do you capture multiple emails? Just a text input and hope that your end users format everything properly so that you can use a formula and a loop to parse the text, right? Yeah, I’ve done that too. It’s no fun!
During a recent project I was once again faced with this requirement: We want people using the form to be able to add CC email addresses to the case. I didn’t want to build the same clunky solution to capture email addresses where we have little control over the input.
I wanted to see if I could use AI to build a solution for this since I couldn’t find one. I was really surprised that this didn’t already exist as a component on unofficialsf.com! It’s a feature that seems so obvious for capturing email addresses in a form.
Heads up: there are a lot of media in this post to show all of the functionality. If you’re reading this on your phone, you may want to save it for later and check it out on your computer.
Install
Easy method: copy and paste this after your org URL to run the installer. packaging/installPackage.apexp?p0=04tHo000000tCz0IAE
The basics
Multi Email Input is an LWC that works in screenflows. After installing the package, you can find the LWC in the Custom section of a Screen.
Entering email addresses is as easy typing them in! Pressing the return, space, or tab key after typing and address will add it to your list. It also supports copying and pasting lists, which will be shown later.
Email inputs are stored in a collection and as text so that you have flexibility with using the outputs. I specifically designed the outputs to work with the Send Email action in a flow.

Flow Settings
There are quite a few settings available for this component! For most settings I have included an input for a custom error message that overrides the default message that is included in the component.


Allowed Domains
Allowed domains gives you the ability to restrict your domains to just the ones you want to allow. If you’re creating this form for internal users, you may want to require that they use a specific email domain only. Allowed Domains also supports wild cards, so if you have a variety of internal domains that have slightly different formatting, you can use wildcards to make this easier to use.



Blocked Domains
Want to block domains or domains from certain countries? Maybe you don’t want to allow domains from certain free domains, you could enter those into this field to block those from being entered.

Disabled
This value can be controlled by a formula so that it only shows if the value equals true. Maybe you need other fields completed before allowing someone to enter multiple emails. Create a formula that handles that and only makes the field active once a certain criteria met.
Duplicate Email Error Message, Help Text, Invalid Email Error Message, Label
If you want to replace any of these error messages, you can enter a custom message in these fields. Otherwise the default message will be shown.
Maximum Emails
Enter a number between 1 and 150 if you need to limit how many addresses can be entered. The 150 max limit comes from Salesforce’s current limit on the Send Email flow action.

Placeholder Text, Required, Value
If you need to show a custom placeholder, replace this value. You can also make the component required if necessary. Value is used to prefill addresses. If you want to use email addresses from earlier in your flow, you can put in that resources here. Validation rules from other settings will apply when the flow runs.
Enter emails with copy/paste
Do you have a bunch of email addresses that you want to copy into the form? Maybe you’re copying a list of emails from gmail or some other email app. That works!
SLDS 2 ready
Multi Email is ready to go as soon as you upgrade to an SLDS 2 theme!