Triage inbound form requests with OpenAI, Slack, Gmail and Google Sheets
Quick Overview This workflow receives website contact-form submissions via a webhook, uses OpenAI to classify and summarize the message and draft a reply, routes spam separately, alerts your team in Slack, sends an auto-reply with Gmail, logs the submission to Google Sheets, and returns a JSON acknowledgement.
How it works Receives a contact-form POST request (name, email, message) via an n8n webhook endpoint. Sends the submission to OpenAI (gpt-4o-mini) to classify category/urgency/sentiment, generate a one-sentence summary, and draft a language-matched email reply in strict JSON. Normalizes the AI output into consistent fields (timestamp, category, urgency, sentiment, summary, suggested reply) for downstream routing. Checks whether the message is classified as spam and, if so, appends a flagged row to Google Sheets and skips notifications and email. For non-spam submissions, posts a formatted alert to a Slack channel with the sender details and AI summary. Sends the AI-drafted auto-reply to the visitor using Gmail, logs the submission to Google Sheets, and responds to the original webhook request with {"status":"received"}.
Setup Create and connect credentials for OpenAI, Slack, Gmail, and Google Sheets in n8n. Update the Google Sheets document ID and choose the target sheet name for both the normal submission log and the spam log. Select the Slack channel where alerts should be posted. Copy the webhook URL from the workflow and configure your website/contact form to POST name, email, and message to it.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments