How to dynamically assign notification recipients

Is there a way to dynamically assign who will receive the notification based on some criteria? For example, if I have Users and Groups tables, with the Users table having columns User (contact) and Group (rowlink to Groups), can I then send notifications to only users in a specific group?

Hey @Rick thanks for the question. I was able to create something like what you're describing with the following set up:

I created a group membership table like so, where Group column is formatted as rowlink to B_Groups table and Member column is formatted as a contact:

The B_Groups table looks like so, where Users column's formula is set to =Filter(B_Group_Membership, "B_Group_Membership[Group]=THISROW()")

2020-06-30_22-08-45

I then created an automation that was triggered when the Notification Trigger column of groups changed:

Finally, I created a notify block and I set the Run the step for these rows under run options to be =[Users] so it ran once per user's row in filter in that column. I set the To: field to be =[Member] so it pulled the contact from that column in the B_Group_Membership table. I then set up subject as "Notification about group =Group".

With this I was able to dynamically control who receives email based on which which Group's row triggered the notification. Let us know if this works for your use case!

Thank you for the reply. In my case, I am triggering a notification when an unrelated table has a row added. If I set up the notification as you describe, I lose the context of the added row, and instead get the context of the Run the step for these rows result. If this isn't clear I can set up a full example.

Hi @Rick I think I understand. At a high level, I would add a new column to the "unrelated table" that gets the Users column from the relevant B_Groups row. To do this first, I'd start with a formula like =FindRow(B_Groups, -a criteria that matches the B_Groups row based to a row in your table-)[Users]. Now when you have the notification trigger updated in your table, you have access to users who need to be notified and you will not lose the context row.