What is n8n: Build AI Workflows with n8n
Next: Install n8n
AI Automation Guide

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.

Codecademy Team December 15, 2024 8 min read 12.4K views 342 likes
AI Automation n8n No-Code Gemini Slack

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.

Key Insight: n8n bridges the gap between no-code accessibility and developer flexibility. You can start with drag-and-drop and gradually add custom code as your needs evolve.

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.

๐Ÿ“‹ Workflow Structure 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:

๐Ÿ“‹ Example Flow 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:

๐Ÿ’ป Terminal brew install node

Linux: First install npm using apt:

๐Ÿ’ป Terminal sudo apt-get install npm

Then install Node Version Manager (nvm) and Node.js version 22:

๐Ÿ’ป Terminal curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 22

Install n8n

Run the following command:

๐Ÿ’ป Terminal npm install -g n8n

On Linux, you may need superuser mode:

๐Ÿ’ป Terminal sudo npm install -g n8n

Run n8n

Start n8n by executing:

๐Ÿ’ป Terminal n8n
n8n running in terminal showing localhost:5678
n8n running successfully on localhost:5678

Open your browser and navigate to http://localhost:5678. On first launch, you'll be prompted to set up your owner account.

n8n owner account setup screen
Creating your n8n owner account
Pro Tip: If you want to test n8n without local installation, you can register for a 14-day free trial of n8n cloud.

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.

n8n credentials tab
n8n Credentials tab - no credentials configured yet

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.

Getting a Gemini API Key: Visit Google AI Studio to create a free Gemini API key. You get a generous free tier to get started.

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.

Slack Setup: You need to create a Slack app with a bot token. Use the Slack app quickstart to set this up.

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)
n8n form editor with fields
Creating the form with Name, Email, and Review fields

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.

summarization chain with gemini
Summarization Chain with Gemini AI attached

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
๐Ÿ“‹ Expression {{ $json.summary }}
slack node configuration
Slack node sending the summarized review

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
slack message with summary
The final output: AI-generated summary delivered to Slack
Success! You've just built a complete AI workflow that takes reviews, summarizes them with Gemini AI, and sends the result to Slack. All without writing a single line of code!

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.

Frequently 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.

Built with โค๏ธ by The Tech Team

© 2025 All rights reserved. n8nยฎ is a trademark of n8n GmbH.