Gmail Response Template Manager
Creates, stores, and applies reusable email response templates. Analyzes your common replies to build a template library, then auto-fills templates for quick Gmail draft creation. Prerequisites: gcloud, curl, jq, base64.
MCP get_skill({ skillId: "gmail-response-template-manager-aff95a62" })Use this skill with your agent
Create a free account and connect via MCP
# Gmail Response Template Manager
Build a library of reusable email templates from your common reply patterns, then instantly create Gmail drafts from templates with smart variable substitution.
## When to Use
- "Create a template for client onboarding emails"
- "I keep writing the same reply to job applicants — make it a template"
- "Use my 'project update' template for the Acme team"
- "Analyze my sent emails and suggest templates I should create"
## Requirements
- **Google Cloud CLI** (`gcloud`) authenticated with Gmail API
- OAuth2 scopes: `gmail.readonly`, `gmail.compose`
- `jq` for JSON parsing
- Workspace folder for template storage: `templates/email/`
## Workflow
### Step 1 — Analyze Sent Mail for Patterns (Auto-Detect Mode)
When user says "suggest templates":
```bash
ACCESS_TOKEN=$(gcloud auth print-access-token)
# Fetch last 50 sent emails
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/messages?q=in:sent&maxResults=50" | \
jq -r '.messages[].id' > /tmp/sent_ids.txt
# Extract subjects and snippets
while read MSG_ID; do
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/messages/$MSG_ID?format=metadata&metadataHeaders=Subject" | \
jq '{subject: (.payload.headers[] | select(.name=="Subject") | .value), snippet: .snippet}'
done < /tmp/sent_ids.txt
```
Group similar emails by subject/content patterns and suggest templates.
### Step 2 — Create Template File
Store templates as markdown with variable placeholders:
```bash
mkdir -p templates/email
cat > templates/email/client-onboarding.md << 'EOF'
---
name: Client Onboarding
subject: "Welcome aboard, {{CLIENT_NAME}}! Next steps for {{PROJECT_NAME}}"
variables:
- CLIENT_NAME: "Client's first name"
- PROJECT_NAME: "Name of the project"
- START_DATE: "Project kick-off date"
- ONBOARDING_DOC_LINK: "Link to onboarding document"
---
Hi {{CLIENT_NAME}},
Great to have you on board! Here's what happens next:
1. **Kick-off call** — scheduled for {{START_DATE}}
2. **Onboarding doc** — please review: {{ONBOARDING_DOC_LINK}}
3. **Slack channel** — I'll send you an invite separately
Let me know if you have any questions before we start.
Best,
{{SENDER_NAME}}
EOF
```
### Step 3 — Use a Template
When user says "use template X for Y":
1. Read the template file from `templates/email/`
2. Ask user for each variable value
3. Substitute variables into template
4. Show completed email for review
### Step 4 — Create Gmail Draft from Template
```bash
ACCESS_TOKEN=$(gcloud auth print-access-token)
# Substituted email content
ENCODED=$(echo -n "From: me\nTo: {RECIPIENT}\nSubject: {FILLED_SUBJECT}\nContent-Type: text/plain; charset=utf-8\n\n{FILLED_BODY}" | base64 -w 0 | tr '+/' '-_' | tr -d '=')
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"message\": {\"raw\": \"$ENCODED\"}}" \
"https://gmail.googleapis.com/gmail/v1/users/me/drafts"
```
### Step 5 — List Available Templates
When user says "show my templates":
```bash
for f in templates/email/*.md; do
echo "---"
head -10 "$f" | grep -E '^(name|subject):'
done
```
## Template Variables
Built-in variables auto-filled without asking:
- `{{SENDER_NAME}}` — from Gmail profile
- `{{TODAY}}` — current date
- `{{TOMORROW}}` — tomorrow's date
## Important Rules
- Never send — only create drafts
- Always show filled template before creating draft
- Store templates in workspace, not in Gmail
- Back up templates in git for version control
## Example Prompts
- "Create a template for project status update emails"
- "Show my email templates"
- "Use the onboarding template for Sarah at TechCorp"
- "Analyze my sent emails and suggest templates"Related Skills
More skills in Email & Communication
Gmail Cold Outreach Campaign
Research prospects via Brave Search, compose personalized cold outreach emails, and create ready-to-send Gmail drafts with A/B subject line variants. Prerequisites: gcloud, curl, jq, base64, brave-search MCP.
Gmail Email Drafter
Draft and send emails via Gmail using Google CLI. Analyzes your sent mail for tone matching, composes context-aware drafts, and creates Gmail drafts ready to send. Prerequisites: gcloud, curl, jq, base64.
Gmail Follow-Up Tracker
Scans your Gmail sent folder for unanswered emails, identifies stale threads, and creates follow-up drafts with context-aware nudges via Google CLI. Prerequisites: gcloud, curl, jq.
Gmail Inbox Daily Summary
Fetches today's unread Gmail messages via Google CLI, categorizes them by priority, and generates an actionable daily email briefing. Prerequisites: gcloud, curl, jq.
Gmail Label & Filter Organizer
Analyzes your Gmail inbox, creates label taxonomy, and sets up filters to auto-sort incoming mail using Gmail API via Google CLI. Prerequisites: gcloud, curl, jq.
Meeting Notes to Gmail Summary
Converts meeting notes or transcripts into structured summary emails and creates Gmail drafts addressed to all attendees. Prerequisites: gcloud, curl, jq, base64.
Explore Other Categories
Skills from other categories with shared topics
Contract Template
>
Template Engine
Auto-fill document templates with data - mail merge for any format
Academic Search
Search and analyze academic literature. Find papers, understand research methodologies, and synthesize academic findings for research projects.