Overview
Codika workflows use n8n’s LangChain integration nodes to run AI operations. The two main node types for LLM processing are:
Critical rule: Use
chainLlm when you need structured JSON output. The agent node adds verbose reasoning before the final answer, which breaks structured output parsers.
Architecture
Both node types follow the same wiring pattern:Basic chainLlm example
This classifies an email as “newsletter”, “action_item”, or “spam”:LLM Model node
Output Parser node
Chain LLM node
Connections
Accessing LLM output
After the chainLlm node executes, the parsed output is available at:outputParserStructured, the parsed JSON is in the output field of the chain’s result.
Available Claude models
Use FLEXCRED placeholders for AI provider credentials — they automatically handle org-owned vs. Codika-provided API keys.
Multi-step processing pattern
For workflows that need to process multiple items (e.g., classify each email in a batch):SplitInBatches or Loop Over Items node to iterate, with the chainLlm inside the loop.
Temperature guidelines
Common mistakes
- Credentials on chainLlm instead of lmChatAnthropic — credentials must be on the model node
- Using
agentfor JSON output — agent adds reasoning text that breaks structured parsers - Missing
hasOutputParser: trueon chainLlm — required when using outputParserStructured - Accessing output incorrectly — use
$('Node Name').first().json.output, not.jsondirectly