← Lesson
BitWithBite
n8n Automation · Quick Reference

AI Nodes & LLM Integration Cheat Sheet

n8n Automation
In one line: You have mastered N8N. Now unlock its most powerful capability: integrating Large Language Models. In this lesson you will connect GPT-4 to your workflows, build AI agents that ...

Key Ideas

1The OpenAI Node — Direct GPT Integration. N8N's built-in OpenAI node gives you direct access to GPT-4, GPT-3.5-Turbo, DALL-E, Whisper, and the Embeddings API. Set it up once with your API key and use it in any...
2AI Agents — Let AI Drive Your Workflow. N8N's AI Agent node is more powerful than the basic OpenAI node. It gives the AI access to tools (like web search, calculators, or custom N8N sub-workflows) and lets i...
3Prompt Chaining — Multi-Step AI Pipelines. Complex AI tasks often need multiple LLM calls in sequence. Chain OpenAI nodes together where each node's output feeds the next node's input, building up a multi-step ...
4🧠 AI Integration Final Check 1. You want to build a system where the AI can search the web, check your database, and send emails autonomously to complete a task. Which N8N feature should you use? OpenAI Node (Message operation) AI Agent Node with tools configured HTTP Request node to call OpenAI API directly Schedule Trigger + OpenAI Node Check Answer 2. In the OpenAI node, what is the difference between the System message and the User message? System message is encrypted; User message is plain text System message sets the AI's role and behavior; User message is the actual input/task from the workflow System message is limited to 100 tokens; User message can be any length They are the same — N8N just uses two fields for UX reasons Check Answer 3. How do you pass the output of one OpenAI node into the next OpenAI node in a prompt chain? Copy and paste the output manually between nodes Use the expression {{ $('NodeName').item.json.message.content }} in the next node's prompt N8N automatically passes the output without any configuration Use a Set node to explicitly name the output before passing it Check Answer Finished Lesson 12? You have completed all 12 N8N lessons — you are now an N8N automation builder! Mark Complete ✓ ← Previous Webhooks & Real-Time Triggers Next → Project 1: Full Automation Workflow 🎓 You've Completed N8N Workflow Automation!. Claim your official certificate — includes a unique ID and scannable QR code for instant verification.

Code Examples

Gmail Trigger (new email arrives) ↓ OpenAI Node Model: gpt-4 System: "You are a concise email summarizer. Return 3 bullet points max." User: "Summarize this email: {{ $json.text }}" ↓ Slack Node → Post summary to #inbox-summary channel
Step 1 — OpenAI (Research) Prompt: "List 5 key facts about: {{ $json.topic }}" Output: list of 5 facts → saved to facts variable Step 2 — OpenAI (Outline) Prompt: "Create a blog post outline using these facts: {{ $('Step 1').item.jso...