How to Auto-Respond to Customer Emails Using AI
Use AI to draft and send helpful responses to common customer questions.
What This Integration Does
Most support inboxes are full of repeat questions: shipping status, password resets, returns policy, opening hours. A human reply is friendly but slow, and the answer is usually already written down somewhere in your help docs. This Spojit workflow reads the incoming email, looks up the answer in your Knowledge collection, drafts a reply with a Connector node in Agent mode, and (once you trust it) sends the reply automatically.
The workflow is triggered per inbound email. Each run pulls the email body, retrieves the top matching documents from a Knowledge collection, uses a Connector node in Agent mode to write a reply grounded in those documents, and either sends the reply through your Front connector or routes it to a human for approval first. State left behind: an outbound message in Front and an audit tag on the conversation so you can see what was replied.
Prerequisites
- A Front connection with permission to read conversations and send messages.
- A Knowledge collection populated with your FAQ, returns policy, shipping info, and product docs.
- A decision on which categories you trust to auto-send versus require human approval.
Step 1: Trigger on Inbound Email
Drop a Trigger node onto the canvas and set its type to Webhook. Configure Front to POST inbound messages to this webhook URL (Front Rules can fire on a specific inbox or tag). The webhook payload gives you conversationId, messageId, the sender, subject, and body.
Step 2: Knowledge - Retrieve Relevant Docs
Add a Knowledge node in Query mode. Set Collection to the persistent collection you populated, set Prompt to {{ trigger.body }}, and set Result Count to 5 so the synthesis stays focused. Pick the Model used to synthesise the answer and name an Output Variable (for example knowledge) so later steps can read the grounded answer it produces.
Step 3: Connector Agent - Draft the Reply
Add a Connector node and switch it to Agent mode. Give it a prompt like:
You are a customer support agent for ACME. Reply to the customer using ONLY
the grounded answer provided. If it does not cover the question,
say "I'll loop in a teammate" and do not invent an answer.
Customer email:
{{ trigger.body }}
Grounded answer:
{{ knowledge.answer }}
Use the node's Response Schema to force structured JSON output with reply (the message text) and confidence (high/medium/low), and name an Output Variable (for example agent) so the next step can branch on it.
Step 4: Condition - Auto-Send or Human Review
Add a Condition node that checks whether {{ agent.confidence }} equals high. On the true branch, route straight to sending. On the false branch, route to a Human node. Set its Message to show the drafted reply and add an Approval slot for your support team. If the reply is approved the workflow continues to the send step; a rejection halts the run so no draft goes out. Approvers act in the Approvals inbox.
Step 5: Send the Reply via Front
Add a Connector node in Direct mode pointing at the Front connector and pick the send-message tool. Map the conversation reference from the trigger payload (for example {{ trigger.conversationId }}) and the reply text {{ agent.reply }} into the tool's inputs so the message threads onto the original conversation.
Both branches converge on this step: high-confidence drafts arrive directly, and drafts that passed the Human approval step arrive after a teammate signed off, so the same {{ agent.reply }} is sent either way.
Step 6: Tag and Notify
After sending, add a Connector node for the Front connector and call add-tag with a tag like ai-auto-replied so you can audit later. For low-confidence handoffs that went through approval, also add a Connector node for the Slack connector and call send-message into your support channel so the team can spot patterns the replies are missing.
Tips
- Start every new category with the Human branch only. Watch a week of drafts, then flip categories you trust to auto-send.
- Keep your Knowledge collection trimmed: stale or contradictory docs are the number one cause of wrong replies.
- Capture the prompt, the grounded answer, and the final reply for every run in Spojit's execution history. When a customer complains, you need the exact context the Agent node saw.
- Ask Miraxa, the intelligent layer across your automation, to scaffold this workflow: it can add the Trigger, Knowledge, Connector, Condition, and Human nodes and wire the branches, leaving you to fine-tune fields in the properties panel.
Common Pitfalls
- Letting the Agent answer outside its knowledge. Without the "do not invent" instruction it will make up policy. Keep that guardrail in the prompt.
- Forgetting threading. Always pass the conversation reference into the
send-messagecall or the reply lands as a brand new conversation. - Replying to bounces and out-of-office auto-replies. Filter those out at the trigger or with a Condition node before the Agent runs.
Testing
Send three real-looking test emails to the inbox: one obviously covered by your docs, one borderline, one totally out of scope. Confirm the in-scope one auto-sends, the borderline one routes to Human, and the out-of-scope one says "I'll loop in a teammate" rather than guessing.