gmail-integration
Use when sending, reading, or labeling emails via Gmail ג€” drafts, threads, attachments, label-based CRM routing. Covers the Gmail MCP server and any email-based agent flow.
SKILL.md.claude/skills/gmail-integration/SKILL.md
GitHubGmail Integration skill
When to invoke
- Touching
src/integrations/gmail/orsrc/tools/send-email.ts - Customer-facing email reply flow (Customer Service agent)
- Lead intake from email source
- Document attachments arriving by email ג†’ routing to classification
Available MCP tools
create_draft, list_drafts, search_threads, get_thread, label_thread, label_message, unlabel_*, create_label, update_label, delete_label, list_labels.
Note: there is no direct send ג€” always create draft then have a human/approval flow send it, OR send via our own Gmail client wrapper (src/integrations/gmail/client.ts).
Hard rules
- Customer-facing body must be in Hebrew (RTL, professional warm tone)
- Subject line in Hebrew for Israeli clients; English only for vendor/internal
- Never auto-send financial advice ג€” create draft, escalate to advisor
- Always log outgoing mail to CRM as activity
- Preserve thread context ג€” always reply via
get_threadfirst, never start a new thread for an existing conversation - Attachments: scan and classify (
classify_document) before storing in Drive
Label conventions
Lead/Newג€” incoming lead, before triageLead/Qualifiedג€” sales agent picked upCustomer/Activeג€” existing customer threadAction/Awaiting-Docsג€” referent agent waiting on customerCompliance/Holdג€” escalated, do not auto-respond
Templates location
Hebrew email templates live in src/agents/customer-service/templates/email/. Always reuse ג€” do not generate from scratch on every send.
Error handling
Gmail API failure ג†’ retry once with exponential backoff ג†’ fall back to WhatsApp if customer has opted in ג†’ escalate to human if both fail.