Time Triggered Automation with Conditions

I have an automation that is triggered twice a week. I have two conditions that need to be met, and if those aren't met, the automation still runs, but in the email, no rows are sent. I'd like to be able to set up an automation where if the conditions aren't met, a different alert goes out.

When I first attempted this, I simply did an "Otherwise" with a different alert email subject and body. However, today when it ran it sent out both emails since some rows did meet the criteria and others didn't.

How do I get this to run if rows meet the conditions send the first alert, and if no rows meet the condition, send the other one?

Based on what I had set up, Today we had items that met the condition and other items on the sheet that didn't so it sent both emails.

Can someone help make it send only one or the other email?

Tags:

Best Answer

  • sharkasits
    sharkasits ✭✭✭✭✭
    Answer ✓

    @Lynae You can set up a helper column with a formula that counts the instances where the condition occurs within the sheet. Then you can add a conditional path that checks if that column = 0 and use that to send the No Topics email.


    I only see one condition in your screenshot, but with that you could use this formula for your helper column:

    =countif([Item Resolution Date]:[Item Resolution Date], isblank(@cell))
    

Answers

  • sharkasits
    sharkasits ✭✭✭✭✭
    Answer ✓

    @Lynae You can set up a helper column with a formula that counts the instances where the condition occurs within the sheet. Then you can add a conditional path that checks if that column = 0 and use that to send the No Topics email.


    I only see one condition in your screenshot, but with that you could use this formula for your helper column:

    =countif([Item Resolution Date]:[Item Resolution Date], isblank(@cell))
    
  • @sharkasits so a conditional path will allow the first condition to send if there are only items that meet that condition, and the path for the second with the helper will then send only when there are no items? Just want to make sure by adding another path, it makes the first one only send if there are items that meet the condition, otherwise I'm back where I started. I did add the helper with the formula proved (THANK YOU!).


  • @sharkasits I saved my sheet as new and ran a test, that did indeed work for me!! I did change the formula to =COUNTIFS([Item Resolution Date]:[Item Resolution Date], ISBLANK(@cell), [Item Owner]:[Item Owner], <>"") however since we use a form, there are blank rows at the bottom of the sheet that the formula was taking into the count. By adding a second condition in the formula to ensure there's data in the row as a whole (we require Item Owner data) I was able to get the 0 result I was looking for. Much appreciated for the assistance!

  • sharkasits
    sharkasits ✭✭✭✭✭

    @Lynae Glad that worked for you!