Mailhook and Front: AI Inbound-Email Intent Router Template

A template that reads every email arriving at a Spojit Mailhook, classifies its intent with an Agent-mode Connector node, and routes it into the matching Front inbox so the right team picks it up first.

What It Builds

This Spojit template starts with a Mailhook trigger that fires the moment mail lands at your unique Mailhook address. An Agent-mode Connector node reads the subject and body, classifies the intent as sales, support, or billing, and returns that decision as structured output via a Response Schema. A Condition node then sends the message into the right team mailbox using the Front connector's send-message tool, so an inbound enquiry reaches the correct queue without a person triaging it by hand.

The Prompt

Paste this into Miraxa, the intelligent layer across your automation, and it builds the workflow, connecting the tools for you:

Build a workflow that triggers on a Mailhook email. Add an Agent-mode Connector node that reads the email subject and body and classifies the intent as "sales", "support", or "billing", returning the result as structured output with fields intent and reason. Then add a Condition node that, based on the intent, uses the Front connector to send the email subject and body as a message into the matching Front inbox: sales to the Sales inbox, support to the Support inbox, billing to the Billing inbox.

Connectors Used

  • Mailhook trigger - generates a unique @mailhook.spojit.com address; every email to it starts a run and exposes the message as {{ input }}.
  • Connector node in Agent mode - classifies the email into sales, support, or billing and forces a clean result with a Response Schema.
  • Front - the send-message tool delivers the message into the chosen inbox; pair it with list-inboxes to confirm the exact inbox you are targeting.

Customize It

Change the intent labels in the prompt to match how your teams are split (for example add partnerships or returns), and rename each target inbox to your real Front inbox names. You can also widen the Response Schema to capture extra fields such as urgency or language, then add another Condition branch on those values, all without writing a second prompt.

Tips

  • Agent mode costs AI credits because it reasons over the email; keep the classification prompt tight and let the Response Schema constrain the output to intent and reason so the run stays cheap and predictable.
  • Run list-inboxes on the Front connector once to grab the exact inbox identifiers, then map each branch to the right one so messages never land in the wrong queue.
  • Add a From allowlist or Subject regex on the Mailhook trigger to drop noise before it spends an AI credit on classification.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.