Send Email to Particular Member with his name in Email Body

I have two tables, first table named as Users with Name and Email Columns with data already present in it. Another Table named as Entry with Name of the Persons and Email Columns with no data present in it. Entry Table Name of the Person Column has same data that is present in Users Table Name Column, but as Enum List. So, usually some one opens Entry Form and select Name of the Person column values and in the Email Column valid if I have placed this formula, SELECT(Users[Email],IN([Name], [_THISROW].[Name of the Person])), so that the Name of the Person column, selected values will get an Email by taking Email from Users Table for that Name.

Now I have created an automation bot for Entry Table and event I have selected send an email, where in the place of sent to I have placed [Email] column of Entry Table, and in the Email Body I have placed [Name] Column. When this event is trigged, the person whom I have selected in the Name of the Person column are getting emails, but I want there Name to be displayed to whom the email is getting triggered, as I have placed [Name] Column in the Email Body, but what is happening is I am getting all the values of the Name of the Person Column instead of one.

To give you a better example, lets say in the Entry Table and in the Name of the Person Column, I have selected three values as test 1, test 2, test 3. So as soon as I save they are getting emails but everyone are getting emails like this

Dear test 1,test 2, test 3 for all the emails that are sent

Instead of Dear test 1, if the email is sent to test1@gmail.com

Instead of Dear test 2, if the email is sent to test2@gmail.com

Instead of Dear test 3, if the email is sent to test3@gmail.com

So, my question is what formula should be placed instead of [Name] Column in the Email Body

1 REPLY 1

What is causing you issues is that you are selecting a list of users into a column and then trying to iterate over that column to send targeted emails to each user individually.  AppSheet isn't built to operate that way.  Instead, you simply want to mark the User table rows to send the email to.

For example, in your Users table you might include a column named "Send Email".  If you only have only a single email that is potentially sent then this column can be a Yes/No column.  Initially this columns has a value of NO (or blank). 

Then in your app, you would have a view of your Users and simply set the "Send Email" column for each user you want to send the email to.  OR...you can create an action that set the "Send Email" column then use the AppSheet "Bulk select" feature.  This allows you to mark each User to send an email to and THEN you chose the "Send Email" action.  The action will update each User's "Send Email" column to YES.

NOW, in the Bot, the Event is setup to trigger for any User row where the "Send Email' column is YES.  The Bot operates on just that SINGLE user row. As each User row is set with "Send Email" = YES, another instance of that Bot is triggered.

When you get to the Email step of the Bot, keep in mind it is operating on that SINGLE User row.  So you simply need to reference the proper columns from that row.  The Send email "To" property would be set to [Email] for the email address of the user who gets the email. In the body template you can simply do:

Dear <<[Name]>>,

...to tailor the email to that recipient. 

I hope this helps!  Please ask questions if it isn't clear what needs to be done.

Top Labels in this Space