How to Build Your First AI Workflow with n8n in 10 Minutes (Beginner's Guide)
July 8, 2025
Have you ever wanted to make a computer do smart things automatically, like summarize text or answer questions, but felt lost with complex code?
This guide is for you!
We'll show you how to build your very first AI workflow using n8n, a fantastic automation platform, in just about 10 minutes. No coding needed for this start, just simple clicks and clear instructions.
Let's get your AI automation journey started!

What is an AI Workflow? Understanding AI Automation Basics
Before we build, let's quickly understand what an AI workflow means. Imagine a simple chain of actions:
Something happens (like you getting a new piece of text).
An Artificial Intelligence (AI) tool then does something smart with that text (like summarizing it).
Based on what the AI did, something else happens automatically (like sending the summary to you).
This entire automated chain, from start to finish, is an AI workflow. We're making computers work smarter, for you, automatically!
Getting Started with n8n: Your Workflow Automation Platform
To build your first AI workflow, you need n8n. Think of n8n as a digital whiteboard where you connect different pieces of software and AI tools together. It's a no-code automation tool that makes building AI automations visual and easy.

Choose Your n8n Setup: Cloud or Self-Hosted n8n
For this 10-minute AI workflow guide, the easiest way to start is with n8n Cloud. This means n8n handles all the technical setup for you.
n8n Cloud: Simply sign up at
n8n.io/cloud
. You'll get instant access to your n8n workspace. This is the fastest way to build AI workflows without any installation.Self-Hosted n8n: If you're more technically inclined, you can also install n8n on your own computer or server using Docker. For this quick guide, n8n Cloud is recommended.
Once you have access to your n8n workspace, you're ready for the next step.
Secure Your AI Access: Setting Up AI Credentials (OpenAI Example)
To let n8n talk to an AI tool like OpenAI (which powers ChatGPT), you need a special key. Think of this key as a password that proves you have permission to use the AI service. In n8n, these are called credentials.

How to Get Your OpenAI API Key
Go to
platform.openai.com
.Log in or create an account.
Look for "API keys" (usually under your profile or settings).
Click "Create new secret key."
Important: Copy this key immediately! OpenAI shows it only once. If you lose it, you'll need a new one.
Add Your OpenAI Credential in n8n
In your n8n workspace, look at the left sidebar. Find "Credentials" (it often looks like a key icon). Click it.
Click the "+ Create New Credential" button.
In the search box, type "OpenAI" and select it.
A small form will appear. Paste the OpenAI API key you just copied into the field labeled "API Key."
Give your credential a simple name, like "My OpenAI Key."
Click "Save." n8n will securely store this key. Now, n8n can securely use OpenAI for your AI workflows!
Build Your First AI Workflow: Text Summarization Automation
Our goal for this first AI workflow is simple: we'll give n8n some text, it will send that text to OpenAI for summarization, and then show you the summary. This is a core AI automation basic.

Step 1: Start Your AI Workflow - The Start Node
Every n8n workflow begins with a "trigger" – something that tells the workflow to start. For our first AI workflow, we'll use a simple "Start" node.
In your n8n workspace, you'll see a blank canvas.
Find the
Start
node (it's usually there by default, or you can search for "Start" and drag it onto the canvas).This
Start
node is your workflow trigger.

Step 2: Provide Input Text - The Set Node
We need to give our AI workflow the text we want summarized. We'll use a "Set" node for this.
Click the
+
button next to theStart
node on the canvas.In the search box that appears, type "Set" and select the
Set
node. Connect it to theStart
node.Click on the
Set
node to open its settings on the right side.Under "Values," click "Add Value."
For "Value Name," type
textToSummarize
.For "Value," paste a short paragraph of text you want to summarize. For example:
"Artificial intelligence (AI) is intelligence—perceivable by humans—exhibited by machines or software. It is also the study of the field of inquiry that studies the behavior of, and designs, such intelligent agents. AI research is highly technical and specialized, deeply divided into sub-fields that often fail to communicate with each other."
This
Set
node now holds the text your AI will process.

Step 3: Connect to AI - The OpenAI Node
This is where the AI magic happens! We'll use the OpenAI node to send our text for summarization.
Click the
+
button next to yourSet
node.Search for "OpenAI" and select the
OpenAI
node. Connect it to theSet
node.Click on the
OpenAI
node to open its settings.Under "Credentials," select "My OpenAI Key" (or whatever you named your credential). This tells n8n how to securely talk to OpenAI.
Under "Resource," choose
Chat
.Under "Model," select
gpt-3.5-turbo
. This is a common AI model from OpenAI.Now, the most important part: the AI instructions (called "messages" or "prompts"). Click "Add Message" twice:
Message 1:
"Role":
system
"Content":
You are a helpful assistant that summarizes text concisely.
(This tells the AIits job.)
Message 2:
"Role":
user
"Content":
Please summarize the following text: {{ $node["Set"].json.textToSummarize }}
Understanding
{{ }}
: This special{{ }}
is an "expression." It tells n8n to take the content from ourtextToSummarize
value (which we set in the previousSet
node) and put it right here into the AI's prompt. This is how n8n makes your AI workflows dynamic.

Step 4: See the Summary - The Respond to Webhook Node
To see the result of our AI workflow immediately, we'll use a "Respond to Webhook" node. This will show the summary in your web browser.
Click the
+
button next to yourOpenAI
node.Search for "Respond to Webhook" and select it. Connect it to the
OpenAI
node.Click on the
Respond to Webhook
node.Under "Body," click "Add Expression."
You need to tell n8n exactly where the summary is in the OpenAI node's output. Select
{{ $node["OpenAI"].json.choices[0].message.content }}
. This expression points directly to the summarized text generated by the AI model.

Run Your First AI Workflow! Automate with AI Now!
You've built your first AI workflow! Now, let's run it.
Save Your Workflow: Click the "Save" button in the top right corner of your n8n workspace. Give it a name like "My First AI Summarizer."
Activate Your Workflow: Click the "Active" toggle switch in the top right corner, next to the "Save" button. This makes your workflow ready to run.
Copy the Webhook URL: Click on the
Webhook
node (our very first node). In its settings on the right, you'll see a "Webhook URL." Click the "Copy" button next to it.Trigger Your Workflow: Open a new tab in your web browser. Paste the copied "Webhook URL" into the address bar.
Press Enter!
What you should see:
In your web browser, after a moment, you should see the AI-generated summary of the text you provided.
In your n8n workspace, you'll see the nodes light up as the workflow executes, showing the data flowing through each step. You can even click on the nodes after execution to inspect the exact input and output at each stage – a great way to understand workflow automation.
Congratulations! You've successfully built and run your first AI workflow with n8n. You've mastered the basics of AI automation, connected to an AI model, and automated a smart task. This simple setup is the foundation for much more complex and powerful AI automations you can build with n8n.
Want to read more about n8n?
https://community.n8n.io
Passionfruit guides:
Generative Engine Optimisation Guide (GEO) for ChatGPT, Perplexity, Gemini, Claude, Copilot