Library · Assistants and chatbots

AI Executive Assistant: a capstone assistant project

Builder120 minUpdated: October 2026
55 of 105 in the library

Module: 9. Advanced capabilities | Time: ~30 min theory + 90 min practice

The gist

Imagine a personal assistant who never sleeps, reads every incoming email, prepares for meetings before you do, and every morning puts an already-digested summary of the day on your desk. This isn't science fiction. It's the AI Executive Assistant you'll build in this lesson. The approach is universal: you can build the same logic on Trigger.dev, as in the examples below, or with Claude's ready-made tools (see the "Ready-made routes" section below).

Terms in this lesson: workflow (a work process), agent (an autonomous task performer), API (an application programming interface), MCP (the Model Context Protocol), prompt (a request to the AI), scheduled task (a task that runs on a schedule), cron (a scheduler that runs tasks on a timetable), token (a unit of text for AI).

Key concepts

  • The architecture of a multi-function AI assistant
  • Email Monitor, Meeting Prep, Daily Brief and Task Manager as separate workflows
  • Integration with real tools through MCPs
  • Deployment with a schedule and notifications to a messenger (Telegram in the examples; Slack or SMS work the same way)

Theory

Why an Executive Assistant is the project for everything you've learned

🎨 Picture this: the final exam at culinary school. You don't cook separate dishes, you cook a full five-course dinner. Chopping, sauces, timing, plating, all at once. The Executive Assistant is your graduation dinner, made of code.

By now you know: workflows, subagents, deploying to Trigger.dev, security, context management, GitHub. The Executive Assistant is a project that brings all of it together into something genuinely useful to you.

It's not a toy. It's a system you can use every day. You can show it as an example of your work: "Here's what I built for myself."


What the Executive Assistant can do

🎨 Picture this: a dispatcher on duty at the switchboard who sorts every incoming call 24 hours a day, passes urgent ones straight to the boss, handles routine ones on their own, and holds the unimportant ones until morning. You never miss anything important, even at night.

Email monitoring:

  • Checks your mail every 15-30 minutes
  • Classifies it: urgent / important / can wait / spam
  • Answers simple automatic requests on its own (meeting confirmations, standard questions)
  • Flags important messages and sends you a notification in your messenger

Meeting Prep:

  • Reads your Google Calendar
  • An hour before a meeting: who's attending? What does their company do? What did we talk about last time?
  • Generates a brief: context, key questions, meeting goals
  • Sends it to you in your messenger

Daily Brief:

  • Every morning at 8:00
  • Collects: important overnight emails, today's meetings, open tasks
  • Writes a summary in a single message: 5 minutes of reading instead of an hour of digging

Task Manager:

  • Keeps a task list in Notion or Google Docs
  • Reminds you about deadlines
  • Automatically closes tasks when it sees confirmation in email

System architecture

🎨 Picture this: a restaurant kitchen with separate stations: hot, cold, pastry. Each station works on its own schedule, with its own equipment. The head chef (Trigger.dev) coordinates everyone. The guest (you) gets the finished dish and doesn't know about the stations.

Code
┌─────────────────────────────────────────────────┐
│              Executive Assistant                  │
├──────────────┬──────────────┬────────────────────┤
│ Email Monitor│ Meeting Prep │   Daily Brief       │
│              │              │                     │
│ Trigger:     │ Trigger:     │ Trigger:            │
│ every 30 min │ 1 hour before│ daily at 08:00      │
│              │ the meeting  │                     │
│ Tools:       │ Tools:       │ Tools:              │
│ Gmail MCP    │ Calendar MCP │ Gmail + Calendar    │
│              │ Research API │ Notion MCP          │
├──────────────┴──────────────┴────────────────────┤
│              Task Manager                         │
│ Trigger: manual or by an email trigger            │
│ Tools: Notion MCP                                 │
├─────────────────────────────────────────────────┤
│           Notifications Layer                     │
│           Telegram Bot                            │
└─────────────────────────────────────────────────┘

Each block is a separate workflow on Trigger.dev. They don't get in each other's way and can run in parallel.


Ready-made routes: a schedule without your own server

Before writing workflows from scratch, look at what Claude's ready-made tools can already do (as of October 2026; for the latest, see What's current):

  • Routines in Claude Code: tasks in the cloud that run on a schedule, on an API call or on GitHub events; they work while your computer is off. You create them with /schedule or at claude.ai/code/routines. Available on paid plans, in research preview.
  • Scheduled tasks in the desktop app: they run on your computer with access to local files.
  • /loop: repeats a prompt inside an open session.
  • Claude Cowork: a mode for knowledge work (not code). It can run tasks on a schedule (daily, weekly, monthly), for example morning briefings and summaries.
  • Connectors to Gmail, Google Calendar, Google Drive and other services plug in as MCP.

You need your own workflow on Trigger.dev when you need full control: your own server, your own integrations, non-standard logic. More about schedules: Loop and scheduled tasks.


Integrations and MCPs

Gmail through MCP:

Instead of working with the Gmail API directly (which requires setting up OAuth), you use an MCP that has already implemented it:

javascript
// In a workflow on Trigger.dev:
const emails = await gmail.listMessages({
  query: "is:unread after:" + yesterday,
  maxResults: 50
});

Google Calendar through MCP:

javascript
const meetings = await calendar.listEvents({
  timeMin: new Date().toISOString(),
  timeMax: endOfDay.toISOString(),
});

Notion through MCP:

javascript
// Create a task:
await notion.createPage({
  parent: { database_id: TASKS_DB_ID },
  properties: {
    Name: { title: [{ text: { content: taskName } }] },
    Status: { select: { name: "Todo" } },
    Due: { date: { start: dueDate } }
  }
});

Telegram for notifications (one option; Slack and email have similar APIs):

javascript
await fetch(`https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, {
  method: "POST",
  body: JSON.stringify({
    chat_id: CHAT_ID,
    text: briefText,
    parse_mode: "Markdown"
  })
});

Daily Brief: the detailed architecture

🎨 Picture this: an aide who puts a single page on the general's desk every morning: "Here are three fires, here are today's meetings, here are three tasks." The general drinks his coffee and is already up to speed, without an hour of wading through reports. The Daily Brief is that page.

It's the easiest workflow to understand and a good entry point for practice.

javascript
// src/trigger/daily-brief.ts (tasks live in the /trigger folder)
import { schedules } from "@trigger.dev/sdk";

export const dailyBrief = schedules.task({
  id: "daily-brief",
  cron: {
    pattern: "0 8 * * 1-5",  // Mon-Fri at 08:00
    timezone: "America/Toronto"  // set your own time zone (by default cron runs on UTC)
  },
  
  run: async (payload, { ctx }) => {
    
    // 1. Collect data in parallel
    const [emails, meetings, tasks] = await Promise.all([
      getUnreadEmails({ since: "24h", maxCount: 20 }),
      getTodayMeetings(),
      getOpenTasks({ priority: "high" })
    ]);
    
    // 2. Hand it to the agent for analysis
    const result = await generateText({
      model: anthropic("claude-sonnet-5-5"),  // Sonnet 5.5 as of October 2026; current model IDs: What's current
      prompt: `
        You are a personal assistant. Create a short Daily Brief.
        
        INCOMING EMAILS (${emails.length}):
        ${emails.map(e => `- From: ${e.from}, Subject: ${e.subject}`).join('\n')}
        
        MEETINGS TODAY:
        ${meetings.map(m => `- ${m.time}: ${m.title} with ${m.attendees}`).join('\n')}
        
        OPEN TASKS (high priority):
        ${tasks.map(t => `- ${t.name} (deadline: ${t.due})`).join('\n')}
        
        Format: 
        1. 🔴 Urgent (needs attention today)
        2. 📅 Today's meetings
        3. ✅ Focus tasks
        200 words max.
      `
    });
    
    // 3. Send to Telegram
    await sendTelegram(result.text);
    
    return { sent: true, timestamp: new Date().toISOString() };
  }
});

Assistant security

🎨 Picture this: a notary with a limited power of attorney: they can read documents and certify standard ones, but they can't sell your house or withdraw money from your account. You give exactly the permissions the task needs, no more.

The assistant has access to personal data: emails, meetings, tasks. That calls for special care:

  1. Minimal permissions: the Gmail MCP with "read" permission only, not "full access," if the assistant shouldn't send emails
  2. An isolated bot: a separate bot just for this assistant, not the one you use for something else
  3. Logs: record what the agent did, in case something goes wrong
  4. PII filtering: before sending data to the LLM, make sure it doesn't contain clients' ID numbers or bank details
  5. Test on sandbox data: run it the first time on a test mailbox
  6. Emails are untrusted text: an incoming email can hide an instruction for the assistant (prompt injection). Don't let the assistant send emails or delete data without your confirmation. More: defending against prompt injection

Practice

Assignment: Build a Daily Brief workflow

  1. Set up the project:

    bash
    mkdir executive-assistant && cd executive-assistant
    npx trigger.dev@latest init
  2. Build a basic Daily Brief without real integrations (use mock data):

    javascript
    // src/trigger/daily-brief.ts
    const mockEmails = [
      { from: "[email protected]", subject: "Question about the project" },
      { from: "[email protected]", subject: "Status update" }
    ];
    const mockMeetings = [
      { time: "10:00", title: "Team call", attendees: "3 people" }
    ];
  3. Write the prompt for the Daily Brief: use the template from this lesson

  4. Run it locally:

    bash
    npx trigger.dev@latest dev
  5. Trigger the workflow manually from the Trigger.dev dashboard and look at the result in the logs

  6. Bonus: Connect a real bot (for Telegram, create one through @BotFather; or use a Slack webhook) and get your first Daily Brief in your messenger


Template: a Daily Routine prompt for the Executive Assistant

Use this prompt as the basis for a daily assistant. Adapt it to your own tasks:

Type this into the chat
You are my personal Executive Assistant. Every morning you prepare a Daily Brief.

PROCESS:
1. Check unread emails from the last 12 hours
2. Read today's calendar
3. Check open high-priority tasks

DAILY BRIEF FORMAT:

🔴 URGENT (needs a reply before 12:00):
- [list of urgent emails/tasks with context]

📅 MEETINGS TODAY:
- [time] — [title] — [who's attending] — [what it's about (1 line)]

✅ FOCUS FOR TODAY (top 3 tasks):
1. [task] — [why it matters] — [deadline]
2. ...
3. ...

📬 OTHER EMAILS (can wait until after lunch):
- [short summary of each]

💡 RECOMMENDATION:
[One tip based on the schedule: "You have 3 back-to-back meetings from 2 to 5 PM —
block 1:30-2:00 for prep"]

250 words max. No filler. Only actionable information.

Tools and resources

  • Trigger.dev: a platform for workflows and schedules
  • Gmail API: programmatic access to email — developers.google.com/gmail/api
  • Google Calendar API: programmatic access to your calendar — developers.google.com/calendar
  • Gmail MCP: email integration through MCP (simplifies OAuth)
  • Google Calendar MCP: calendar integration through MCP
  • Notion: a database for tasks and notes — notion.com
  • Notion MCP: Notion integration through MCP
  • @BotFather in Telegram: creates a Telegram bot for notifications (if you use Telegram)
  • Anthropic SDK: for AI text generation inside workflows

Key takeaways

The Executive Assistant isn't one agent. It's a system of four workflows that run independently and do different things. The Daily Brief is the best entry point: simple, useful right away, and a good way to explain to clients what AI automation is. Access to personal data = a greater responsibility for security. Minimal permissions, isolated tokens, logs.



What's next

→ Loop and scheduled tasks: when to use what

The mark stays in this browser only and is never sent anywhere. My progress