Lesson 5 of 6·10 min read

Building Your First AI Workflows

Theory is important — but now we build. In this lesson, you'll create three practical AI workflows that deliver immediate value in any organization.

Workflow 1: Email Classification

Automatically categorize incoming emails and route them to the right team.

Structure

Email Trigger → AI Text Classifier → Switch → Slack (per channel)

Steps

  1. Email Trigger: Monitor IMAP inbox (e.g., support@company.com)
  2. AI Text Classifier: Analyze email content
    • Categories: Complaint, Inquiry, Order, Technical, Other
    • Confidence threshold: 0.7
  3. Switch Node: Branch based on category
  4. Slack Nodes: Send message to the appropriate channel
    • #support-complaints → High priority, immediate response
    • #support-inquiries → Standard processing
    • #support-technical → Technical team

Extensions

  • Generate automatic reply suggestions via LLM
  • Add sentiment analysis — negative sentiment → escalation
  • CRM integration: Automatically create ticket in HubSpot or Jira

Workflow 2: Document Summarization

Automatically summarize PDFs and documents and store them in Notion/Google Docs.

Structure

Webhook → Read File → Text Extraction → Summarization Chain → Google Docs

Steps

  1. Webhook: Receives document URL or file upload
  2. HTTP Request / Read File: Download document
  3. Extract Document Text: Convert PDF/DOCX to text
  4. Summarization Chain:
    • Method: map_reduce for long documents
    • Output format: Bullet points with key insights
    • Max length: 500 words
  5. Google Docs / Notion: Store summary

Prompt for Summarization

Create a structured summary of the following document.

Structure:
1. **Core message** (1-2 sentences)
2. **Key points** (3-5 bullet points)
3. **Action items** (if applicable)
4. **Open questions** (if applicable)

Document:
{{ $json.text }}

Workflow 3: Slack Bot with AI Responses

An intelligent Slack bot that answers questions, creates tasks, and retrieves information.

Structure

Slack Trigger → AI Agent → Slack (Response)
                  ↓
          Tools: [Jira, Google Docs, Database]

Steps

  1. Slack Trigger: React to mentions or direct messages
  2. AI Agent Node:
    • Model: Claude Sonnet 4 (fast, affordable)
    • System prompt: Company context, allowed actions
    • Tools: Create Jira tickets, search documents, query FAQ database
  3. Slack Node: Post response in thread

System Prompt for the Bot

You are the AI assistant of [Company Name]. You help employees with:
- Questions about internal processes
- Creating Jira tickets
- Searching the knowledge base

Rules:
- Always respond in the user's language
- For uncertain answers: "I'm not sure, please verify manually."
- Never create tickets without explicit request
- Never post confidential data in Slack

Practical tip: Start with the email classification workflow — it has the fastest ROI and is easiest to validate. Measure accuracy over 100 emails before taking the workflow to production.