You are helping me build the following AI agent workflow. ## Goal Email Summarization And Response Approval: Monitors your inbox to summarize incoming emails and drafts professional replies for human approval before sending. ## Specification - What it does: Stay on top of your inbox while this agent summarizes incoming emails and drafts professional replies for your approval. You simply review the suggested responses in Gmail to approve them or make quick edits before they are sent. - Trigger: Triggered by an event (Event ยท on new email via IMAP) - Autonomy: You approve along the way - Expected setup effort: about an afternoon - Tools/services involved: - Gmail: Reading incoming emails and sending replies - OpenAI Chat Model: Summarizing email content and drafting responses - Qdrant Vector Store: Storing embeddings for retrieval-augmented generation - AI Agent: Orchestrating the RAG workflow and classification ## Known pitfalls, handle each one explicitly in your implementation 1. IMAP connections can drop unexpectedly so implement a robust reconnection logic with exponential backoff. 2. Vector retrieval might return irrelevant context if embeddings are not chunked properly, so add metadata filtering for date ranges. 3. Human approval delays can cause stale responses, so include a timestamp check before final sending. ## Reference implementation https://n8n.io/workflows/2862 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/automated-email-summarization-and-response-approval/ via usecasesforagents.com