How it Works
From inbox to reply - in 6 steps
MailPilot polls your inbox, optionally pre-filters by keywords, retrieves KB context when configured, and uses one LLM call for relevance and reply-then drafts or auto-sends based on REPLY_MODE.
1
Poll inbox
Gmail API (recent threads) or IMAP INBOX on a schedule, manual “Run poll”, or IMAP IDLE for faster SMTP inboxes.
2
Keyword prefilter
Optional SERVICE_KEYWORDS filter runs first-non-matching mail is skipped before any LLM call.
3
RAG lookup
If your knowledge base is configured, MailPilot finds the most relevant website, text, or JSON content before generating a reply.
4
AI relevance & reply
One LLM call returns relevance, confidence, and reply text; must pass your RELEVANCE_THRESHOLD.
5
Draft or auto-send
REPLY_MODE=draft saves the reply for dashboard review; send delivers immediately via Gmail API or SMTP.
6
State & queue
Per-user processed state avoids duplicates; the dashboard queue shows sent, draft, and ignored activity (account audit in admin).