Send an email to users from the input field

Hello!
I need to implement the following workflow. The administrator enters users’ email addresses in the input field, separated by commas, and clicks the “Send” button. As a result, each user receives an email, but the user only sees his email address in the “To” field, and does not see the email addresses of other users. I would be grateful for any help.

I’m sorry, I don’t know what you mean.

There are various ways to do this, depending on how exactly you’re sending your emails (what email service provider you’re using, what type of API call etc.)… it will also depend on exactly what you want to include in the email (i.e. any other personalization for the User)…

But, assuming you’re just going to send an individual email to each email address entered in the input, you’ll first want to set up a backend workflow with an action to send an email, and a parameter to accept the email address (text)…

If the number of email addresses entered in the input is small, then you’ll be able to run this workflow on a list without a problem. If it’s big (say, more than 100), then you’ll want to run the workflow recursively instead…

Then, all you need to do is add a workflow on the page, to schedule the backend workflow on a list (or just schedule it if you’re running it recursviely), and set the list to run on to be the list of emails entered in the input (use :split by , to turn the single text into a list of texts).

That’s all you need to do…

If you want to add more personalization to the emails for the Users, then at some point you’ll need to refer to the actual Users (rather than just the email addresses)… by searching for Users based on the email addresses entered in the input, then you can refer to other data about the User in the email.

Good afternoon!
Thanks for the clarification, but I have the problem of type mismatch. In the backend setup, I set the key type to User and the input field type to Text. How can I correct this mismatch?


Change the Recipient Parameter on the backend workflow from User to Text (it’s just an email address, not a User)…

If you need to refer to other User data in the email (such as their name), you can just do a search for User’s who’s email matches the recipient parameter value… if you don’t need to refer to other User data in the email, then there’s no need to refer to the User at all…

You could do the search for Users on the front end, but you’d need to use an advanced filter to do it, so I wouldn’t recommend it…

Alternatively, you could change the UX and not use a text input element, but rather some other way for the User to select the recipients (such as a search box or multi-dropdown), to actually define a list of Users (rather than email addresses), then pass that to the backend workflow.

1 Like

Okay, I did what you said, but every user who was sent an email can see the email address of another user. I want the email addresses of other users to be hidden.

You must be doing something wrong… (but I don’t know what, since you haven’t shared what you’re doing…)

But presumably, you’re sending the email to all of the recipients instead of just one…

What does your ‘Send Email’ action look like?

Here’s the backend setup



and this is the setting by clicking on the “Send” button

Ok, that’s set up incorrectly…

As it is, you’re passing the same list of texts (email addresses) into each backend workflow, and sending the same email to every participant in the list (at once), multiple times… hence why you can see all email addresses in the email…

I’ll explain the correct way to set it up again…

The backend workflow should have a parameter for Recipient, which should be a single text (the email address), NOT a list.

In that workflow there should be an action to send an email to a single recipient, so in the ‘To’ field you should enter the dynamic value recipient.

To schedule the backend workflow on the list of recipients, set the Type of things to Text, the list to run on to Input A's Value: split by (,) and the recipient should be set to This Text

:muscle:You are a great professional! Thank you, it worked!

2 Likes

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