sending-emails
Skill12 starsChanged 2 months agoMITView on GitHub
Send emails via Gmail API using FastMCP server with approval workflows. Use when configuring email sending, troubleshooting email delivery, setting up email templates, or managing email rate limits. NOT when reading emails (use watching-gmail skill). NOT when categorizing emails (use watching-gmail skill).
- Reads credentials
In this repository60 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- browser-useSkill
- browsing-with-playwrightSkill
- building-chatgpt-appsSkill
- building-chat-interfacesSkill
- building-chat-widgetsSkill
- building-mcp-serversSkill
- building-nextjs-appsSkill
- building-rag-systemsSkill
- configuring-better-authSkill
- configuring-dapr-pubsubSkill
- containerizing-applicationsSkill
- context7-efficientSkill
- context-degradationSkill
- context-fundamentalsSkill
- context-optimizationSkill
- creating-skillsSkill
- deploying-cloud-k8sSkill
- deploying-kafka-k8sSkill
- deploying-postgres-k8sSkill
- designing-nextjs-uiSkill
- digital-fte-orchestratorSkill
- doc-coauthoringSkill
- docxSkill
- evaluationSkill
- fetching-library-docsSkill
- generating-ceo-briefingSkill
- installing-skill-trackerSkill
- internal-commsSkill
- managing-calendarSkill
- managing-odooSkill
- managing-servicesSkill
- memory-systemsSkill
- multi-agent-patternsSkill
- nextjs-devtoolsSkill
- nx-monorepoSkill
- operating-k8s-localSkill
- operating-production-servicesSkill
- pdfSkill
- posting-facebookSkill
- posting-instagramSkill
- posting-linkedinSkill
- posting-twitterSkill
- pptxSkill
- project-designerSkill
- researching-with-deepwikiSkill
- scaffolding-fastapi-daprSkill
- scaffolding-openai-agentsSkill
- skill-creatorSkill
- streaming-llm-responsesSkill
- styling-with-shadcnSkill
- systematic-debuggingSkill
- theme-factorySkill
- tool-designSkill
- watching-filesystemSkill
- watching-gmailSkill
- watching-whatsappSkill
- working-with-documentsSkill
- working-with-spreadsheetsSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use when configuring email sending, troubleshooting email delivery, setting up email templates, or managing email rate limits.
- Distinctive: line 7
NOT when reading emails (use watching-gmail skill).
- Distinctive: line 8
NOT when categorizing emails (use watching-gmail skill).
- Very specific: line 34
When FTE_ROLE=cloud, ALL emails are forced to approval workflow regardless of requires_approval flag:
- Very specific: line 52
When using send_from_template, variables MUST include subject:
- Distinctive: line 62
When audit log read fails, rate limiting blocks (fail-safe):
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Email Sender MCP Skill
FastMCP server for sending emails via Gmail API.
Quick Start
# Start MCP server
python src/mcp_servers/email_sender.py
# Or via scripts
python scripts/run.pyMCP Tools
send_email(to, subject, body, cc, bcc, requires_approval)- Send or queue emailsend_from_template(template_name, to, variables, requires_approval)- Template-based sendarchive_email(message_id)- Archive sent email
Production Gotchas ⚠️
Cloud Mode Forces Approval
When FTE_ROLE=cloud, ALL emails are forced to approval workflow regardless of requires_approval flag:
if role == "cloud":
requires_approval = True # Always enforcedRecipient Limit (FR-003)
Maximum 5 total recipients (to + cc + bcc combined). Exceeding returns error:
Error: Recipient limit exceeded. Max 5 allowed, got {count}.Separate Token Files
Sending requires different token than reading:
token_email.json- For sending (gmail.send scope)token.json- For reading (gmail.readonly scope)
Template Subject Required
When using send_from_template, variables MUST include subject:
# ✗ FAILS
send_from_template("welcome.j2", "user@example.com", {"name": "John"})
# ✓ WORKS
send_from_template("welcome.j2", "user@example.com", {"name": "John", "subject": "Welcome!"})Rate Limit Fail-Safe
When audit log read fails, rate limiting blocks (fail-safe):
except Exception:
return False # Block on error, not allowRate Limits
| Limit | Value |
| Hourly | 10 emails |
| Daily | 100 emails |
Tracked via Vault/Logs/email_audit_log.md.
Approval Workflow
Set requires_approval=True to queue email for human review.
Approval files created in Vault/Pending_Approval/:
- Move to
Vault/Approved/to send - Delete to reject
Configuration
Required in config/:
credentials.json- Google OAuth credentialstoken_email.json- Gmail send token (separate from read)
Templates directory: src/templates/email/
Environment Variables
FTE_ROLE=local|cloud # cloud forces approval for all sendsVerification
Run: python scripts/verify.py
Related Skills
watching-gmail- Read and categorize incoming emailsdigital-fte-orchestrator- Approval workflow 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.

