Command

nylas email ai analyze

Analyze recent emails with AI for a summary, categorization, and action items.

Written by Qasim Muhammad Staff SRE

What does nylas email ai analyze do?

The nylas email ai analyze command fetches your recent emails and uses an AI model to produce an inbox summary, categorize messages, and surface the action items and highlights that need attention. Choose the model with --provider (ollama, claude, openai, groq), limit how many messages with --limit, target a folder with --folder, or analyze only unread mail with --unread.

Usage

nylas email ai analyze [grant-id] [--provider NAME] [--limit N]

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--folderFolder to analyze (default: INBOX)
--provider(-p)AI provider to use (ollama, claude, openai, groq)
--unreadOnly analyze unread emails

Examples

The nylas email ai analyze command fetches your recent emails and uses an AI model to produce an inbox summary, categorize messages, and surface the action items and highlights that need attention.

Analyze your recent inbox

nylas email ai analyze

Analyze the last 25 emails with a specific provider

nylas email ai analyze --limit 25 --provider claude

Analyze only unread mail

nylas email ai analyze --unread

Example output

Inbox summary (10 messages)

Summary: Mostly project threads plus two newsletters.
Categories: Work (7), Newsletters (2), Personal (1)
Action items:
  - Reply to Alice Chen about Q3 planning
  - Approve Bob's invoice #482

Troubleshooting

AI analysis returns empty or generic results

Make sure the selected --provider is configured and reachable. For local models, confirm Ollama is running; for hosted models, confirm the relevant API key is set.

No emails analyzed

The command analyzes recent messages in the target folder. Widen the scope with --limit, drop --unread, or pick a different --folder.

Recommended guides

Run nylas email ai analyze --help for full help output.