# Read Macos Outlook

> Search and read Outlook emails via AppleScript (macOS only). Requires Outlook to be running. Returns max ~1000 token summary.

- Skill: `jimweller/read-macos-outlook` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add jimweller/read-macos-outlook`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jimweller/read-macos-outlook/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jimweller (https://skillmd.com/u/jimweller)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jimweller/read-macos-outlook

---



# Read macOS Outlook

You help users search and read emails from Microsoft Outlook on macOS using AppleScript.

## Requirements

- **macOS only** - Uses AppleScript
- **Legacy Outlook required** - New Outlook does NOT support AppleScript
  - Switch to Legacy Outlook: Outlook menu > Legacy Outlook
  - Script will detect and error if New Outlook is active
- **Partial downloads** - Some emails may not have bodies downloaded locally

## CRITICAL: Smart Folder Selection

**DO NOT search all folders blindly.** Large mailboxes (40k+ messages) will be slow.

### Step 1: Always List Folders First

```bash
~/.dataops-assistant/bin/outlook-email.sh folders
```

This returns folder names, IDs, and message counts. Use this to make smart decisions.

### Step 2: Pick Folders Based on Query Type

| Query Type | Folders to Search |
|------------|-------------------|
| "emails I sent" / "my sent emails" | `Sent Items` only |
| "emails I received" / "inbox" | `Inbox` only |
| "emails from [person]" | `Inbox` (they sent to you) |
| "emails to [person]" | `Sent Items` (you sent to them) |
| "correspondence with [person]" | `Inbox,Sent Items` |
| "all emails about [topic]" | `Inbox,Sent Items` |
| "drafts" | `Drafts` only |
| "deleted emails" | `Deleted Items` only |
| "archived emails" | `Archive` (if exists) |

### Step 3: Use Folder IDs for Ambiguous Names

Multiple accounts may have folders with the same name (e.g., two "Inbox" folders).

When `folders` shows duplicates, use the **folder ID** instead of the name:
```bash
# Use ID to target specific folder
~/.dataops-assistant/bin/outlook-email.sh search --folder 117 --limit 20
```

Pick the folder with more messages (likely the active account).

## Workflow

1. **List folders** - Always start here to understand the mailbox structure
2. **Analyze query** - What is the user looking for? Sent? Received? Both?
3. **Select folders** - Pick 1-3 relevant folders based on query type
4. **Search with filters** - Use date, subject, sender filters to narrow results
5. **Read details** - Get full content of high-relevance emails
6. **Summarize** - Present findings focused on the user's context

## Commands

```bash
# ALWAYS START HERE - List all folders
~/.dataops-assistant/bin/outlook-email.sh folders

# Search specific folder(s)
~/.dataops-assistant/bin/outlook-email.sh search \
  --folder "Inbox" \
  --subject "term" \
  --sender "email@example.com" \
  --after "2025-01-01" \
  --before "2025-01-31" \
  --limit 20

# Search by folder ID (use when names are ambiguous)
~/.dataops-assistant/bin/outlook-email.sh search \
  --folder 117 \
  --limit 10

# Search multiple folders (comma-separated)
~/.dataops-assistant/bin/outlook-email.sh search \
  --folder "Inbox,Sent Items" \
  --after "2025-01-01"

# Get single email by ID
~/.dataops-assistant/bin/outlook-email.sh get <message_id>

# Get email thread by conversation ID
~/.dataops-assistant/bin/outlook-email.sh thread <conversation_id>
```

## Search Options

| Option | Description | Example |
|--------|-------------|---------|
| `--folder` | Folder name(s) or ID. **Required - always specify!** | `--folder "Inbox"` or `--folder 117` |
| `--subject` | Subject contains term | `--subject "deployment"` |
| `--sender` | Sender email contains | `--sender "azure"` |
| `--after` | Emails after date | `--after "2025-01-01"` |
| `--before` | Emails before date | `--before "2025-01-31"` |
| `--limit` | Max results (default: 50) | `--limit 10` |
| `--offset` | Skip first N results | `--offset 20` |

**Multiple folders**: Use comma-separated names: `--folder "Inbox,Sent Items"`

Omit unused options (don't include empty `--subject ""`).

## Search Response

```json
{
  "folders_searched": 2,
  "total_matches": 48,
  "returned": 10,
  "offset": 0,
  "results": [
    {
      "id": 12345,
      "subject": "Deployment Complete",
      "sender_email": "azure@microsoft.com",
      "sender_name": "Azure DevOps",
      "date": "2025-01-28",
      "folder": "Inbox",
      "folder_id": 113,
      "conversation_id": 789,
      "is_partial": false
    }
  ]
}
```

## Get Response

```json
{
  "id": 12345,
  "subject": "Deployment Complete",
  "sender_email": "azure@microsoft.com",
  "sender_name": "Azure DevOps",
  "date_sent": "2025-01-28T14:30",
  "date_received": "2025-01-28T14:31",
  "folder": "Inbox",
  "folder_id": 113,
  "conversation_id": 789,
  "is_read": true,
  "is_partial": false,
  "to": [{"name": "User", "email": "user@company.com"}],
  "cc": [],
  "content": "Email body text..."
}
```

## Handling Partial Downloads

If `is_partial: true`, the email body is not available locally. The user must open the email in Outlook first to download it.

Report partial status clearly:
```
CONTENT STATUS: Not downloaded (email must be opened in Outlook first)
```

Then provide what analysis you can from metadata (subject, sender, date, recipients).

## Output Format

```
SEARCH STRATEGY:
- Query: [what user asked for]
- Folders selected: [folder names and why]
- Filters applied: [date range, subject, sender]

RESULTS: [N] emails found in [folders]

EMAIL: [ID] - [Subject]
FROM: [Sender Name] <[email]>
DATE: [Date Sent]
FOLDER: [Folder name] (ID: [folder_id])

RELEVANT FINDINGS:
- [Finding relevant to research context]

KEY CONTENT:
- [Important details from email body]

RELEVANCE: [high|medium|low] - [explanation]
```

## Rules

- **ALWAYS list folders first** - Don't guess at folder names
- **Pick specific folders** - Don't search everything
- MAX ~1000 tokens output
- Focus on research context - extract what's RELEVANT
- If emails have minimal relevance, say so briefly
- Include RELEVANCE rating

## Example Session

User asks: "Find emails I sent about the deployment last week"

1. **List folders:**
   ```bash
   ~/.dataops-assistant/bin/outlook-email.sh folders
   ```
   -> See "Sent Items" (ID: 117, 46 messages) and "Sent Items" (ID: 3, 0 messages)

2. **Analyze:** User wants SENT emails -> search Sent Items only. Use ID 117 (has messages).

3. **Search:**
   ```bash
   ~/.dataops-assistant/bin/outlook-email.sh search \
     --folder 117 \
     --subject "deployment" \
     --after "2025-01-20" \
     --limit 20
   ```

4. **Summarize findings** focused on deployment topics.

