Library / AI Agents & Assistants
AI Agents & Assistants
Draft client-approved email replies with OpenAI, Data Table and SMTP
Runs on a webhook request: an AI agent drafts a reply in the client's voice and emails it to the client approver, who must approve before SMTP sends it.
What it does
## Draft replies with an AI agent and send them after client approval For agencies that answer customer messages for paying clients and need the client's explicit yes before a reply goes out. The approver needs no n8n account. ### How it works 1. Your helpdesk, form or another workflow POSTs client_id, task, recipient_email and subject to New draft request. 2. The client's approver, instructions and deadline come from the approval_clients Data table. 3. The AI Agent drafts the reply in the client's voice. 4. The approver gets the draft by email with a personal link to a form: approve, edit and approve, request changes, or reject. 5. Request changes sends the comment back to the agent for a new version, up to max_rounds. 6. Only approved text is sent. Rejected, expired and failed requests are never sent, and you get an email instead. 7. Each request is one row in approval_requests: status, decision, who it went to, when, and SHA-256 fingerprints of the approved text and of the text actually sent. A reminder goes out before the deadline. A daily digest and a GET endpoint list what is still waiting. ### Setup steps 1. Create the two Data tables in the note below and add one client row. 2. Credentials: OpenAI on Chat model, SMTP on the five email nodes, Header Auth on both webhooks. 3. Fill in Settings and Digest settings. 4. Publish the workflow. The form links only work while it is published. 5. Send the test request from the Try it note.
The steps
- New draft request
- Settings
- Validate request
- Valid request?
- Reject: bad request
- Look up client
- Reject: client table unavailable
- Check client
- Client can use this?
- Reject: unknown or inactive client
- Create request row
- Reject: request log unavailable
- Accept request
- Build the prompt
51 steps in total.
Similar automations
Data Sync & ETLSync approved Google Sheets menu items with OrbitPage native menus34 stepsLead Generation & EnrichmentDraft replies to portal enquiries with OpenAI, Gmail and Google Sheets9 stepsAI Agents & AssistantsSend and track human-approved faxes with Fax for Agents19 stepsEmail AutomationMultilingual Gmail Draft Replies with GPT-4o11 steps