DEV Community

Qasim Muhammad
Qasim Muhammad

Posted on

nylas contacts groups list for Developers — Quick Reference

Contact management from the CLI is useful for CRM automation, scripts, and quick lookups.

The nylas contacts groups list command displays all contact groups (Google) or categories (Outlook) in your address book. Each entry shows the group name, ID, and member count.

Syntax

nylas contacts groups list [--json]
Enter fullscreen mode Exit fullscreen mode

How It Works

Contact data spans multiple providers and formats. Google Contacts uses its own People API, Outlook uses Microsoft Graph, and Exchange uses EWS. The CLI gives you a single interface across all of them.

Examples

List all contact groups:

nylas contacts groups list
Enter fullscreen mode Exit fullscreen mode

Count contacts per group as JSON:

nylas contacts groups list --json | jq '.[] | {name, member_count}'
Enter fullscreen mode Exit fullscreen mode

Key Flags

Run nylas contacts groups list --help to see all available flags. Add --json for machine-readable output — useful when piping into jq or feeding data to scripts.

nylas contacts groups list --help
Enter fullscreen mode Exit fullscreen mode

Common Issues

No groups returned
Not all providers support contact groups. Google Contacts and Outlook People do; some IMAP providers don't expose groups via API.

Group member count shows 0
Member counts are fetched separately on some providers. Try nylas contacts list --json to see group assignments on individual contacts.


Full docs: nylas contacts groups list reference — all flags, advanced examples, and troubleshooting.

All commands: Nylas CLI Command Reference

Get started: brew install nylas/nylas-cli/nylasother install methods

Top comments (0)