I am trying to create an interaction where a user could select a bunch of rows in a table, click an action to send a report, and have only one email sent with report details as a result. I have the action and bot to send the report, and it works great if a user triggers the action (sends the report) from a detail page, but when they try to do the action in bulk (which I can’t figure out how to block) it sends many emails instead of just one.
Here’s what is working:
- I have an action for Send report which writes a NOW() timestamp to a Report trigger column in the row for a single record
- I have a bot that looks for non-empty Report trigger fields that have changed (using All Changes and [_THISROW_BEFORE].[Report trigger]<>[_THISROW_AFTER].[Report trigger]
- If the bot finds a record that meets the criteria in #2, the bot sends an email.
This sends one email with an expression to include all the rows I want. But if a user instead uses the checkbox icon on a table page of records, and then selects a bunch of records and triggers the action, many emails get sent. I understand why: the bot is looking for any rows that match the criteria. Is there a good way to tell AppSheet “only send one email even if the action is triggered on many records in succession”? If not, I may try to block the action entirely on the table page using a method like this one, but I’d prefer to avoid that if I can.