What is n8n: Build AI Workflows with n8n
This comprehensive guide teaches you how to create powerful AI workflows using n8n, from installation to building a complete review summarization bot with Gemini AI.
What is n8n? #
n8n is a powerful workflow automation tool that lets you create multi-step AI agents and automate workflows using visual tools. It is an open-source no-code tool that you can use in self-hosted and cloud setups on any operating system using Node.js or Docker.
n8n allows you to integrate tools like Slack, Microsoft Teams, Spreadsheets, forms, and databases to create workflows and AI agents. Despite being a visual and no-code tool, n8n also allows you to include JavaScript or Python functions in the workflows and add libraries from npm or Python, making it a great workflow automation tool for people who code and those who don't alike.
What is an n8n workflow? #
An n8n workflow is an automated sequence of tasks created using n8n. A workflow consists of multiple nodes:
- Trigger Node: Initiates a workflow execution based on a specific event like scheduled time or incoming webhooks.
- Action Nodes: Perform individual actions like fetching data from an API, sending an email, or posting a Slack message.
The workflow starts when the trigger node fires, then all nodes execute in order to process data and produce output.
Input Form (Trigger)
โ Summarizer Node (AI)
โ Slack Node (Output)
Example: Create a workflow that analyzes reviews from your website and sends summaries to a Slack channel. The workflow would be:
Form Trigger โ Summarization Chain (Gemini AI) โ Slack Message
Download & setup n8n locally #
To install and run n8n, you need Node.js and npm on your machine.
Download Node.js and npm
Windows: Install from the official Node.js downloads page.
macOS: Execute the following command in your terminal:
brew install node
Linux: First install npm using apt:
sudo apt-get install npm
Then install Node Version Manager (nvm) and Node.js version 22:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 22
Install n8n
Run the following command:
npm install -g n8n
On Linux, you may need superuser mode:
sudo npm install -g n8n
Run n8n
Start n8n by executing:
n8n
Open your browser and navigate to http://localhost:5678. On first launch, you'll be prompted to set up your owner account.
n8n components for building the AI workflow #
The review summarization workflow will have the following components:
- Trigger Node: We'll use the n8n Form Trigger to get the user's review. You can also use other tools like Google Forms, Typeform, or Webflow.
- Summarization Chain Node: Generates a summary from text using an LLM. You can define output length and custom prompts.
- LLM: We'll use Gemini AI via the Gemini API. You could also use OpenAI, Anthropic, or others.
- Slack Node: Sends the generated summary to a Slack channel.
Configure LLM and Slack APIs in n8n #
To use Gemini AI and Slack, you need to configure their credentials in n8n.
Configure Gemini AI
1. Go to the Credentials tab on the n8n homepage.
2. Click "Add first credential" and search for Gemini.
3. Select Google Gemini (PaLM) API and click Continue.
4. Paste your Gemini API key and click Save.
Configure Slack
1. Click the + button beside the n8n logo and select Credential.
2. Search for Slack and select Slack API.
3. Paste your Slack Access Token and click Save.
Create an n8n workflow step by step #
Let's build the complete workflow:
Step 1: Create a Form Trigger
Click the + icon to create a new workflow. Search for Form and select n8n Form.
Add fields for:
- Name (text input)
- Email (email input)
- Review (textarea)
Step 2: Add a Summarization Chain
Click the + icon on the right of the form node. Search for Summarization and select Summarization Chain.
Configure:
- Summary length (short, medium, long)
- Custom prompt (optional)
Then attach a Google Gemini Chat Model to the summarization node.
Step 3: Add a Slack Node
Click the + icon on the right of the summarization node. Search for Slack and select the Send Message operation.
Configure:
- Channel ID (where to send the message)
- Message text: Use the output of the summarization chain
{{ $json.summary }}
Step 4: Execute the Workflow
Click Execute Workflow to test. The form will open in a new browser window.
Submit a review and you'll see:
- โ "Workflow executed successfully" confirmation
- โ The summary appears in the output panel
- โ The summary is sent to your Slack channel
Features of n8n #
- Open-source & self-hosted: Full data control and privacy.
- Visual workflow editor: Drag-and-drop, node-based builder.
- 500+ integrated apps: Slack, GitHub, Notion, MySQL, and more.
- Built-in credential management: OAuth2, JWT, SSO support.
- Code & no-code: Use JavaScript or Python when needed.
Conclusion #
n8n empowers you to build AI workflows by integrating over 500 apps with minimal coding. Whether you're automating internal processes, integrating third-party tools, or experimenting with AI-driven features, n8n offers the control and customization needed to scale efficiently.
To learn more about automation, explore the IT Automation with Generative AI skill path that covers AI fundamentals, SRE practices, and automation system integration.
Share this article
Related Learning
How to Install n8n
Complete step-by-step guide to install n8n on Windows, macOS, Linux, Docker, and more...
10 min read ๐Learn Node.js
Learn about the different components of a web application's back-end and...
Intermediate ยท 5 hours ๐คAI Automation with Generative AI
Master AI fundamentals, SRE practices, and automation system integration...
Advanced ยท 8 hours ๐งชAutomated Testing with Selenium
Test implementation, web driver framework, mobile testing, and automation techniques...
Intermediate ยท 6 hoursFrequently Asked Questions
Does n8n require coding?
No. n8n doesn't require coding; you can easily build AI workflows using visual tools without coding. However, you can add JavaScript or Python code if you need advanced logic.
How to start an n8n workflow?
You can start an n8n workflow using the trigger node. If you have set a webhook trigger, it starts on HTTP requests. For scheduled triggers, it runs at the scheduled time. Manually, you can click the Execute Workflow button in the editor.
What language does n8n use?
n8n is built using TypeScript and JavaScript and runs on Node.js. However, you don't need to know any programming language to create n8n workflows. You can build most workflows by visually connecting nodes.
Is n8n an ETL tool?
n8n is not specifically an ETL tool. However, you can use it for light to moderate ETL pipelines by creating workflows to extract data from APIs and process it. For large-scale data processing, you might need dedicated ETL tools.
Is n8n totally free?
Yes, the self-hosted version of n8n is open-source and completely free. However, you need to pay to use the n8n cloud version, which offers convenience and managed hosting.