send-email
Skill1 starsChanged 52 days agoMITView on GitHub
Send emails via Gmail API with approval workflow and audit logging. Smart approval logic determines if emails need human review based on recipient, content, and attachments. Use when you need to send emails programmatically, automate email responses, or integrate email sending into workflows. Supports attachments and templates.
- Reads credentials
28 other projects use a version of this.
Adopted by
Most recently taken up by
- brennantim/claude-skillstheir own version, first seen Nov 16, 2026
- MoizIbnYousaf/marketing-clitheir own version, first seen Nov 1, 2026
- freejam099-alt/Edge-Aitheir own version, first seen Oct 25, 2026
- aaronjmars/miroshark-aeontheir own version, first seen Oct 21, 2026
- aeonfun/aeontheir own version, first seen Oct 20, 2026
- jeffliu05042/send-email-skilltheir own version, first seen Oct 20, 2026
Used with
Projects with it also use aeon-update, auto-workflow and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
aaronjmarsSkillaeon-update
Pull framework updates from the upstream Aeon repo into this instance - 3-way merges canon's new commits into a PR, never clobbering operator config.
Also in 4 projects that use this
aaronjmarsSkillauto-workflow
Two-mode aeon.yml workflow builder - analyze inspects URLs and emits a tiered, signal-verified skill-enablement plan plus an aeon.yml diff; enable flips slugs to enabled:true and opens a PR.
Also in 4 projects that use this
- +10 more from aaronjmars
Other versions28 projects use a version of this.
Word for word · 1
- muhammad-anas35/AI-Employee-Gold-tier★ 1100% same
Edited · 0
None found.
Wrote their own version · 27
- google-ai-edge/gallery★ 25ksame name
- floatpane/matcha★ 1.2ksame name
- jegly/Box★ 1ksame name
- aaronjmars/aeon★ 794same name
- aeonfun/aeon★ 793same name
- microsoft/vscode-java-pack★ 357same name
- refly-ai/refly-skills★ 204same name
- jonathanmalkin/jules★ 65same name
- MoizIbnYousaf/marketing-cli★ 33same name
- aaronjmars/miroshark-aeon★ 20same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- odoo-integrationSkill
- browsing-with-playwrightSkill
- gmail-watcherSkill
- process-vault-tasksSkill
- facebook-posterSkill
- linkedin-posterSkill
- update-dashboardSkill
- whatsapp-watcherSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 22 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Requests approval: if needed via /Pending_Approval/
- Distinctive: line 238
Every email logged with:
- Distinctive: line 290
Check Gmail API quotas
- Distinctive: line 291
Wait 24 hours for reset
- Distinctive: line 297
Check Gmail API logs
- Distinctive: line 301
Verify SPF/DKIM records
- Distinctive: line 302
Avoid spam trigger words
- Distinctive: line 303
Don't send too many at once
“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Send Email
Send emails via Gmail API with approval workflow and audit logging.
Overview
This skill enables Claude to send emails through Gmail API with human-in-the-loop approval for sensitive communications. All emails are logged and tracked for audit purposes.
Usage
# Send email with approval
claude /send-email --to "client@example.com" --subject "Invoice" --body "Please find attached..."
# Send to known contact (may auto-approve based on rules)
claude /send-email --to "known@client.com" --subject "Follow-up" --body "..."
# Send with attachment
claude /send-email --to "client@example.com" --subject "Report" --body "..." --attach "report.pdf"What It Does
- Creates email draft in
/Plans/EMAIL_*.md - Checks approval rules from Company_Handbook.md
- Requests approval if needed via
/Pending_Approval/ - Sends email via Gmail API after approval
- Logs transaction to
/Logs/and moves to/Done/
Prerequisites
Gmail API Setup
Same as Gmail Watcher:
- Enable Gmail API in Google Cloud Console
- Create OAuth2 credentials
- Download
credentials.json - Authenticate on first run
Required Scopes
SCOPES = [
'https://www.googleapis.com/auth/gmail.readonly',
'https://www.googleapis.com/auth/gmail.send',
'https://www.googleapis.com/auth/gmail.compose'
]Configuration
Environment Variables
# .env file
GMAIL_CREDENTIALS_PATH=./credentials.json
GMAIL_TOKEN_PATH=./token.json
VAULT_PATH=./AI_Employee_VaultApproval Rules
From Company_Handbook.md:
Auto-approve:
- Replies to known contacts
- Follow-up emails
- Routine communications
Always require approval:
- New contacts
- Bulk emails (>5 recipients)
- Emails with attachments
- Sensitive content
Email Draft Format
Pending Approval
---
type: email_send
to: client@example.com
subject: Invoice #2026-001
status: pending_approval
created: 2026-03-12T20:30:00Z
priority: medium
---
# Email Send Request
## Email Details
- **To:** client@example.com
- **Subject:** Invoice #2026-001
- **Attachments:** invoice_2026_001.pdf
## Email Body
Dear Client,
Please find attached your invoice for March 2026.
Payment is due within 30 days.
Best regards,
Your Company
## Approval Required
This email is to a known contact but includes an attachment.
**To Approve:** Move to `/Approved/`
**To Reject:** Move to `/Rejected/`
## Notes
Add any modifications or notes here.Workflow
Email Request → Draft Created → Check Rules
↓
Known Contact? → Auto-send
↓
New/Sensitive? → /Pending_Approval/
↓
Human Reviews
↓
Moves to /Approved/
↓
Gmail API sends
↓
Logs & moves to /Done/Features
Smart Approval Logic
def requires_approval(to_email, subject, body, attachments):
"""Determine if email needs approval"""
# Check if known contact
if is_known_contact(to_email):
# Known contact with no attachment = auto-approve
if not attachments:
return False
# New contact always requires approval
if not is_known_contact(to_email):
return True
# Bulk email requires approval
if ',' in to_email or ';' in to_email:
return True
# Sensitive keywords require approval
sensitive_keywords = ['payment', 'invoice', 'contract', 'legal']
if any(kw in subject.lower() or kw in body.lower() for kw in sensitive_keywords):
return True
return FalseKnown Contacts Database
Maintained in AI_Employee_Vault/known_contacts.json:
{
"contacts": [
{
"email": "client@example.com",
"name": "Client Name",
"added": "2026-03-01",
"last_contact": "2026-03-12",
"auto_approve": true
}
]
}Email Templates
# templates/invoice_email.md
---
type: email_template
category: invoice
---
Dear {{client_name}},
Please find attached your invoice #{{invoice_number}} for {{month}} {{year}}.
Amount due: ${{amount}}
Due date: {{due_date}}
Thank you for your business!
Best regards,
{{company_name}}Attachment Handling
# Attach file from vault
claude /send-email \
--to "client@example.com" \
--subject "Invoice" \
--template "invoice_email" \
--attach "AI_Employee_Vault/Accounting/invoice_001.pdf"Security
Credential Management
- OAuth2 tokens stored locally
- Automatic token refresh
- Never commit credentials
- Scoped permissions (send only)
Audit Trail
Every email logged with:
- Timestamp
- Recipient(s)
- Subject
- Approval status
- Send result
- Message ID
Rate Limiting
- Gmail API: 100 emails/day (free tier)
- 500 emails/day (workspace)
- Automatic backoff on limits
Spam Prevention
- Max 10 emails per hour
- Max 5 recipients per email
- Cooldown between bulk sends
- Blacklist for bounced addresses
Monitoring
Check Status
# View pending emails
ls -lt AI_Employee_Vault/Pending_Approval/EMAIL_*.md
# View sent emails
ls -lt AI_Employee_Vault/Done/EMAIL_*.md
# Check send logs
cat AI_Employee_Vault/Logs/2026-03-12.json | jq '.[] | select(.action_type=="email_sent")'Email Metrics
Track in dashboard:
- Emails sent today
- Pending approvals
- Bounce rate
- Response rate
Troubleshooting
"Authentication failed"
# Delete token and re-authenticate
rm token.json
python scripts/send_email.py --auth"Quota exceeded"
- Check Gmail API quotas
- Wait 24 hours for reset
- Upgrade to workspace account
Email not sending
- Check approval status
- Verify recipient email
- Check Gmail API logs
- Verify internet connection
Emails going to spam
- Verify SPF/DKIM records
- Avoid spam trigger words
- Don't send too many at once
- Warm up new accounts
Advanced Usage
Bulk Email with Approval
# Create bulk email request
claude /send-email \
--to-list "clients.csv" \
--subject "Monthly Newsletter" \
--template "newsletter" \
--require-approvalEmail Scheduling
# Schedule email for later
claude /send-email \
--to "client@example.com" \
--subject "Follow-up" \
--body "..." \
--schedule "2026-03-13 09:00"Reply to Thread
# Reply to existing email
claude /send-email \
--reply-to "message_id_123" \
--body "Thank you for your email..."Email Tracking
# Track email opens (requires tracking pixel)
claude /send-email \
--to "client@example.com" \
--subject "Proposal" \
--body "..." \
--track-opensIntegration with Workflow
Auto-reply to Gmail Watcher
Gmail Watcher detects email → /Needs_Action/EMAIL_*.md
↓
Claude analyzes & drafts reply
↓
Creates /Plans/EMAIL_REPLY_*.md
↓
Requests approval
↓
Human approves
↓
Send Email skill sends reply
↓
Logs & marks original as donePerformance
- Latency: 1-3 seconds per email
- Memory: ~50MB
- Rate: 1 email per second (safe)
- Quota: 100/day (free), 500/day (workspace)
Dependencies
google-auth-oauthlib==1.2.0
google-auth-httplib2==0.2.0
google-api-python-client==2.116.0See Also
gmail_watcher.py- Receive emails/process-vault-tasks- Process email requestsCompany_Handbook.md- Email approval rulesorchestrator.py- Automated email processing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

