Routing website contact form enquiries with an LLM restricted to a fixed category list
The author built an n8n workflow that uses an LLM to sort contact form submissions into predefined categories such as sales, support, partnership, job application, spam, or other. The model may only reply with one of the fixed category ids or null, since free-form answers would break spreadsheet filtering. Any reply that is not an exact match, as well as API errors, is flagged as needs_human with the reason recorded, and every valid enquiry is still logged so none are lost. Form text containing curly braces is stored as sent, avoiding template-syntax problems in the LangChain nodes. The workflow passed 17 local checks against stand-in APIs, but the author has not tested it with a real model or sheet, and it lacks authentication and deduplication for public use.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in