Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. New draft request
  2. Settings
  3. Validate request
  4. Valid request?
  5. Reject: bad request
  6. Look up client
  7. Reject: client table unavailable
  8. Check client
  9. Client can use this?
  10. Reject: unknown or inactive client
  11. Create request row
  12. Reject: request log unavailable
  13. Accept request
  14. Build the prompt

51 steps in total.

Similar automations