workflows.fit
Back to n8n workflows
n8n templateFreeBy Davide Boizza

Modular & customizable AI-powered email routing: text classifier for eCommerce

How It Works 1. Form Submission: - The workflow starts with the On form submission node, which triggers when a user submits a contact form. The form collects the user's name, email, and message. 2. Text Classification...

CommunicationHITLCore NodesData & StorageProductivityAILangchainForm Trigger
Loading interactive preview...

Template notes

How It Works 1. Form Submission: - The workflow starts with the On form submission node, which triggers when a user submits a contact form. The form collects the user's name, email, and message.

2. Text Classification: - The Text Classifier node uses an AI model (GPT-4) to classify the submitted message into one of the predefined categories: - Request Quote: For quote requests. - Product info: For general product inquiries. - General problem: For issues or problems related to products. - Order: For questions about placed orders. - Other: For any messages that don’t fit the above categories.

3. Email Routing: - Based on the classification, the workflow routes the message to the appropriate department via email: - Prod. Dep.: For product-related inquiries. - Quote Dep.: For quote requests. - Gen. Dep.: For general problems. - Order Dep.: For order-related questions. - Other Dep.: For all other inquiries. - Each email includes the user's name, email, message, and the classified category.

4. Data Logging: - The workflow logs the form submission and classification results into a Google Sheets document. Each department has its own sheet where the data is appended, including: - User’s name, email, and message. - Submission date and time. - Assigned category. - Email recipient details.

5. AI Model Integration: - The OpenAI node provides the AI model (GPT-4) used by the Text Classifier to classify the messages. The model is instructed to classify the text into one of the predefined categories without additional explanations.

---

Set Up Steps 1. Configure the Form Trigger: - Set up the On form submission node to collect user inputs (name, email, and message) and trigger the workflow.

2. Set Up the Text Classifier: - Configure the Text Classifier node to use the OpenAI model (GPT-4) for text classification. - Define the categories and their descriptions (e.g., "Request Quote", "Product info", etc.). - Set the fallback category to "Other" for unclassifiable messages.