Automate eCommerce Contact Form Classification and Routing
detail.loadingPreview
This workflow automatically classifies incoming contact form submissions using AI and routes them to the appropriate department via email and Google Sheets. It leverages 'On form submission', 'Text Classifier', and 'OpenAI' nodes for intelligent processing.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow is designed to streamline the management of incoming contact form submissions for eCommerce businesses. It automatically classifies the intent of each message using an AI model and then routes the submission to the correct internal department. This ensures that inquiries about quotes, product information, general problems, or orders are handled efficiently and by the right team.
The core logic involves receiving data from a form trigger, using a text classification node (powered by Langchain/OpenAI) to determine the category of the message, and then branching out to different email sending nodes based on the classification result. Additionally, it logs submissions to Google Sheets for record-keeping and analysis.
This workflow solves the problem of manual sorting and distribution of customer inquiries, saving time, reducing response latency, and improving customer satisfaction by ensuring timely and relevant follow-ups.
Key Features
- Automated Contact Form Trigger: Initiates the workflow when a new submission is received via a customizable form.
- AI-Powered Text Classification: Utilizes OpenAI and Langchain to intelligently categorize customer messages into predefined intents (e.g., 'Request Quote', 'Product info', 'General problem', 'Order').
- Intelligent Routing: Directs classified messages to specific email addresses or departments based on their category.
- Data Logging to Google Sheets: Stores submission details and classifications in a Google Sheet for auditing and analysis.
- Configurable Responses: Allows customization of email subjects, content, and sender/reply-to addresses.
How To Use
- Set up the 'On form submission' node: Configure your contact form fields (Name, Email, Message) and your form's response settings.
- Configure the 'Text Classifier' node: Define the
categoriesand their descriptions that you want to classify messages into. Ensure theinputTextis correctly mapped from your form submission (e.g.,={{ $json.Message }}). - Set up the 'OpenAI' node: Connect your OpenAI credentials and select the desired model (e.g.,
gpt-4o-mini). ThesystemPromptTemplateshould guide the AI on how to classify and format the output. - Configure Email Sending Nodes: For each classification category (e.g., 'Prod. Dep.', 'Quote Dep.', 'Gen. Dep.', 'Order Dep.', 'Other Dep.'), set up the
toEmail,fromEmail,subject, andhtmlcontent. Use expressions to dynamically pull data from the form submission and classification results. - Set up Google Sheets Nodes: For each relevant category or for a general log, configure the Google Sheets nodes (
Prod DB,Quote DB, etc.). Map the necessary columns (DATA,NOME,EMAIL,RICHIESTA,CATEGORIA,TO) using expressions to populate your spreadsheet. - Connect the Nodes: Ensure the 'Text Classifier' node is connected to the 'OpenAI' node, and the output of the 'Text Classifier' is used to conditionally trigger the different email sending and Google Sheets nodes using appropriate routing or branching logic (e.g., using If nodes or switch nodes, though not explicitly shown in this snippet).
- Test: Submit test entries through your contact form to verify that classification, email routing, and Google Sheets logging work as expected.
Apps Used
Workflow JSON
{
"id": "562fab20-8ccb-48d7-98d2-add18fa6e6bb",
"name": "Automate eCommerce Contact Form Classification and Routing",
"nodes": 0,
"category": "Gmail_and_Email_Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 562fab20-8ccb...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
AI Email Processing Autoresponder with Approval
Automate email responses with an AI autoresponder. This workflow uses an Email Trigger (IMAP) to fetch emails, summarizes them with 'Email Summarization Chain', writes a draft response using an 'Agent' and 'OpenAI', and sends it for approval via 'Send Draft' before sending via 'Send Email'.