Your First AI Automation

Building Your First Workflow

4 min read

Let's build a practical AI automation from scratch: an Email Summary Assistant that reads new emails, summarizes them, and sends you a digest in Slack.

What We're Building

WORKFLOW: Email Summary Assistant
═════════════════════════════════

TRIGGER: New email in Gmail
FILTER: Skip newsletters & automated emails
AI STEP: Summarize the email
ACTION: Send summary to Slack

Why this workflow?

  • Uses common tools (Gmail, Slack)
  • Demonstrates the core Trigger → AI → Action pattern
  • Immediately useful in daily work
  • Easy to customize for your needs

Step 1: Create the Trigger

The trigger defines "when" your automation runs.

TRIGGER SETUP
─────────────
App: Gmail (or your email provider)
Event: New Email Received
Account: Connect your email account
Filter (in trigger): Inbox only (exclude spam/trash)

What the trigger produces:

{{email.from}}      → sender@example.com
{{email.subject}}   → "Q4 Budget Meeting"
{{email.body}}      → Full email text
{{email.date}}      → 2025-12-26 09:30

Step 2: Add a Filter

Filters prevent unnecessary processing. We don't need AI for newsletters.

FILTER SETUP
────────────
Logic: Continue ONLY if ALL conditions are met

Condition 1:
  Field: {{email.from}}
  Does NOT contain: "newsletter"

Condition 2:
  Field: {{email.from}}
  Does NOT contain: "noreply"

Condition 3:
  Field: {{email.subject}}
  Does NOT contain: "unsubscribe"

What happens:

Step 3: Configure the AI Step

This is where the magic happens. We'll use AI to understand and summarize.

AI STEP SETUP
─────────────
Action: Generate Text (or "AI by Zapier" / "OpenAI" module)
Model: GPT-4o mini (cost-effective)

Prompt:
━━━━━━━
You are an executive assistant. Summarize this email concisely.

Email:
From: {{email.from}}
Subject: {{email.subject}}
Body: {{email.body}}

Provide:
1. One-sentence summary
2. Action required: Yes/No
3. Priority: High/Medium/Low
4. Suggested response (if action required)

Format your response as:
SUMMARY: [one sentence]
ACTION REQUIRED: [Yes/No]
PRIORITY: [High/Medium/Low]
RESPONSE SUGGESTION: [2-3 sentences or "N/A"]
━━━━━━━

What the AI produces:

SUMMARY: CFO requests Q4 budget projections by Friday for board presentation.
ACTION REQUIRED: Yes
PRIORITY: High
RESPONSE SUGGESTION: Acknowledge receipt, confirm Friday deadline, mention you'll include updated revenue forecasts.

Step 4: Send to Slack

The final action delivers the AI output to you.

ACTION SETUP
────────────
App: Slack
Action: Send Message
Channel: #email-summaries (or Direct Message to yourself)

Message Template:
━━━━━━━━━━━━━━━━━
📧 *New Email Summary*

*From:* {{email.from}}
*Subject:* {{email.subject}}

{{ai.response}}

[View Original]({{email.link}})
━━━━━━━━━━━━━━━━━

Result in Slack:

📧 New Email Summary

From: cfo@company.com
Subject: Q4 Budget Meeting

SUMMARY: CFO requests Q4 budget projections by Friday for board presentation.
ACTION REQUIRED: Yes
PRIORITY: High
RESPONSE SUGGESTION: Acknowledge receipt, confirm Friday deadline...

[View Original]

The Complete Blueprint

Here's the full workflow in blueprint format:

WORKFLOW: Email Summary Assistant
═══════════════════════════════════════════════════════════════

┌─────────────────────────────────────────────────────────────┐
│ TRIGGER: Gmail - New Email                                  │
│ Output: {{email.from}}, {{email.subject}}, {{email.body}}   │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ FILTER: Skip if from contains "newsletter" or "noreply"     │
│         Skip if subject contains "unsubscribe"              │
└─────────────────────────────────────────────────────────────┘
                              │ Passes
┌─────────────────────────────────────────────────────────────┐
│ AI STEP: Summarize email                                    │
│ Model: GPT-4o mini                                          │
│ Output: Summary, Action Required, Priority, Response        │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ ACTION: Slack - Send Message                                │
│ Channel: #email-summaries                                   │
│ Content: Formatted summary with original link               │
└─────────────────────────────────────────────────────────────┘

Testing Your Workflow

Before going live, test thoroughly:

Test 1: Normal Email

  • Send yourself a work-related email
  • Verify: Summary appears in Slack within 1-2 minutes
  • Check: Summary is accurate and well-formatted

Test 2: Newsletter (Should Skip)

  • Subscribe to a newsletter, wait for delivery
  • Verify: No Slack message appears
  • Check: Filter is working correctly

Test 3: Edge Cases

  • Very short email (one sentence)
  • Very long email (multiple pages)
  • Email with attachments (should still summarize text)

Troubleshooting Common Issues

Problem Likely Cause Solution
No Slack message Filter blocking all emails Check filter conditions
Summary is empty AI prompt issue Verify {{email.body}} has content
Wrong format Prompt not specific enough Add clearer output instructions
Slow (>5 min) Platform delay or rate limit Check platform status page
Errors on send Slack connection expired Reauthorize Slack connection

Customization Ideas

Once working, enhance your workflow:

Enhancement How to Implement
Priority routing Add PATH: High priority → #urgent channel
Daily digest Change trigger to scheduled, batch emails
Calendar creation If "meeting" detected → Create calendar event
Auto-reply draft Save AI response suggestion to Gmail drafts
Multi-language Add translation step for non-English emails

What You've Learned

You've just built a real AI automation that:

  • Triggers on new events (email arrival)
  • Filters to reduce noise (skip newsletters)
  • Uses AI to understand content (summarize)
  • Takes action with results (Slack notification)

This pattern—Trigger → Filter → AI → Action—is the foundation of every automation you'll build.

Next: Let's explore business-specific automations for marketing, sales, and operations. :::

Quiz

Module 2 Quiz: Building Your First AI Automation

Take Quiz