Identifies bulk email categories such as promotions, social, and forums from Gmail labels. Reuse when filtering or processing email messages to detect automated or promotional content.
// Source: https://github.com/garrytan/gbrain | License: MIT | Copyright 2026 Garry Tan // Provided via justclaw.it.com; keep this notice with the code. /** * gmail-categories — the Gmail category labels both open-loop lanes treat as * bulk by construction (#5103). The deterministic detector (loop-detect.ts) * and the extraction eligibility gate (loops-extract.ts) import this one * list, so the rule lives once: a thread under one of these categories opens * nothing unless the account owner wrote a substantive message in it. * `CATEGORY_UPDATES` is deliberately absent: invoices, contracts and document * requests land there and carry real obligations. */ export const BULK_CATEGORY_LABELS: readonly string[] = ['CATEGORY_PROMOTIONS', 'CATEGORY_SOCIAL', 'CATEGORY_FORUMS']; /** Whether ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key