Triage website form enquiries with OpenAI and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model and Google Sheets.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Settings (edit me) (Code): runs custom JavaScript code
- Normalize and Route Request (Code): runs custom JavaScript code
- Valid, Bot or Invalid? (Switch): routes items into 3 branches
- Reject Invalid Email (400) (Respond to Webhook): sends the response back to the webhook caller
- Quietly Accept Bot (200) (Respond to Webhook): sends the response back to the webhook caller
- Check for Duplicate (Code): runs custom JavaScript code
- Already Received? (If): checks a condition and branches into true / false
- Answer Duplicate (200) (Respond to Webhook): sends the response back to the webhook caller
- Classify Enquiry with AI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Validate AI Result (Code): runs custom JavaScript code
…plus 6 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Respond to Webhook
n8n-nodes-base.respondToWebhook - If
n8n-nodes-base.if - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow receives website form submissions via a webhook, validates and de-duplicates them, uses OpenAI to classify and score each enquiry (including spam detection), and appends the result to one of three Google Sheets tabs for triage and…