Transcription
In this video, I'm going to tell you about the most important part of any AI agent. But here's the surprising thing: We're not going to talk about models. We're not going to talk about prompts. We're not going to talk about tools. We're not really going to talk about any AI concepts at all. And that's because the most important part of an AI agent is the trigger. The trigger determines when the AI agent is going to wake up and start doing work on our behalf. If the agent doesn't wake up at the right time, it can't possibly do the right work. It may not wake up at all, in which case it won't do anything, or it may wake up at the wrong time. And that's why the trigger is so important.
In this video, I'm going to tell you all about the common types of triggers, when you might want to use each one, and how to set them up. With that, let's dive in. There are four different types of triggers that I use all the time. I'm going to first quickly tell you the summary of each of the four types with one example of each, and then we're going to go into way more detail in how you actually set up each one.
The first type of trigger is the simplest, which is a manual trigger. And much like you'd expect, a manual trigger means you manually start the AI agent when you tell it to. So, for example, if you're preparing for an event that's upcoming and you want to send emails to each of the guests who are in a spreadsheet, you would manually click a button and say, "Start sending emails to all those guests right now." That's a manual trigger.
The second type of trigger is a scheduled trigger. And a scheduled trigger will trigger automatically, but not based on a specific event, but just based on the passage of time. This is really useful for recurring things that happen every day, every week, or every month. For example, every day give me a summary of all my customer calls from the past day. Or every week, give me an analysis of what my competitors are posting on YouTube. And you set up a schedule trigger much like you would set up a recurring event in a calendar system to tell your agent to wake up when that time of day or day of week happens to hit.
The third type of trigger is actually the most common, which is an app-based trigger. An app-based trigger means that the AI agent is going to wake up in response to something happening in one of your tools. For example, an email is received in Gmail, or a new contact is added to your CRM in HubSpot, or a new item is added to a Monday.com board, or a database page in Notion was updated. Your AI agent can always be listening, listening to all your tools to see when new things are created, or when things are updated or changed. That's an app-based trigger.
And the fourth type of trigger is actually a slightly broader category of triggers from the outside world. That means something's happening out there, and your AI agent is listening. And there's a few different ways you can listen. You can listen to an RSS feed, you can listen to a mail hook, you can listen to a web hook. The latter two of those are more technical. So, in this video, I'm going to focus most on RSS triggers, but the fourth trigger type, the thing you need to keep in mind is you're waiting for your agent to listen to something from the outside world. So, those are the four trigger types. Now, I'm going to go through each one of them individually in a bit more detail.
Okay, let's go into manual triggers in a bit more depth. First, there's two different types of manual triggers: There's a single item manual trigger and there's a batch manual trigger. With a single item manual trigger, you would specify a simple form that you want to fill out that's going to kick the AI agent off and start its work for you. So, for example, let's say you want to have an AI agent that researches a candidate that's applying to a job at your company. You could have a manual trigger with a form that's like: put in the name, put in their LinkedIn profile, and put in the role that they're applying for. And then the agent will go off and do some research on that candidate and maybe make an assessment of whether they're a good fit for that role. That's the simplest kind of manual trigger. It's a single run. You fill out a little form, and then the trigger runs from there.
The second type of manual trigger is called a batch trigger. And a batch trigger means you have multiple different items that you want to run the same workflow for. So, for example, say you have a list of candidates in a Google sheet or a list of companies you want to track in a Google sheet, and you want to manually initiate some research on all of them. You would use a batch trigger to say: when I click this button, go through every single row in that sheet and perform this action, workflow, or operation on all the items in that sheet. So manual triggers come in two flavors: single mode or batch mode. And in both cases, they're really the simplest kind of trigger because there's no guesswork of when it's going to happen. You go click a button yourself.
The second trigger type is a scheduled trigger. And scheduled triggers are very similar to manual triggers, but instead of you needing to go in and click a button, the trigger will happen automatically when a certain time is reached. For example, every day at 8 am, or every Monday at noon, or every month on the 31st at 5:00 pm. And much like a manual trigger, a scheduled trigger can either be a single item or a batch of items. So with a scheduled batch trigger, you could say, "Every month, look at the list of all of our competitors in a spreadsheet and go look up what they've been up to in the last month," or every month look at all the top accounts in our CRM and give me a summary of the account health. So scheduled triggers and manual triggers are quite similar. The only difference is that a manual trigger you have to remember to go click a button to tell your agent to start working. And in a scheduled trigger, the agent will automatically wake up at a pre-specified time to start doing that work either in the context of a single run or a batch of runs.
Now, let's get into the third kind of trigger, which is the most used, the most important, and also the trickiest to set up, which is an app-based trigger. Once again, an app-based trigger means that the AI agent is listening for something to happen in one of your tools: a new email being received in Gmail, a new item being added to a board on monday.com, etc. When you're using an app-based trigger, you need to set up three things: Number one, which app are you listening to? Gmail, Notion, Airtable, Slack, etc. Number two, what event in that app are you listening to? For example, in Gmail, are you listening to email received, email sent, label added, or in Slack, are you listening for a new message was sent to a channel, or a new user was added to the workspace? Or in Salesforce, are you listening for a new contact being added, or maybe a company record being updated? And then third, within that app and within that event type, which subset of events do you want the AI agent to wake up for? Which filter criteria do you want to use? So, for example, if you have an email received trigger in Gmail, you may not want your agent to wake up for every single email. You may want your agent to only wake up and work on a subset of emails. For example, those that have "invoice" in the subject, or those that are sent from Jacob, or those that are sent to support@relay.app. And you would configure that in the filters for your trigger. So you pick the app, you pick the event, you pick your filters, you confirm via this little preview box that the right elements in that app are going to wake up your agent at the right time, and then you set up your app-based trigger.
Okay, now we're ready to go into the last trigger type, which is triggers from the outside world. And I mentioned that there's going to be three different techniques that we can use to listen for events in the outside world: RSS feeds, web hooks, and mail hooks. Because web hooks and mail hooks are a bit more advanced, I'm going to cover those in separate videos. And I'm going to focus here on RSS feeds. If you've used Google Reader back in the day or are familiar with blogs, you may know what an RSS feed is. It's basically a way for an online publisher to alert subscribers to new content. And RSS feeds were traditionally used for blogs. But it turns out there are a ton of things out there that have RSS feeds. Every YouTube channel has an RSS feed. Every subreddit has an RSS feed. Many official governing bodies like the SEC have an RSS feed. Any Google alert can have an RSS feed. So almost anything that you want to listen for in the outside world, you can find an RSS feed that approximates those events. So when you're setting up an RSS trigger, it's very simple. You only need to put in two things: Number one, you need to find the URL of that RSS feed. The way I typically do that is I ask ChatGPT. I say, "Hey, ChatGPT, what is the RSS feed URL for the YouTube channel of related app?" Or, "What is the RSS feed URL for the B2B marketing subreddit?" And then ChatGPT is pretty good at telling me what the URL is. So, you put in the URL and then, like with the app-based triggers, you can set up filters if you want. Like, oh, I want to follow all of the SEC statements, but only ones that apply to companies headquartered in this particular state, for example. And you would set that up as a filter. So, once you set up your RSS URL and you set up your filters, your RSS feed trigger is ready to go, and you can listen to and react to events from the outside world by waking up your AI agent when a relevant thing happens.
So, that's it. Those are the four types of triggers I use over and over again in my AI agents: I use manual triggers, scheduled triggers, app-based triggers, and triggers that listen to events in the outside world, which are typically RSS triggers. So now you know the most important part of setting up your AI agent. You are going to be able to wake up your agent at the right time and instruct it to start doing work on your behalf. Next, click up here for the next video, which is going to show you how to actually start doing some AI, logic, reasoning, and intelligence to turn that trigger into some useful work on your behalf. With that, thanks for joining, and I'll see you at the next one.