See llms.txt for all machine-readable content.

Back to Templates

Send approved AI support replies with Slack, OpenAI and EVIDE

Quick overview

Collects customer support requests with an n8n form, drafts a reply with an OpenAI agent, and sends the email via SMTP only after an authorized person approves it in Slack. In Live mode, two linked EVIDE records document the proposal and the decision; Demo previews them.

How it works

  1. An n8n form collects the customer request: order reference, customer email, message and whether a refund is requested
  2. An OpenAI agent drafts the reply, a category and, if useful, a refund proposal. Refunds stay text: the workflow never pays anything.
  3. Deterministic rules check the recipient and the draft without the model, and SHA-256 fingerprints are taken of the agent output and of the draft.
  4. A separate review run prepares the EVIDE escalation record: deposited in Live mode, previewed in the execution data in Demo mode. An EVIDE error never blocks the review.
  5. The full draft is posted in Slack with Approve and send and Decline. Only listed Slack member IDs count; others get a private notice. No answer within the wait time closes the request.
  6. After an authorized approval and final checks, including the test recipient list, the email is sent via SMTP exactly as shown, at most once, with no automatic retry. The result is accepted by SMTP, not sent or unknown, never "delivered".
  7. The EVIDE outcome record (decision, fingerprint of the email content submitted for sending where applicable, and SMTP result) is deposited or previewed, linked to the escalation only if EVIDE confirmed it, and summarized in Slack.

Setup

  1. Create credentials for OpenAI, Slack API (Access Token plus the app's Signing Secret, not Managed OAuth) and SMTP, and select them in the OpenAI, Slack and Send Email nodes.
  2. On both EVIDE nodes select a Header Auth credential with header name X-API-Key. Demo: any placeholder value, because n8n does not publish while a node has no credential. Live: your EVIDE API key. Check that n8n did not pick an existing credential by itself.
  3. In your Slack app turn on Interactivity, set the Request URL to https://<your-n8n-host>/webhook-waiting-slack and invite the app to the approval channel
  4. Fill "Set up the template": slack_channel_id, authorized_approver_slack_ids, email_from and email_test_recipients, and keep email_test_mode on. For Live, also set evide_mode to live, evide_api_url and evide_dapi_number.
  5. Publish, open the form's production URL, send a synthetic request with a test recipient, then try Approve, Decline and no answer.

Requirements

  • OpenAI API key (gpt-5-mini by default, one agent call per request)
  • Slack workspace where you can install an app (chat:write scope)
  • SMTP account for the sender address
  • Each request uses two n8n executions
  • Live mode only: EVIDE account enabled for API access, with a DAPI number (two paid deposits per request, see app.certifywebcontent.com/pricing)

Customization

  • Edit the agent instructions, company name and refund currency in "Set up the template"
  • Add or change form fields
  • Change the approval wait time
  • Require a recorded EVIDE escalation before any email is sent (require_escalation_record_before_sending)
  • Replace Send Email with Gmail and adapt "Read the email result"

Additional info

Evidentiary limits: EVIDE does not verify the real identity of the Slack responder; the Slack member ID is declared, while the verified DAPI identity is that of the depositor. A recorded approval does not by itself prove execution; the outcome record states the email result separately. SMTP acceptance does not prove delivery or reading. The fingerprinted content stays in n8n execution data, subject to its retention settings. EVIDE idempotency prevents duplicate records but does not alone guarantee that no email is sent twice; the workflow adds no automatic retry and one attempt per request.

Testing: a previous build ran on n8n Cloud 2.47.7 in Demo mode with real OpenAI, Slack and SMTP. This build, which changes only texts, settings, record titles and webhook identifiers, was tested on a local n8n 2.47.7 with simulated services and against a local copy of EVIDE.