Skip to main content

Claude/ChatGPT Prompt to Build an Email Triage and Auto-Reply Agent

Build an email agent that classifies, drafts replies, schedules follow-ups, and creates tasks. Copy-ready architecture and prompts for any inbox.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
You are a senior AI automation engineer. Specify an email triage agent tightly enough to build; return code architecture and prompts, not pseudocode hand-waving.

Context:
- Email provider: Gmail via API
- Categories: urgent, question, FYI, spam
- Task system: Linear
- Reply tone: warm, concise, professional

Deliver:
1. Ingestion: poll or webhook from Gmail via API, parse, and deduplicate threads.
2. Classifier prompt that sorts each email into urgent, question, FYI, spam with a confidence score.
3. Reply drafting in warm, concise, professional that stays in a review queue, never auto-sends.
4. Follow-up scheduler that nudges ignored threads after a set interval.
5. Action-item extraction that creates tasks in Linear.
6. Guardrails: redact secrets, skip low-confidence sends, log every decision.

Return the code architecture, data flow, and every prompt template.

What this prompt does

This prompt has the model act as a senior AI automation engineer and specify an email triage and auto-reply agent tightly enough to build, returning code architecture and prompts rather than pseudocode hand-waving. You set the [provider], the triage [categories], the [task_system], and the [reply_tone], and it returns ingestion, a classifier, draft replies, a follow-up scheduler, action-item extraction, and guardrails.

The structure works because it keeps drafts in a human-review queue and never auto-sends. Ingestion polls or webhooks from [provider] and deduplicates threads; the classifier sorts each email into [categories] with a confidence score; reply drafting in [reply_tone] stays review-only; the follow-up scheduler nudges ignored threads; and action items become tasks in [task_system]. Guardrails redact secrets, skip low-confidence sends, and log every decision. The confidence score is what ties the pieces together: it lets the system route uncertain emails for closer review and avoid surfacing noisy, low-quality drafts that a human would just have to discard.

When to use it

  • You want to automate an inbox without risking the wrong reply going out.
  • You need emails classified into your own [categories] with confidence scores.
  • You want drafted replies held in a review queue, never auto-sent.
  • You need ignored threads nudged after a set interval.
  • You want action items turned into tasks in [task_system] automatically.
  • You need guardrails that redact secrets and log every decision.
  • You want one agent handling triage, drafting, follow-ups, and task creation together.

Example output

Expect the code architecture, the data flow, and every prompt template. That includes the ingestion path for [provider] with deduplication, the classifier prompt that scores emails into [categories], the [reply_tone] drafting prompt that stays in a review queue, the follow-up scheduler, the action-item extraction that creates tasks in [task_system], and the guardrail layer for redaction, low-confidence handling, and decision logging. Each prompt template is concrete enough to wire into your runtime rather than a placeholder, so you can adapt tone and categories without rebuilding the flow.

Pro tips

  • Lock reply drafting to review-only before anything else — an agent that auto-sends the wrong reply costs more trust than it saves time.
  • Define [categories] to match how you actually triage (e.g. urgent, question, FYI, spam) so the classifier's confidence scores mean something.
  • Set [provider] to your real access method (e.g. Gmail via API) so ingestion uses polling or webhooks correctly.
  • Tune [reply_tone] to your voice; a generic tone produces drafts you'll rewrite anyway.
  • Wire [task_system] to where work actually lives so extracted action items don't get lost.
  • Use the confidence score to skip low-confidence drafts rather than queuing noise for human review.

Frequently Asked Questions

Will this agent send emails on its own?
No. Reply drafting stays in a human-review queue and never auto-sends, by design. The author treats this as the rule they never break, since an auto-sent wrong reply costs more trust than the time it saves.
Can I define my own triage categories?
Yes. Set the `[categories]` variable, such as urgent, question, FYI, and spam, and the classifier sorts each email into them with a confidence score so you can route or filter based on certainty.
Which email providers does it support?
Whatever you put in `[provider]`, like Gmail via API. The ingestion deliverable handles polling or webhooks, parsing, and thread deduplication based on the access method you specify for that provider.
Does it create tasks from emails?
Yes. Action-item extraction identifies follow-ups and creates tasks in your `[task_system]`, such as Linear. Point this at where your work actually lives so extracted items don't get lost in a separate tool.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in AI Chatbot & Agent Building Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support