Route farmer SMS intents using OpenAI GPT-4.1-mini classification
Ready for 3.0What this workflow does
This AI workflow has 49 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Normalize Incoming SMS (Edit Fields (Set)): sets 4 fields: phone, message_text, received_at…
- Lookup Farmer (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- Farmer Exists (If): checks a condition and branches into true / false
- Route SMS Intent (Switch): routes items into 7 branches
- Is Registration Message? (If): checks a condition and branches into true / false
- Get Weather Forecast (Code): runs custom JavaScript code
- Build Fire Reply (Code): runs custom JavaScript code
- Lookup Seed Suppliers (Code): runs custom JavaScript code
- Lookup Equipment Suppliers (Code): runs custom JavaScript code
…plus 38 more steps. See the full node list below.
Services it uses
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.
Nodes used (7)
- Edit Fields (Set)
n8n-nodes-base.set - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - Switch
n8n-nodes-base.switch - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
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 1.…