Schedule email and update rows that have been emailed

I want to schedule an email to send the information in a slice as a table.

Then update all the rows that have been emailed with a timestamp.

I can schedule the email and send what I want to send, but to update the rows using an action I have to turn on ForEachRowInTable so that I can select a table to match the process, which then sends the email multiple times (one for each row)

Can I do this without it sending multiple emails?

0 9 366
9 REPLIES 9

You could add a step of type 'Run a data action" to the automation. In that additional step you can configure a reference action that updates the desired column of  all the rows of the slice that indicates those rows have been sent.

You can as well update those rows with a webhook.

I've added a step to Run a Data Action, which does work, but I still have the problem of needing to turn on ForEachRowInTable which then sends an email for every row

That is why I suggested Reference action and not a simple row level data change action. Reference actions work in pair with row level data change actions and updates multiple rows with the reference action pair.

Please take a look at the below sample app, on how reference actions work. In this sample app many children rows are updated when an action is invoked on the parent table.

Reference Actions

In your case you can define the reference rows with an expression something like Slice Name[Table Key] so that all the rows in the slice are covered in reference action. Also in your case both the initiating table and referenced table will be same- the table of the slice.

I don't think I understand.

I think I need t make a new table, to be the parent, which has a column referencing the slice I want to email.

Then I can use that table to send the email and also run the action to mark the rows that are referenced.

Is that right? I haven't tried it yet.

You do not need another table. Please take a look at the below screenshots. In the screenshots below the first initiating reference  action and the second referenced action are based on the same table.

Initiating Reference Action screenshot below

Points to note: For a record of this table and referenced table are same ( no different parent and child tables as in sample app)

The referenced rows are on a slice called "Open Orders" on the Orders table.

The referenced action  is called from this initiating action and updates the column values of the same table.

Suvrutt_Gurjar_0-1662639148353.png

Referenced action screenshot below

Points to note:  This action is called from the initiating reference action and changes the [Order Status] and [Delivery Date] when the initiating action fires. 

Suvrutt_Gurjar_1-1662639464958.png

 

The bot looks like below

Points to note: The initiating reference action described above is  called as the last step after , send open order email and PDF is sent from the "Send Open Orders" step. When this initiating reference action invokes, it in turn invokes the referenced action that updates some columns in the slice.

Suvrutt_Gurjar_2-1662639551597.png

 

Hope this explains. You could similarly have actions on the same table. You can call the initiating action as the last step in your bot. These reference actions then can  update the status of some column of all the rows in the slice. The slice that  you have for sending the records in email.

Will this send a seperate email for every open order?

Or a summary of the open orders?

I have assumed that your email bot sends one email and that is already in place.  I have suggested the additional step to update the column as you wanted. So this last step is just for updating the all the rows of the slice.

 

 

The email bot does send one email. Because it is scheduled and not for every row it needs to have no table selected. And the process also needs no table to match.

To update the column a table needs to be selected and the process needs a table to match. So I can't see how I can do both in one bot.

I might be totally misundertanding this, Bots still really confuse me.

As I have detailed it out, the action  selects the slice in the last step. If you append the action step to email step in the bot, the last step will do the job of updating the rows in the slice.

Top Labels in this Space