The Toolkit › Trigger-Based Automation
Chapter 18

Trigger-Based Automation

Why this matters

A couple of chapters back, you built a scheduled task that runs every morning at 7am. That's great for routine stuff. But some things shouldn't wait for a schedule. They should happen the moment something else happens.

A new enquiry email lands at 2pm on a Tuesday? You want a reply drafted within minutes, not the next morning. A client pays an invoice? You want a thank-you receipt going out straight away, not sitting in a queue until Friday.

That's trigger-based automation. Instead of running on a timer, it fires the instant something happens.

What we're doing

Building a Zap that triggers when a new email arrives from someone who isn't already in your contacts. When that happens, it drafts a warm first reply asking what they need help with.

The result: potential new clients get a response within minutes of reaching out, even if you're on a job site, in a meeting, or at lunch.

Step by step

Step 1: Create a new Zap

Open Zapier and click "Create Zap."

Step 2: Set the trigger

This time, instead of "Schedule by Zapier", we're using Gmail as the trigger.

  1. Search for "Gmail" in the trigger search box
  2. Select "New Email"
  3. Connect your Gmail account (if you haven't already from The Basics)
  4. Set a filter so it only fires for emails in your Inbox (not spam, not promotions)

Every time a new email hits your inbox, this Zap will check it.

Step 3: Add the AI analysis step

Not every email needs a response. Newsletters, receipts, spam - those should be ignored. This step teaches the Zap to tell the difference.

  1. Add a Claude or "AI by Zapier" action
  2. Set the prompt to something like: "Read this email. Is it a genuine new business enquiry from someone reaching out for the first time? If yes, draft a warm, friendly reply asking what they need help with and how you can assist. Keep it short and natural. If it's a newsletter, receipt, automated notification, or spam, reply with just the word SKIP."
  3. Map the email subject and body from the Gmail trigger step

Step 4: Add a filter

After the AI step, add a Zapier filter:

  1. Click "+" and search for "Filter by Zapier"
  2. Set it to: "Only continue if the AI output does NOT contain the word SKIP"

This means newsletters and junk get filtered out. Only genuine enquiries make it to the next step.

Step 5: Create the Gmail draft

  1. Add a Gmail action: "Create Draft"
  2. Set it to reply to the original email (map the sender's email address to the "To" field)
  3. Map the AI-generated reply to the body

The draft sits in your Gmail, ready for you to review and send.

Step 6 (optional): Add to your client list

If you use Notion, Google Sheets, or any other tool to track clients, you can add one more step:

  1. Add a Notion (or Google Sheets) action
  2. Create a new entry with the person's name and email address

Now every new enquiry automatically gets logged in your system AND gets a draft reply. Two things done in under a minute, without you lifting a finger.

💡 Your briefing file (CLAUDE.md) is doing the heavy lifting

This is where your CLAUDE.md from Course 1 pays off. When the AI drafts that reply, it uses your tone, your business name, your style. The client gets a response that sounds like you wrote it yourself, within minutes of sending their email. That's the power of having your briefing file set up properly.

💡 This is what people mean by "agents"

You've just built something that watches for events, makes decisions, and takes actions on its own. That's an agent. When you hear people talk about "AI agents" or "getting agents to do jobs," they mean exactly this: an AI that doesn't just answer questions when you ask, but actively works in the background, responding to things as they happen.

Some people use "agent" to mean one AI doing one job (like this email responder). Others talk about "multiple agents" working together, like one agent that reads emails, passes enquiries to a second agent that drafts replies, and a third that logs them in your CRM. Same concept, just chained together.

You don't need to use the word "agent" to use them. You've been building agents since Chapter 11. The Zap you just created? That's an agent. Your scheduled invoice checker from Chapter 16? Also an agent. Any time your AI works without you asking it to, that's an agent doing its job.

The filter step matters

Without the filter, your Zap would try to draft replies to every single email. Newsletters, Xero notifications, shipping confirmations, spam. That wastes your Zapier tasks and fills your Drafts folder with junk.

The AI analysis step is your bouncer. It looks at each email and decides: "Is this a real person reaching out, or is this noise?" Only the real enquiries get through.

Other triggers you might use

Gmail isn't the only trigger. Here are some ideas for different businesses:

Trigger ideas by business type
  • New booking in ServiceM8 - automatically send a confirmation email with job details
  • New Google review - draft a thank-you reply and share to your social media
  • New form submission on your website - add to your client database and draft a reply
  • Payment received in Stripe or Xero - send a receipt and update your records
  • New follower on Instagram - log it in a spreadsheet for tracking growth

The pattern is always the same: something happens, and your system responds automatically.

What you just learned

  • Trigger-based automations respond to events instantly, not on a schedule
  • Filters prevent your automations from wasting tasks on junk emails
  • Combined with your AI briefing file, trigger-based automation means your business responds to clients even when you're completely unavailable
  • The same pattern (trigger + AI + action) works for dozens of different business scenarios

Try it yourself

  • Set up the new enquiry auto-reply Zap in Zapier
  • Send yourself a test email from a different address to trigger it
  • Check if the draft reply appears in your Gmail Drafts folder
  • Review the draft. Does it sound like you? If not, tweak the prompt in the AI step.