Conditional Routines (Schedule and Alert for AI)

Corey Ruderman · Friday Demos · July 24, 2026 · 5:57

Routines that only deliver when an AI-interpreted condition is met (e.g. "email me only if weekly order volume fell more than 20%"), with a live demo of setup and condition evaluation.

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. The second, uh, demonstration that I wanted to talk about today is let me quickly open a new workbook. Sorry, my local copy is a bit slow. Okay, I'm having some difficulties with my local copy . So I'll go backstage and be back soon. Yes. Uh, let me extend Chrome. Is everything okay? Show your thumb up. Perfectly. So, in the work environment today, the procedure is performed on a schedule.

  2. I've recently been working on conditional procedures , where the prompt can contain a condition that the procedure checks each time it runs, and delivery is only made when it's true. Here we are on the procedures page. Now we have a "Types" column where a bell indicates whether it's a notification. So this one sends a request, uh , sends it when the request doesn't return any results.

  3. So here we will have different types of conditions. You'll also see indicators for what's just running on a regular schedule . Also, what conditions can be set? Are these requests ? Is it possible to set a condition based on AI? Yes, we are already approaching this. OK. Sorry. Everything is fine. Yeah, you know , we check it at a certain time, with a certain frequency, something like that.

  4. So now let's create a procedure. Let's call it " Weekly Order Volume Notification". Our tip will sound something like this . Only send me an email if weekly order volume has dropped by more than 20% compared to the previous week. The idea here is that I want to get the results, compare them with another period, and send it to myself, let's say, every Friday.

  5. Now I'll answer the question: when we save, you'll see a dialog box indicating that we're trying to determine whether to send the message every time or only under a certain condition. If we decide to send a notification, we will create an actual trigger query and test it on real data before storing anything. Under the hood, this uses the same pipeline as conditional notifications for scheduled delivery.

  6. There you select a user-defined query and a manual condition. So, the conditions are: send only if there are results, only if there are no results, if the results have changed, or if they have not changed. These are the four main types of conditions. So here we use the same four types of conditions and the same approach to evaluation at launch.

  7. The only difference is who exactly creates the request. So the language model reads my intent, decides it's a notification, not a summary, fulfills the condition, and finds that it should be sent today because it returned a string. Well, you know, if she made a mistake, and I want to send it regardless of any conditions, that is, send it on every launch, on every trigger, then I have this backup button.

  8. So I can just go ahead and create an alert. Can I ask you a question now? Yes. Would it be possible to create a framework so that a trigger uses AI to perform validation during query execution? I mean, so that he can see if the result is interesting and then send it to me. This cannot be effectively captured by a query, but AI could make decisions.

  9. Quite. Yes. I think we wanted to explore the user experience where it seems like a more deterministic outcome. And in the future—this is something we've talked about—explore the idea of ​​using a language model to test whether delivery should be based on... Ideal definitions. Yes. Yes. I agree . You need both . Aha. I feel like you want it to be...

  10. yes. Give you a choice. One more question, Corey: can we see the deterministic query she writes for this condition? Until it's released, yes. Okay. And once that's set, once that deterministic trigger query is set up , it persists. It does not change the deterministic query . Right. True. And that's why he's like that . Okay. Class. Yes.

  11. D is very cool. Then we move on, simply showing what else is available here. So, I'll just create a query, or rather a prompt. I wish I had written my email correctly. Only send me an email if the numbers look strange. This is, you know, a rather vague condition, and we should not allow this to imperceptibly become a condition for notification.

  12. So this gives me the option to go back and rephrase or just send every time I run it. Now, to demonstrate how these notifications work, we have orders worth over $500 in the last seven days, and as you can see, they are only sent when the query returns results. We have another notification, but it was skipped because the condition was not met.

  13. And here is the email for the notification that worked. Well, there's still a lot to be worked on here. still hidden behind the feature switch while we implement this. Well, yes, I'm waiting for feedback if anyone has any suggestions.