DocHub
n8n workflow for automated AI-powered responses to influencer inquiries

Email Auto-Reply Workflow

An n8n workflow that automatically responds to influencer emails using AI categorization and response generation.

Purpose

Reduce manual email handling for the marketing team. Most influencer questions are repetitive (login help, splash screen specs, approval times) and can be answered automatically. Complex or sensitive topics get escalated.

Architecture

Runs on n8n worker-1 (Digital Ocean), workflow name: Email Auto-Reply (Influencer).

Pipeline

  1. Check Inbox — IMAP polling every 1 minute
  2. Store Email Data — Extract sender, subject, body, message-id
  3. AI Categorize — Mistral classifies as SPAM, BUSINESS, or REPLY
  4. Route — SPAM/BUSINESS → forward to team; REPLY → continue
  5. AI Agent — Mistral generates response using knowledge base + conversation memory
  6. Can AI Answer? — If response contains ESCALATE_TO_HUMAN → forward to team
  7. Send Reply — Resend API, threaded in the original email conversation

AI Knowledge Base

The AI can answer questions about:

Topic Answer
Portal URL https://hypnoelp.com/influencers/
How to log in Email + password from invite link
Where’s my referral code Dashboard after login
Splash screen specs 1080x1920px, 9:16 ratio, PNG/JPG, no borders
Approval timeline 24-48 hours, pending status is normal
Rejected image Check dashboard for reason, re-upload

Escalation Triggers

The AI responds with ESCALATE_TO_HUMAN (forwarded to team) for:

  • Money, payments, earnings, commissions
  • Custom referral code requests
  • Account deletion
  • Technical bugs or errors
  • Anything not in the knowledge base

Email Threading

Replies appear in the same Gmail thread using In-Reply-To and References headers from the original email’s Message-ID. Conversation memory is maintained per sender using n8n session IDs.

Handshakes

From To Protocol
IMAP server n8n IMAP polling (1 min interval)
n8n Mistral API HTTP (categorization + response generation)
n8n Resend API HTTP (send reply)
n8n Team email Forward (escalation)

Email Configuration

  • From: HypnoELP Partners <marketing@hypnoelp.com>
  • Reply-to: marketing@omelasai.com
  • Provider: Resend API

Dependencies

  • n8n (self-hosted on Digital Ocean)
  • Mistral API (categorization + response generation)
  • Resend API (email delivery)
  • IMAP access to mailbox

Status

Production (testing phase). Pending IMAP credentials for production mailbox to go fully live.