Scripts, cron jobs, and AI agents all need email access. nylas email mark-starred provides it without SMTP configuration.
The nylas email mark-starred command adds a star (Gmail) or flag (Outlook, Exchange) to a message. Use it to highlight important emails from scripts or AI agents.
Syntax
nylas email mark-starred --id MESSAGE_ID
Examples
Star a specific email:
nylas email mark-starred --id msg_abc123
Star all emails from a VIP sender:
nylas email list --from ceo@company.com --json | jq -r '.[].id' | xargs -I{} nylas email mark-starred --id {}
When to Use This
Reach for nylas email mark-starred when you need to process email in shell scripts, cron jobs, CI/CD pipelines, or AI agent tool calls. Combine with --json to pipe output into other tools.
How It Works
The Nylas CLI abstracts away the differences between Gmail's API, Microsoft Graph, Exchange Web Services, and raw IMAP. You write one command; it works across all providers. This matters for automation — your cron job or CI pipeline doesn't need provider-specific logic.
Related Commands
-
nylas email send— Send an email. Supports scheduling, GPG signing/encryption, and tracking -
nylas email list— List recent emails with optional filters -
nylas email read— Read a specific email. Supports decryption and signature verification -
nylas email search— Search emails by query and filters
Full docs: nylas email mark-starred reference — all flags, advanced examples, and troubleshooting.
All commands: Nylas CLI Command Reference
Get started: brew install nylas/nylas-cli/nylas — other install methods
Top comments (0)