{"product_id":"n8n-lead-capture-workflow-gpt-4o-mini-sheets-slack","title":"n8n Lead Capture Workflow: GPT-4o-mini + Sheets + Slack","description":"\u003ch3\u003eInstant lead scoring + Slack alerts from an n8n webhook\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n Lead Capture Workflow\u003c\/strong\u003e accepts new lead submissions via a webhook, validates and normalizes the data, uses \u003cstrong\u003eOpenAI (gpt-4o-mini)\u003c\/strong\u003e to qualify the lead with a score, logs the result (as a placeholder for Google Sheets\/CRM), and immediately posts a formatted update to \u003cstrong\u003eSlack\u003c\/strong\u003e—then returns a JSON response to the requester.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives leads via webhook:\u003c\/strong\u003e Handles a \u003ccode\u003ePOST\u003c\/code\u003e request at the \u003ccode\u003e\/lead-capture\u003c\/code\u003e endpoint, expecting lead details in the request body.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates \u0026amp; normalizes payload:\u003c\/strong\u003e Checks required fields (\u003cstrong\u003eemail\u003c\/strong\u003e and \u003cstrong\u003ename\u003c\/strong\u003e), verifies email format, and adds default values plus a \u003cstrong\u003etimestamp\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eQualifies the lead with OpenAI:\u003c\/strong\u003e Sends the lead details to the \u003cstrong\u003eOpenAI Chat Completions API\u003c\/strong\u003e using \u003cstrong\u003egpt-4o-mini\u003c\/strong\u003e to generate a JSON qualification result (including `score`, `reasoning`, and a suggested action).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFlags qualified leads:\u003c\/strong\u003e Merges the AI result back into the lead record and marks the lead as \u003cstrong\u003equalified when the score is 7 or higher\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs for Sheets\/CRM (simulated):\u003c\/strong\u003e Creates a placeholder “write to Google Sheets\/CRM” outcome and returns a success payload with a placeholder row number.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNotifies your team on Slack:\u003c\/strong\u003e Posts a formatted message via a \u003cstrong\u003eSlack incoming webhook\u003c\/strong\u003e including lead details and the qualification score.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCapture leads from a landing page form\/app and auto-qualify them in near real time.\u003c\/li\u003e\n  \u003cli\u003eRoute higher-intent submissions to sales by alerting a Slack channel with the AI score.\u003c\/li\u003e\n  \u003cli\u003eProvide an API-style response so your frontend or form service can confirm submission status.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook\u003c\/strong\u003e (lead capture endpoint: \u003ccode\u003e\/lead-capture\u003c\/code\u003e)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCode\u003c\/strong\u003e node for validation, normalization, and response shaping\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e to \u003cstrong\u003eOpenAI Chat Completions API\u003c\/strong\u003e (gpt-4o-mini)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e to \u003cstrong\u003eSlack incoming webhook\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRespond to Webhook\u003c\/strong\u003e to return final JSON to the caller\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eSetup tip:\u003c\/strong\u003e Add your OpenAI API key in the OpenAI HTTP request authorization header, and replace the Slack incoming webhook URL in the Slack HTTP request node.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824205488307,"sku":"N8N-18156","price":17.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/BzyK14Vf1Fo0D0wt7fIHo_nT8m5u56.png?v=1786612572","url":"https:\/\/buyflowscripts.com\/products\/n8n-lead-capture-workflow-gpt-4o-mini-sheets-slack","provider":"N8N Commerce","version":"1.0","type":"link"}