Quick overview
This workflow collects inquiries from an n8n form, matches them to FAQ entries stored in an n8n Data Table, drafts and keigo-checks a Japanese business email using OpenAI, posts it to Microsoft Teams for approval, and sends the approved reply via Gmail while logging the outcome.
How it works
- Receives a new inquiry via an n8n form submission.
- Loads all FAQ rows from the
keigo_faq n8n Data Table, combines them, and adds your company name, signature, and the submitted contact details.
- Uses OpenAI to classify the inquiry into a category and applies category-specific reply guidance, skipping messages classified as sales pitch or spam.
- Selects up to three relevant FAQ entries by matching keyword hits in the message and compiles them into a single FAQ text block.
- Uses OpenAI to generate a structured Japanese keigo email draft (subject, body, urgency, and staff check points) using only the matched FAQ content, then runs a second OpenAI pass to correct keigo issues and list the fixes.
- Posts the checked draft, fixes, and FAQ topics to Microsoft Teams via an incoming webhook with a link to an approval form.
- Waits for a reviewer to edit and approve the subject/body in the form, then sends the reply through Gmail if approved or skips sending if rejected.
- Logs the decision (sent or skipped) with email, company, category, subject, and timestamp to the
keigo_reply_log n8n Data Table.
Setup
- Create two n8n Data Tables named
keigo_faq (columns: topic, keywords, answer) and keigo_reply_log (columns: email, company, category, subject, status, logged_at).
- Add an OpenAI credential for the Chat Model node (configured for
gpt-5-mini).
- Add a Gmail OAuth2 credential with permission to send mail from the account you want to reply from.
- Create a Microsoft Teams Workflows (or compatible) incoming webhook and paste its URL into the Teams webhook HTTP request node.
- Replace the default
company_name and signature values with your own, and populate keigo_faq with your real FAQ topics, keywords, and answers (optionally run the sample FAQ loader once to seed example rows).