Skip email with bot

I have a table named events that is a calendar. I have a bot to notify people when an event is made that sends a text and also sends an email to the members of the group the event is for. Everything is working on the text part because everyone has a phone number entered but some people do not have an email address entered. When the bot is triggered all the texts go out but the emails do not because there is no To: address because the email field is blank. Is there a way to skip to records that have a blank email so it will still send to anyone with an email address?

Solved Solved
0 6 108
1 ACCEPTED SOLUTION

Maybe this?

select (
members[email], and(isnotblank([email]),[member group] = [_thisrow].[group]
))

View solution in original post

6 REPLIES 6

How is your To field configured, meaning what is your expression for the To field?

I think what you are saying is that your email task is made up of sending an email for each member of a group that is part of a calendar event, rather than a single email with a list of members in the To field? How does that affect your text message task if a member of the group doesn't have a phone number? I would have figured that the same principle would still apply whether it's text or email.

the to: field is calculated by getting the email address if they are a member of the group. Here is my code

select (
members[email], [member group] = [_thisrow].[group]
)

Does this expression always generate an empty list of emails then? I suspect there could be some permission issues that the app owner account maybe doesn't have the proper permissions to view members within an email group if [_THISROW].[group] refers to a domain email group. So maybe clarify what [group] points to.

There are groups that have been user created, not a domain group. Sometimes there are missing email addresses since its not required to create a member record. If everyone in the group has an email address then the emails are perfect and sent out. The problem is if there is no email address. So is there a error event I can program to basically say if there is no email address then don't send and go to the next one? , maybe a isnotblank()?

What I'm trying to determine is if your current expression will generate an email list of 'something@xyz.com, 'empty', somethingelse@xyz.com' for those instances when there is a group member that does not in fact have an email. What you seem to indicate is that if a single member of a group does not have an email, then the bot does not fire at all, where I would think it should still generate a list of emails with some blanks in that list.

However to tighten up your expression I would suggest using this maybe:

UNIQUE(SELECT(members[email], AND([member group] = [_thisrow].[group], ISNOTBLANK[email])))

Maybe this?

select (
members[email], and(isnotblank([email]),[member group] = [_thisrow].[group]
))

Top Labels in this Space