Send only one email triggered by several updates

Hi everyone,

I have a sort of shopping App where employees can order hardware. Once they collected all items in their shopping basket and hit the button "Order All" the status of every single item in the table changes to "requested" and an email will be sent to the appropriate address for approval. At the moment, my automation triggers an email on "data change" - "updates only" every time the status changes to "requested" BUT I want only one email to be sent for all user's items at once. I am sitting way too long on this and cannot find the right approach.

I already tried it with adding a row to a dummy table once the action is hit and triggering an email by that add. Though, I then struggle in my last step as I cannot set a condition for the email to only send information for that particular user and all of their requested items in that original table.

So, this is my shopping cart and by hitting the "Order all" button in any of the items overview, I have the action running "execute an action on a set of rows".

Ksenia1_0-1685638094644.png

To then change the status of each item from "New" to "requested":

Ksenia1_1-1685638252837.png

Your help is much appreciated!

 

 

Solved Solved
0 5 341
2 ACCEPTED SOLUTIONS

Hello there @Ksenia1 , I suggest you have the email setup at the "order" level in your app, not at the "order item" level, that way you have access to your [Related items] column for easy access to all the order data, and any email automations will only send a single email.

To accomplish that from within an action from the "order item" level I suggest you create the following actions and add them to your "order all" button by converting it (if it isn't already) into a grouped action, but first, you will need a new "orderStatus" column in your "order" table.

  1. Create the 'Set order as "Requested" ' action, which will simply set [orderStatus] to "Requested
  2. Create the 'REF Set order as "Requested" ' action, which will run the action number 1 on a set of rows, the action runs from "order item" to "order" and the list of rows will be LIST([orderREF])

And that's it ! now you just have to have your automation waiting for changes to the "columnStatus" column in your "order" table, and make the appropiate changes to your email.

I also suggest you set a "behavior" condition to the action number 2 that checks first for the status of the "orderStatus" column before attempting to change it, something like this:

[orderREF].[orderStatus]<>"Requested"

View solution in original post

One option would be to have your 'order all' action be a grouped action that will first set the status of just that one record to something different such as 'trigger', which is what triggers the bot. And the second action would be your existing 'execute' action.

View solution in original post

5 REPLIES 5

Hello there @Ksenia1 , I suggest you have the email setup at the "order" level in your app, not at the "order item" level, that way you have access to your [Related items] column for easy access to all the order data, and any email automations will only send a single email.

To accomplish that from within an action from the "order item" level I suggest you create the following actions and add them to your "order all" button by converting it (if it isn't already) into a grouped action, but first, you will need a new "orderStatus" column in your "order" table.

  1. Create the 'Set order as "Requested" ' action, which will simply set [orderStatus] to "Requested
  2. Create the 'REF Set order as "Requested" ' action, which will run the action number 1 on a set of rows, the action runs from "order item" to "order" and the list of rows will be LIST([orderREF])

And that's it ! now you just have to have your automation waiting for changes to the "columnStatus" column in your "order" table, and make the appropiate changes to your email.

I also suggest you set a "behavior" condition to the action number 2 that checks first for the status of the "orderStatus" column before attempting to change it, something like this:

[orderREF].[orderStatus]<>"Requested"

Thank you so much @Rafael_ANEIC-PY for your detailed response! ๐Ÿ™

Your table should be one with Orders and Order Items. You just need to add the first one so that the later depends on the first one and the email is sent for "Adds only"

One option would be to have your 'order all' action be a grouped action that will first set the status of just that one record to something different such as 'trigger', which is what triggers the bot. And the second action would be your existing 'execute' action.

Wow, that's smart and easy. Thanks a lot @Marc_Dillon!

Top Labels in this Space