Inbox triage for a small studio: classify replies, catch opt-outs and bounces every 10 minutes

We’re a small studio and we run our own sales inbox through n8n. Sharing the setup in case it’s useful; happy to answer questions.

Problem: replies to our outreach land in a shared mailbox together with auto-acknowledgements, bounces, platform notifications and the occasional “please remove us”. We wanted to never miss a human reply and to honour opt-outs immediately — without reading every auto-reply.

How it works (one workflow, 8 nodes):

  1. Schedule Trigger every 10 minutes.
  2. HTTP Request: refresh the mail provider’s OAuth access token (credentials kept in an n8n custom-auth credential, not in the workflow).
  3. HTTP Request: list folders → Code: keep Inbox/Notification/Newsletter/Spam.
  4. HTTP Request per folder: latest 30 messages (metadata + summary only).
  5. Code node: classify each new message into human-reply / human-new / opt-out / bounce / auto-ack / system with fixed patterns (EN + TR), remember seen message IDs in workflow static data, and on the very first run just “prime” the backlog silently.
  6. Filter: only human replies, opt-outs and bounces continue.
  7. HTTP Request: send one alert per message to our notification endpoint (it emails us).

Things that mattered:

  • Static data only persists on production (active) runs — the first-run priming flag avoids an alert flood when you activate it.
  • We treat message content as untrusted data: it’s only matched against fixed patterns, never used to drive actions.
  • Auto-replies are surprisingly varied (“Thanks for getting in touch”, AI-agent replies, out-of-office). Keep the pattern list short and review misses weekly.

We wrote up all the workflows we run here: How we run Minimolo on n8n | Minimolo Studio — and one of them is a public template: Log hotel booking enquiries to Google Sheets with WhatsApp and Gmail | n8n workflow template

— Minimolo team

Thanks for sharing. The “treat message content as untrusted, only match fixed patterns” point is underrated, especially now that people are feeding inbox content straight into agents.

Two questions:

  1. How do you classify auto-replies that carry real information, e.g. “I’m out until Monday, please contact jane@…”? I’d be tempted to route those as human-new with a note instead of dropping them, because the redirect is often the actual lead.
  2. Do you key opt-outs on the sender address only, or on the domain too? Keying on the address alone means someone can opt out and then get contacted again at a colleague’s address.

The first-run priming flag is a good trick. It’s easy to miss that static data only persists on active runs.

I’d separate the classification step from the follow-up policy.
An out-of-office that names a replacement can just stay as a review item. An actual opt-out, though, should create a durable suppression record with a clear scope
Keeping the original message ID on both makes retries much easier to reconcile — you don’t lose the referral, and you don’t accidentally reopen a contact that already opted out

Thanks, both are fair points.

@imdifferent01 Auto-replies: anything matching the auto-ack pattern used to be dropped, and you’re right that this lost the useful ones. I’ve changed it: if an auto-ack also contains an email address or a “please contact” phrase, it’s now routed as human-new with the extracted address in the note, so someone decides whether to follow the redirect. Plain “we got your message” acks are still dropped.

Opt-outs: the workflow itself only flags them; suppression happens in the sending step, and that list is checked on both the full address and the domain. So an opt-out from jane@ also blocks colleague@ at the same company. Stricter than strictly needed, but for a small studio that’s the safer side to err on.

@Mahdi_Eqbal agreed on separating the two, and that’s roughly where this landed: a redirecting auto-reply becomes a review item with the named address in the note, never an automatic follow-up. Opt-outs go into a separate suppression list that the sending step checks. The part I didn’t have was the original message ID on the suppression record. That’s added now, so a retry or a duplicate notification can be matched back to the message that caused it.

And yes, the static-data priming caught me out on the first run too.

1 Like