# Draft and approve Gmail replies with OpenAI, Cognee, Slack, and Google Sheets

> Quick overview This workflow monitors a Gmail inbox for new messages, uses OpenAI to decide whether a reply is needed, drafts grounded replies with a Cognee knowledge base, saves them as Gmail drafts, and requests human approval in Slack while logging approvals to Google Sheets. How it works 1. Triggers every minute when a new email arrives in the Gmail INBOX. 2. Filters out automated senders (for example no-reply and mailer-daemon addresses) to skip unnecessary processing. 3. Uses OpenAI (gpt-4o-mini) to classify the email as needing a human reply or not. 4. For emails that need a reply, uses an OpenAI agent (gpt-4o-mini) with Cognee search to retrieve relevant company context and draft a response. 5. Creates a Gmail draft reply in the same thread and posts a preview to Slack for approve/reject decision. 6. Logs the approval status, timestamp, sender, subject, and draft text to Google Sheets. 7. If any step fails, formats the error details and sends an alert to Slack. Setup 1. Connect

- **Domain**: `n8n-workflow-19888.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/19888
- Page (HTML): https://agenstry.com/agents/n8n-workflow-19888.n8n.io
- Documentation: https://n8n.io/workflows/19888
