Why this matters
A shared inbox with dozens of client emails a day costs more time than it looks: each email is opened, read, and read again later by whoever finally deals with it. A one-line summary with the next step lets the team see what matters first.
In this module you add your first AI step to n8n. Clearview Bookkeeping sends each of three made-up customer emails to OpenAI with one prompt, gets back a summary and a next step, and tidies the answer into fields any app can use. There is no agent yet: just one node that reads and writes, while a person still decides what to do.
What you’ll build
A workflow of three nodes: a manual trigger with three pinned emails, OpenAI Message a model (GPT-4.1-MINI) with one prompt and the email body dragged in, and Edit Fields that outputs from and summary for each email.
What you need
- Nothing to start the practiceThe editor is a practice copy. Nothing is sent to OpenAI. The emails are made up; the summaries are real answers from a test run.
- An n8n account, to do it for realSign up with this link (affiliate link: I may earn a commission, at no cost to you).
- An OpenAI API key, or n8n free creditsNew n8n Cloud accounts may get free OpenAI credits. Otherwise create a key at platform.openai.com and add a few dollars of credit; a summary like this costs a fraction of a cent.
Concepts
3 ideas you’ll use in the practice.
One AI step, one prompt
The OpenAI node's Message a model action sends a prompt to a model and adds the answer to the item. It runs once per item, so three emails means three answers.
Put the instruction in the prompt and drag the data in with an expression, so each email gets its own answer.
Keys and cost
An API key is a password for software. Keep it in a credential, never in a prompt or a field, where it would show in the logs. OpenAI bills your own account for each call through the OpenAI API.
Tidy the answer
The answer arrives nested (output > content > text). An Edit Fields node pulls it out as one simple field, and can reach back to an earlier node for data such as the sender: dragging from it writes $('Node name').item.json.field.
Practice
Do every step yourself in a practice copy of the real tool. It checks your work, and “Do it for me” finishes any step you get stuck on.
Do it for real
Now repeat it in your own account. Tick each step as you go.
Downloads
- n8n Beginner cheat sheet (PDF)Includes the prompt and expression used here.
Quick check
3 questions to check you’ve got it.
1. Three emails go into the OpenAI node. How many answers come out?
- One combined answer
- Three, one per item
- It depends on the model
Show the answer
Three, one per item. Like most nodes, it runs once per item.
2. Where should your OpenAI API key go?
- In the prompt
- In a credential, which n8n stores encrypted
- In an Edit Fields field
Show the answer
In a credential, which n8n stores encrypted. Credentials keep keys out of the workflow and the execution logs.
3. Why add Edit Fields after the OpenAI node?
- To make the answer a simple field next to the sender, ready for the next app
- To call OpenAI again
- Because OpenAI needs it
Show the answer
To make the answer a simple field next to the sender, ready for the next app. The next app (Slack, a sheet, an email) needs plain fields, not nested output.
You reached the end of n8n for Beginners: Your First Automations
You finished n8n Beginner. Next, n8n Intermediate: keep a sheet in sync, send scheduled reports, call any API, catch webhooks and add AI steps a person approves.
Ready for the next step? n8n Intermediate turns your first workflows into ones the business runs on: sheets kept in sync, scheduled reports, any API, webhooks, AI steps people approve, and error alerts.
Next course: n8n Intermediate: Real Business Workflows →