What n8n brings to LLM workflows
n8n connects LLMs to real-world triggers and actions without writing glue code. A webhook can trigger an LLMLLMLarge Language Model — a neural network trained on vast amounts of text data that can understand and generate human-quality language across a wide range of tasks.Learn more → to summarise incoming Slack messages, a cron job can run a daily research digest, or a new CRM record can trigger an AI to draft a personalised email — all through a visual workflow editor.
Unlike Zapier or Make, n8n can be fully self-hosted and is free for self-hosted instances. It also supports long-running workflows, loops, and conditional logic that simpler tools lack.
Install n8n
The easiest way to self-host n8n is with Docker: `docker run -it --rm -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n`. Open `http://localhost:5678` in your browser to access the editor.
For a permanent install with persistence, use docker-compose or the npm package: `npm install -g n8n && n8n start`. n8n stores workflows and credentials in `~/.n8n` by default.
Connect an LLM provider
In n8n, go to Settings Credentials Add Credential. Search for 'OpenAI' and paste your API key. This credential can then be used in any AI node in your workflows.
To use a local Ollama model instead, add an 'OpenAI' credential but set the Base URL to `http://host.docker.internal:11434/v1` (on Docker) or `http://localhost:11434/v1` (if n8n is running directly), with any placeholder API key. Ollama's OpenAI-compatible endpoint will handle the rest.
Build a Slack digest workflow
Create a new workflow. Add a Cron trigger set to run every morning at 8am. Connect it to a Slack node that fetches messages from a specific channel. Pipe the messages into an AI Message node using your connected LLM credential. PromptPromptThe input text sent to a language model — the question, instruction, or context that triggers a response.Learn more →: 'Summarise the key decisions, action items, and blockers from these Slack messages in bullet points.'
Add a final Slack node that posts the summary back to a digest channel. The whole workflow takes about 10 minutes to set up and runs automatically every morning.
Use the AI Agent node for agentic workflows
n8n's AI AgentAgentAn LLM-powered system that can take actions, use tools, and pursue multi-step goals autonomously without human input at each step.Learn more → node runs a full ReActReActA prompting pattern that alternates between reasoning steps and tool-use actions, enabling models to think through problems, take actions, observe results, and iterate.Learn more → loop. Connect tools as sub-nodes: a web search tool, a code execution node, a database query node. The agent decides which tools to call based on the incoming task.
For example: build a customer support agent that receives emails, uses a knowledge-base search tool to find relevant documentation, drafts a response, and sends it — all automatically. The AI Agent node handles the tool-calling loop; you just wire up the tools.