Route farmer SMS intents using OpenAI GPT-4.1-mini classification
Quick overview This demo workflow receives an SMS-style request through a webhook, routes common farmer commands while it uses OpenAI for unknown messages. It is designed for African SMS-first farming contexts but can be adapted anywhere.
How it works Receives an incoming SMS-style request through a webhook. Normalizes the phone number, message text, timestamp, and provider message ID into a consistent format. Passes the request through a demo farmer-lookup step. You can replace this with your own Google Sheets or other database. For registered farmers, the workflow routes exact commands like RAIN, SEEDS, EQUIPMENT, PLANT, HARVEST, and REGISTER to dedicated reply paths. For messages that do not match an exact command, the workflow asks OpenAI to identify the most relevant request type so it can choose the appropriate reply route. Produces a Demo Preview - Not Sent reply. This template does not send real SMS messages or write to a live database.
Setup Use the Webhook node's test URL to send an SMS-style payload while testing the workflow. Add your OpenAI credential to AI Classify Unknown SMS. Replace the backend nodes such as Lookup Farmer, supplier/rule lookup nodes, and Log nodes with your own Google Sheets or database actions. Replace Send SMS Reply with your SMS provider node or HTTP Request node. Test with messages such as RAIN, SEEDS, PLANT MAIZE, and a natural-language question before using a real farmer data.
Requirements OpenAI credential for the AI fallback classification. An SMS provider and farmer database are needed only when adapting the demo for live use.
Customization You should adapt phone normalization, command words, languages, crop guidance, supplier sources, reply templates, and safety wording for your country or region.
Additional info This template does not include any live SMS sending, farmer records, or credentials. It is best to review your outputs and safety rules before using it with real farmers.
Related Templates
AI SEO Readability Audit: Check Website Friendliness for LLMs
Who is this for? This workflow is designed for SEO specialists, content creators, marketers, and website developers who ...
Smart Sales Support Chatbot with GPT-4o and Google Sheets
Who is this tempate for? This workflow powers a simple yet effective customer and sales support chatbot for your webshop...
Text automations using Apple Shortcuts
Overview This workflow answers user requests sent via Mac Shortcuts Several Shortcuts call the same webhook, with a quer...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments