Triggers & Actions
Event-Driven Thinking
Every Automation Has Two Parts
Every automation follows the same pattern: something happens (trigger), then something responds (action). Master this pattern and you can automate anything.
Triggers: What Starts the Workflow
A trigger is an event that kicks off your automation. Common triggers:
| Trigger Type | Example | When It Fires |
|---|---|---|
| New data | New email arrives, file uploaded | Immediately on event |
| Schedule | Every morning at 9am, every Friday | On a timer |
| Threshold | Support queue > 50 tickets | When a condition is met |
| Webhook | Stripe payment received, GitHub PR opened | External system notifies you |
| Manual | User clicks "Run" button | On demand |
The best triggers are specific and frequent. "New email" is too broad — "New email from a customer with 'urgent' in the subject" is a trigger you can build a useful automation around.
Actions: What Happens Next
Actions are what your automation does when triggered. AI-powered actions go beyond simple if-this-then-that:
Building Your First Workflow
The simplest useful automation chains one trigger to one action:
TRIGGER: New support email arrives
→ ACTION: Classify as urgent/routine/spam
→ ACTION: If urgent, post to #support-urgent Slack channelThis three-step workflow replaces a human scanning every email, deciding its priority, and manually posting alerts. It runs in seconds instead of minutes and never misses an urgent email at 2am.
Chaining Actions
Real workflows chain multiple actions together. Each action's output feeds the next:
TRIGGER: New document uploaded
→ Classify document type (invoice, contract, report)
→ Extract key fields based on type
→ Summarize the document in 3 sentences
→ Route summary to the right Slack channel
→ If invoice, add to expense tracking spreadsheetThe key principle: each action should do one thing well. Don't build a single action that classifies AND extracts AND summarizes. Break it into steps. This makes workflows easier to debug, test, and modify.
Error Handling
What happens when an action fails? Good automations handle three scenarios:
Never build an automation that fails silently. If you wouldn't notice a failure for hours, your automation isn't production-ready.
This is chapter 2 of AI Automation Without Code.
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details