Lightweight AI Nodes: LLM Chain, Extractor, Classifier, Sentiment
- Identify the four lightweight AI nodes in n8n and describe what each does
- Explain when each lightweight node is preferable to the full AI Agent
- Configure the Information Extractor with a custom field schema
- Set up the Sentiment Analysis node with custom sentiment categories beyond the defaults
Not Every Task Needs a Full Agent
The AI Agent node is powerful, but it is also the heaviest option. For tasks that are predictable, single-step, and require no tool use or multi-turn reasoning, n8n provides four lightweight AI nodes. These are faster, cheaper to run, and far simpler to configure. Knowing when to reach for one of these instead of the full agent is one of the most practical skills in n8n AI automation.
Basic LLM Chain: Direct Prompt to Response
The Basic LLM Chain sends a prompt to a connected language model and returns the response — nothing more. No tools, no reasoning loop, no memory. Use it when the task is straightforward: generate a product description, rewrite a paragraph, translate a sentence, summarise a document. You write a prompt template using {{ $json.text }} to insert the item's content, and the model's response flows to the next node.
Information Extractor: Structured Output from Unstructured Text
The Information Extractor node takes unstructured text and pulls out specific fields as a structured JSON object. You define a schema: field names, data types, and a description of what each field should contain. The model fills in the values. Example: given a customer email, extract order_number, issue_type, and urgency_level. The output is a clean, parseable JSON object ready for the next node — no regex, no string manipulation required.
Text Classifier: Route Items into Categories
The Text Classifier node reads each incoming item and assigns it to one of the categories you define. Each item gets a category field appended to its JSON output, which you can then use in an IF or Switch node to route the item down the correct workflow branch. Common uses: classify support tickets by department, sort emails into actionable buckets, tag incoming leads by interest level.
Sentiment Analysis: Tone Detection
The Sentiment Analysis node classifies text using sentiment categories you define. The defaults are Positive, Neutral, and Negative, but you can customise them. For example: Very Positive, Slightly Positive, Neutral, Slightly Negative, Very Negative for five-point sentiment scoring. Use it to score customer reviews, flag negative feedback for escalation, or filter social media mentions by tone.
When to Use Lightweight Nodes vs the AI Agent
- Use Basic LLM Chain for generation tasks with a fixed prompt and no decision-making.
- Use Information Extractor when you need structured data from free-form text.
- Use Text Classifier when routing items to different downstream branches.
- Use Sentiment Analysis when you need a tone score alongside other data.
- Use AI Agent when the task requires multiple steps, tool use, or dynamic decision-making.
In practice, the most efficient pipelines combine all of these: lightweight nodes handle routing and extraction at scale, while the AI Agent is invoked only for the cases that genuinely require it. This keeps latency low and costs predictable.
- The Basic LLM Chain sends one prompt and returns one response — no tools, no reasoning loop
- The Information Extractor outputs structured JSON based on a schema you define — no regex or parsing needed
- The Text Classifier appends a category field to each item for use in Switch or IF routing
- Sentiment Analysis categories are fully customizable — redefine them to match your specific use case