Case Study
Secure Multi-Account Gmail Search
OAuth-backed, account-aware search across approved Gmail inboxes. Query translation, permission-safe summaries, and read-only defaults with no mailbox mutations without explicit approval.
Permission flow map
One search lane, scoped account access
Slack query
Hermes profile
OAuth account map
Gmail search
Source-linked results
System Summary
Built a private Slack search tool that lets approved staff find source-linked results across two Gmail accounts without switching inboxes or exposing unrelated messages.
Business Problem
Searching across multiple Gmail accounts meant switching logins, losing context, and risking exposure of unrelated messages or accidental mailbox changes.
What Czar Studios Built
Dedicated Hermes profile with a profile-local email-fetcher skill, mutable account map, explicit account selection, natural-language query translation, and metadata-first read-only defaults.
Architecture and Data Flow
Account selection is resolved at the Composio executor level using safe aliases rather than untrusted natural-language tool inputs. Queries are translated into Gmail-compatible sender, recipient, subject, date, label, and attachment filters. Results include the searched account label and a native or constructed Gmail source link.
Integrations
Slack, Hermes, Composio, Gmail, and OAuth account connections.
Permissions, Guardrails, and Human Review
Layered access includes private channel membership, approved user IDs, channel allowlists, and a channel-specific behavior prompt. Metadata-first, read-only defaults exclude spam/trash, avoid message bodies and attachment downloads, and prohibit send/reply/archive/delete/label/forward/mark mutations without explicit approval.
Testing and Verification
Verified account/tool discovery, unauthorized-user refusal, query-plan checks, gateway restart/readback, and a redacted read-only smoke test without exposing mailbox content.
Practical Outcome
Approved staff can search across inboxes from a single Slack lane with source-linked results and built-in permission boundaries, reducing search time and privacy mistakes.
Privacy-Safe Proof Notes
Architecture and permission-flow diagrams only; no mailbox aliases, message content, or account credentials are exposed.