If you’re not familiar with the annual contest hosted by the Akron Global Polymer Academy, your ten-year-old self might be ashamed of you. The actual name of the contest is the “Rubber Band Contest for Young Inventors” and it draws dozens of entries each year, ranging from highly sophisticated science fair projects to highly entertaining grade school weaponry. (Here’s my favorite entry from this year, slicing Oreos.)

Last year, one of the winners was then eleven-year-old Andrew Pelham, who tackled an extremely rare but entirely preventable cause of death, infant death by heat exhaustion. These are deaths that make us shudder in horror: on a hot summer day, a preoccupied parent absent-mindedly leaves an infant in the back seat of the car. A few short minutes in the high temperatures prove fatal to the baby.

Andrew’s invention solved this problem. Based on the pictures I’ve seen, he created a long chain of rubber bands that attached to both the baby carrier and the driver’s front door. When the driver opens the door, he or she is unable to exit without being reminded of the baby in the backseat.

Though I’m not sure how many people have actually used Andrew’s E-Z Baby Saver, I’m confident that, when in use, it likely prevents 100% of potential infant deaths due to heat exhaustion. That’s because Andrew created a fail-proof trigger that sets in motion the “baby saving” behavior. His invention serves as the perfect example of how we should go about learning any new habit, from choosing healthy foods to getting to bed on time. The first step to any habit is a trigger–a stimulus or cue–that sets everything in motion. When we identify existing triggers or create new ones, we’re beginning the process of developing a habit.

A World of Triggers

As I researched Andrew’s award-winning rubber band chain, I stumbled across another invention from seventeen-year-old Alissa Chavez that solves the same problem. She took a significantly more advanced approach, using weight and location sensors to create an alarm that sounds when a child is left in the car.

I think Alissa’s variation of the baby-saving invention proves a point, which is that our hyper-technological world offers an endless variety of triggers. Just in a car alone, we already have alerts to tell us that the seatbelt isn’t fastened, the keys are still in the ignition, and the headlights are still on–why not a reminder about the tiny passengers in the backseat?

While you may not have the technical savvy to rig a weight sensor in your kid’s carseat, an incredible platform called IFTTT offers dozens of triggers that can be useful for creating healthy habits. Remember, if you can create the right triggers at the right times in your life, you’ve mastered the first step of creating good habits. IFTTT stands for “If This, Then That” and it allows you to connect one action to another action, forming simple triggers using technology.

For example, let’s say you’re trying to curb your spending habits, which means avoiding your favorite store at the mall. IFTTT can use the GPS technology in your phone to know exactly when you’re nearby the store. If you get too close, IFTTT will send an immediate alert. The alert could be something meaningful, like a message you wrote to yourself reminding you about the vacation that you’re trying to save up for. You remember the vacation, and you decide not to go to the store after all.

This is just one example, and IFTTT has an impressive library of recipes you can use to set up the perfect trigger for your habits. But what makes a good trigger?

Creating a Good Trigger

When an unexpected trigger arrives at an unusual time without context, it usually doesn’t inspire action. Take, for instance, email notifications. At one point or another, you’ve probably received a “Please come back!” email from a web service that you’ve long since forgotten; this is an example of a terrible trigger. Often there isn’t any context in the email that would actually entice you to return to the site, so the email is a desperate shot in the dark. Here are three steps you can follow to help with the process of creating effective triggers.

1. Get the timing right

If you’re trying to make a behavior change, you’re likely trying to disrupt an existing bad habit (like smoking cigarettes) or insert a new good habit (like going to the gym). That means you need to find an existing trigger and stop it from happening, or create a new trigger that will make good things happen.

On my drive home from work every day, I pass a small drive-through soda shack called Sodalicious that offers dozens of varieties of sodas that can be mixed with different fruit flavors. I always see a line of four or five cars waiting to order soda–people stop to grab a drink on their way home from work. We all know soda has a ton of empty calories, so how would you go about avoiding Sodalicious?

The drive home from work can be loaded with triggers, because we’re often tired, hungry, and emotionally drained. And a nice, sugary Sodalicious beverage can help us forget all that pain. If these emotions are the triggers that make you think of Sodalicious, you need to prevent them from happening. A small snack at 4:30 before your drive home at 5 could give you some extra energy, leave you less hungry, and help you make it home without splurging.

If you step outside of your daily autopilot and analyze your routines, you should be able to recognize the bad triggers and determine when the good triggers are necessary.

2. Choose the right type of trigger

Stanford psychologist BJ Fogg says that there are different types of triggers, depending on the level of motivation and ability that we have to achieve a particular habit. That means you may need a trigger that provides motivation or that facilitates the habit. (You can take a closer look at the types of triggers here.)

The two questions you need to ask about your habit are “Am I motivated to do it?” and “Am I able to do it?” If you lack motivation, you might need a trigger that gives an extra spark (this is the term Fogg uses). In the earlier example, in which you’re trying to avoid spending too much at your favorite store, the IFTTT reminder does just that: it helps you remember something important to you (your vacation) which increases your motivation to complete the behavior.

Maybe you already have high motivation, but you don’t have the skills to do the habit. This could be the case for many people that are trying to lose weight. If so, the ideal trigger would be something that not only cues the good behavior, but also provides instruction about doing it correctly. If you use a weight loss app, it can remind you to eat a healthy dinner, then also suggest how many calories you should eat and some of the foods that would meet that criteria.

3. Create the connection

In one of the most well-known psychological research studies ever, Ivan Pavlov showed that he could use seemingly random triggers (bells, whistles, electric shocks, etc.) to cause dogs to salivate. The two events, the trigger and the salivation, were entirely unrelated at first, but formed a strong connection with some training. Without that connection, the trigger would not be a trigger at all.

There are many ways to create this connection between a trigger and your desired habit. The most common way is to act on the habit immediately after the trigger occurs. Sodalicious is a tempting habit because I pass it right as I’m feeling tired on my way home from work. To build good habits, a common strategy is to take something you already do each day and make that a trigger for the habit that you’d like to do. For example, I wanted to memorize some inspiring quotes, so I used “getting out of the shower” as a trigger. Each day before I turned off the water in the shower, I recited a quote out loud as a reminder to myself.

When you pair two everyday behaviors together like this and repeat them over time, you form a strong connection between them. Eventually you reach the point that when the trigger occurs, the habit is inevitable. And that’s exactly what you want.