Quick answer
To build your first AI agent in n8n, connect a chat trigger, the AI Agent node, a system prompt, a chat model such as OpenAI, memory, and a tool the agent can use, like Google Sheets. In this free tutorial you build one that writes social media post ideas and saves each one as a new row in a sheet.
Last updated · Last checked
Updated . Built against the tool’s current screens and checked step by step. How we check this lesson
A chatbot talks. An agent does things. In this free n8n AI agent tutorial you build an agent for BrightPath Marketing that comes up with social media post ideas and then writes them straight into a Google Sheet your team can review.
At a glance
| Question | Answer |
|---|---|
| What you build | Build an AI agent for BrightPath Marketing that generates social media post ideas and saves them to Google Sheets — chat trigger, AI Agent, system prompt, model, memory, and the Sheets tool. |
| Tools | n8n |
| Time | About 12 minutes, 72 steps in 12 parts |
| Level | Intermediate |
| Cost | Free |
| Ways to learn it | Practice it step by step, watch the video |
The 12 parts, in short
- Get n8n: Go to n8n.io, Enter your email, Sign up.
- API key: Add credit first, Ten dollars is plenty, Now the key, Create a secret key, and 4 more steps.
- New workflow: Start a new workflow.
- Chat trigger: Add the first step, Trigger on a chat message, Back to the canvas.
- AI Agent: Add the next node, Open the AI nodes, Add the AI Agent.
- System prompt: Open the options, Add a system message, Write the system prompt, Back to the canvas.
- Chat model: Give the agent a brain, Pick OpenAI, Open the credentials, Create a new credential, and 5 more steps.
- Memory: Add memory, Simple Memory, Back to the canvas.
- Sheets tool: Add a tool, Search for Sheets, Add Google Sheets.
- Create the spreadsheet: Back to the canvas, Open Google Sheets, Name the spreadsheet, Type the first column header, and 6 more steps.
- Configure Sheets: Add a credential, Create a new credential, Sign in with Google, Choose your account, and 16 more steps.
- Test the agent: Open the chat, Ask for ideas, Send the message, Save to the sheet, and 1 more step.
In the course: Part 1 · Intro to AI Automation (Module 3 of the full course)
Part of: Intro to AI Automation (step 2 of 4). Next up: Lovable + n8n: Build a Web App with an AI Backend
Part of: AI for Consulting & Agencies (step 21 of 34). Next up: Gmail AI Triage: Auto-Label Every Email and Draft Replies
Part of: AI for Marketing Teams (step 30 of 46). Next up: Gmail AI Triage: Auto-Label Every Email and Draft Replies
Part of: n8n Jump Start (step 11 of 23). Next up: n8n AI Agent with Tools: Check Google Calendar, Book It and Log It
Part of: AI Agents 101 (step 8 of 16). Next up: n8n AI Agent with Tools: Check Google Calendar, Book It and Log It
Part of: Safe AI Agents: Approvals, Guardrails and Audit Trails (step 6 of 11). Next up: Guardian: Make Your n8n AI Agent Ask Before It Emails a Customer
Part of: n8n Intermediate: Real Business Workflows (step 13 of 17). Next up: Get Alerted When an n8n Automation Fails, and Let It Retry by Itself
n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: video walkthrough
The whole lesson in 8:07, narrated step by step.
Simulated practice environment. Recorded in Stepthrough’s simulated practice environment, not the live tool. Practice it yourself free at learn.ynteractive.com.
Chapters
Click a chapter to jump the video there.
- 0:00 Intro: what you'll build
- 0:12 Get n8n
- 0:46 API key
- 1:57 Chat trigger
- 2:30 AI Agent
- 2:42 System prompt
- 3:27 Chat model
- 4:16 Memory
- 4:35 Sheets tool
- 4:53 Create the spreadsheet
- 5:43 Configure Sheets
- 7:24 Test the agent
Now do it yourself, free
Watching is the warm-up. The interactive lesson puts you in a practice copy of n8n: you do every step yourself, it checks your work, and “Do it for me” finishes any step you get stuck on. Nothing touches your real accounts.
Practice “n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets” step by stepFull transcript
Intro: what you'll build
0:00 Now we automate. You'll build an AI agent in n8n, a chat trigger, an open AI model, memory, and a Google Sheets tool. So every idea it comes up with saves itself. Let's build it.
Get n8n
0:11 In the last lesson you built a Custom GPT that writes social media posts in your brand voice. That is great for one person. But what if you want the AI to generate ideas, save them to a spreadsheet, and let your whole team review them? That is what we are building now. First, you need an n8n account. Click get started free.
0:30 Type an email address. This is just practice, so anything works — it won't actually send anything.
0:36 Now click continue. In the real n8n, it sends you a six digit code, then asks for a name, a password, and an account name. Go do that in your own browser later, then come back and we will build.
API key
0:46 Your agent needs a brain, and that means an API key from OpenAI. Go to platform dot openai dot com — that is the developer side, not ChatGPT, and it bills completely separately. Before you make a key, put some money on the account. A brand new key with a zero balance just returns errors. Click add to credit balance.
1:04 Ten dollars goes a very long way. You are charged per request, not per month, and generating social media ideas costs fractions of a cent per request. Click continue — in your own account it asks for a card at this point.
1:16 Balance sorted. Now go to API keys in the left menu.
1:19 Click create new secret key.
1:21 Name it after whatever is going to use it. Future you, staring at a list of forty keys, will thank you. I am calling this one n8n agent.
1:28 Default project, all permissions — that is fine for this. Create the key.
1:33 Now pay attention, because this is the only time you will ever see this key. Copy it and paste it into n8n, or into your password manager. If you lose it, you do not get it back — you delete it and make another.
1:45 Click done. One last warning — this key can spend your money. Never commit it to code, never paste it into a chat, and if it ever shows up on screen while you are recording, revoke it before you publish.
Chat trigger
1:56 Now you are inside n8n. This overview page lists every workflow you have. Top right, click create workflow, and you land on an empty canvas.
2:04 Every workflow needs a trigger — the thing that kicks it off. We want a chat trigger so you can talk to the agent and ask it for social media ideas. Click add first step.
2:13 A panel slides in with every way a workflow can start — manually, on a schedule, on a webhook. We want on chat message, so we can have a conversation with the agent.
2:21 n8n opens the node so you can configure it. There is nothing we need to change here, so close it with the X in the top right and get back to the canvas.
AI Agent
2:30 Now we decide what happens when a message comes in. Click the plus on the right edge of the trigger.
2:35 There it is — AI Agent. This is the piece that can plan and then carry out actions using whatever tools you give it. You ask it for social media ideas, and it can generate them and save them to a spreadsheet — all in one step.
System prompt
2:41 Right now this agent has no personality and no orders. It does not know it works for BrightPath Marketing. Scroll down to options and click add option.
2:49 Pick system message. This is the standing instruction — the thing the agent reads before every single request. It is where we tell it who BrightPath Marketing is, what the brand voice sounds like, and how to format the ideas.
3:01 Here is the actual prompt. Notice what it does: it describes BrightPath Marketing, defines the target audience, sets the brand voice, and tells the agent exactly what format to return — platform, topic, hook, description, and call to action. It also tells the agent to use the Google Sheets tool when you ask it to save ideas. Click paste system prompt.
3:21 That gives the agent everything it needs to know about BrightPath Marketing. Close the node.
Chat model
3:26 See that red triangle on the agent? It is complaining because it has no model. An agent can plan, but it cannot think without a language model underneath it. Click the plus under chat model.
3:36 OpenAI chat model. This is where that API key finally gets used.
3:40 And here is where that key you copied finally goes. Click the credential dropdown.
3:44 You want create new credential, right at the bottom.
3:47 Paste the key straight in. This is the one moment it matters that you copied it — remember, OpenAI never shows it to you again.
3:54 Hit save. n8n tests the connection straight away, and from now on this credential is available to every node in every workflow — you only do this once.
4:03 Now the model dropdown.
4:05 GPT five mini. Fast, cheap, and plenty for generating social media ideas. Do not reach for the expensive model until you have a reason.
4:13 That is the brain wired in. Close it up.
Memory
4:15 Next, memory. Without this, every message starts from nothing — you could not say save those ideas to the sheet, because it would not remember what ideas you were talking about. Click the plus under memory.
4:28 Simple memory is fine here — it keeps the recent conversation inside n8n, no database, no extra credentials.
Sheets tool
4:35 And now the good part — tools. This is what separates an agent from a chatbot. A chatbot just talks. An agent does things. We are going to give it access to Google Sheets so it can save social media ideas directly into a spreadsheet your team can review. Click the plus under tool.
4:52 Google Sheets tool. Now the agent can write rows into a real spreadsheet. You would point it at a sheet with columns for platform, post topic, hook, description, and call to action — matching exactly what the system prompt tells it to generate. When you say save those ideas, the agent writes each one as a row.
Create the spreadsheet
4:53 Before we set this up, we need to actually create the spreadsheet. Close this node for now — we are going to hop over to Google Sheets and make one.
5:00 Switch to Google Sheets. You need to create the spreadsheet that this node will write to.
5:04 First, name it so you can find it later. Click the title up top — it says untitled spreadsheet — and type Social Media Ideas.
5:12 Now set up the column headers. These need to match what the system prompt tells the agent to generate. In A1, type Platform.
5:18 B1 — Post Topic.
5:20 C1 — Hook.
5:22 D1 — Description.
5:23 And E1 — Call to Action. Five columns, matching exactly what the system prompt tells the agent to generate. When the agent saves ideas, each one becomes a row in this sheet.
5:33 The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.
5:37 Double click the Google Sheets node to open it back up. Now we can connect it to the spreadsheet we just made.
Configure Sheets
5:43 Now we need to connect this to a real Google account. Click the credential dropdown.
5:47 Create new credential — this one uses Google OAuth instead of an API key, so it is going to open a sign-in window.
5:54 Click sign in with Google. This opens the Google account chooser so you can pick which account to connect.
6:00 Pick the Google account you want n8n to use. This is the account that owns the spreadsheet.
6:05 Google is asking what n8n is allowed to do. Check the first box — this lets n8n read and write your spreadsheets.
6:12 Second box — n8n needs Drive access so it can find your spreadsheets by name.
6:17 Last one — this lets Google connect to n8n as an external service. Check it.
6:22 All three checked. Click continue and Google hands the credential back to n8n.
6:26 Now we tell the node what to do. By default it reads rows, but we want to add rows. Click the operation dropdown.
6:32 Append row. Every time the agent generates an idea, it adds a new row to the bottom of the sheet.
6:38 Now pick the spreadsheet. Click the document dropdown.
6:41 Social Media Ideas — that is the sheet we set up with columns for platform, topic, hook, description, and call to action.
6:48 Now pick which tab inside that spreadsheet. Click the sheet dropdown.
6:52 Sheet one — it is the only tab, so this is simple.
6:55 Now the columns. Each column has a purple button — click it and the AI agent figures out what data goes there. Click the purple button next to Platform.
7:03 Post Topic. Same thing — click the purple button.
7:05 Hook.
7:06 Description.
7:08 And call to action. Each one is now set to defined automatically by the model — the agent reads your column headers and figures out what goes where.
7:15 The sheets tool is fully wired up — credential, operation, spreadsheet, sheet, and column mapping. Close it and let us test this thing.
Test the agent
7:24 Everything is connected. Time to see if it works. Click open chat at the bottom of the canvas.
7:28 Ask it for social media ideas. Type this prompt and see what comes back.
7:33 Send it off. The agent reads your system prompt, thinks about BrightPath Marketing, and generates three ideas with the exact format you asked for.
7:41 It came back with three solid ideas — LinkedIn, Instagram, Facebook — each with a hook, description, and call to action. Now tell it to save them to the sheet. This is where the Google Sheets tool kicks in.
7:51 Send it. The agent uses the Google Sheets tool to write each idea as a row — platform, topic, hook, description, call to action — exactly like the system prompt told it to.
8:01 Simple as that. We show you and you do it. Sign up below to learn AI automation for free.
Watch the 30-second version
2 short videos from this lesson. Watch, then do it yourself in the free practice copy.
0:22Myth: ChatGPT Plus pays for your agent
Myth: you pay for ChatGPT, so your AI agent is covered. Fact: your agent uses an API key, billed separately. Add credit at platform.openai.com; $10 goes a long way. And that key? You only see it once. Copy it somewhere…
Transcript
Myth: you pay for ChatGPT, so your AI agent is covered. Fact: your agent uses an API key, billed separately. Add credit at platform.openai.com; $10 goes a long way. And that key? You only see it once. Copy it somewhere safe.
0:13n8n AI Agent – Myth: You need to code to build an AI agent
n8n AI Agent tip: Myth: you need to write code to build an AI agent. Fact: in n8n you connect steps: a chat trigger, an AI Agent, a model, memory and tools. Our free lesson builds one that saves post ideas to Google…
Transcript
n8n AI Agent tip: Myth: you need to write code to build an AI agent. Fact: in n8n you connect steps: a chat trigger, an AI Agent, a model, memory and tools. Our free lesson builds one that saves post ideas to Google Sheets, one click at a time.

What you will build
You will build a working AI agent inside n8n, the workflow automation tool. You chat with it, ask for social media ideas, and it returns three ideas for LinkedIn, Instagram and Facebook, each with a topic, a hook, a short description and a call to action. Then you tell it to save them, and it adds each idea as a new row in a spreadsheet called Social Media Ideas.
Along the way you wire together the five parts almost every n8n agent uses: a trigger, the AI Agent node, a system prompt, a chat model, memory and a tool.
Who this is for
This module is for people who have used ChatGPT and want the AI to take action, not just answer. It follows the Custom GPT module: there you still had to copy the output by hand, and here the agent saves its own work. No coding is needed. If you have never opened n8n, the lesson starts at the sign-up page.
What you need
- An n8n account (n8n Cloud or your own instance).
- A model to power the agent: either an OpenAI API account with some credit on it (platform.openai.com, billed separately from a ChatGPT subscription), or n8n's own free credits. New n8n accounts include them: in the OpenAI Chat Model node, pick Gateway credits in the Credential list and you can skip the key.
- A Google account for Google Sheets.
Why the agent works
The system prompt and the spreadsheet use the same five fields. Because the prompt tells the agent to return a platform, topic, hook, description and call to action, and the sheet has columns with those exact names, the agent can match each piece to the right column on its own. That is what the sparkle buttons do: they let the model decide the value for each column instead of you mapping fields by hand.
Memory is the quiet hero. Without it, every message starts from nothing, and "save those ideas" would mean nothing to the agent. With Simple Memory, the recent conversation stays inside n8n with no extra database or credentials.
The lesson also builds good habits around the OpenAI key. You add credit before creating the key, because a key with a zero balance only returns errors. You name the key after what uses it, so you can find and revoke it later. And you save it once as an n8n credential, which every future workflow can reuse without you pasting it again.
How to use this in your business
Swap BrightPath Marketing for your own company in the system prompt and you have an idea generator your whole team can review in a shared sheet. Beyond social posts, the same shape fits blog topics, email subject lines, ad angles or product descriptions. Anything you ask ChatGPT for today and then paste into a spreadsheet is a candidate. Once the agent pattern clicks, you can give it other tools, like Gmail, which is exactly what the next module does.
How the practice works
Each step is demonstrated on the left under Watch, then you repeat it on the right under Your turn, in a practice copy of n8n, OpenAI and Google Sheets. Every click is checked, and Do it for me finishes a step if you get stuck. No account is created, no key is made and nothing is billed.
Try it yourself, free
Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of n8n, checks each step, and never touches your real accounts.
Start “n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets”Step by step: n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets
All 72 steps of the interactive module, in order. In the module you watch each one, then do it yourself in a practice copy that checks your work.
1. Get n8n
- Go to n8n.io. This is n8n.io, the home page of the automation tool you will build in. Nothing to read yet: click either Get started free button (top right or in the middle).
This is the n8n website. In the last lesson you built a Custom GPT that writes social media posts in your brand voice. That is great for one person. But what if you want the AI to generate ideas, save them to a spreadsheet, and let your whole team review them? That is what we are building now. First, you need an n8n account.
- Enter your email. Type any email address — this is practice, so a fake one is fine.
This is just practice, so anything works — it won't actually send anything.
- Sign up. Click Continue. n8n emails you a code, then asks for a name and password — do that part on your own and come back here.
In the real n8n, it sends you a six digit code, then asks for a name, a password, and an account name. Go do that in your own browser later, then come back and we will build.
2. API key
- Add credit first. Practice only: no card, no charge. Your agent needs a model to think with, and in the real world that is an OpenAI key with a little credit behind it. This is platform.openai.com → Billing. Click Add to credit balance. (Rather not spend anything later? New n8n accounts include free credits: pick Gateway credits on the model step instead of a key.)
Your agent needs a brain, and that means an API key from OpenAI. Go to platform dot openai dot com — that is the developer side, not ChatGPT, and it bills completely separately. Before you make a key, put some money on the account. A brand new key with a zero balance just returns errors. If you would rather not spend anything yet, n8n gives every new account free credits. In your own n8n, you can pick gateway credits on the model step and skip the key.
- Ten dollars is plenty. Ten dollars goes a long way — you pay per request, not per month. Click Continue. In your own account you add a card here.
Ten dollars goes a very long way. You are charged per request, not per month, and generating social media ideas costs fractions of a cent per request.
- Now the key. Balance sorted. Click API Keys in the left menu.
Balance sorted. Now go to API keys in the left menu.
- Create a secret key. Click + Create new secret key.
- Name the key. Name it after what will use it. Type n8n agent.
Name it after whatever is going to use it. Future you, staring at a list of forty keys, will thank you. I am calling this one n8n agent.
- Create it. Leave Project and Permissions alone and click Create secret key.
Default project, all permissions — that is fine for this. Create the key.
- Copy it now. This is the only time OpenAI shows you the key. Click Copy, then paste it somewhere safe.
Now pay attention, because this is the only time you will ever see this key. Copy it and paste it into n8n, or into your password manager. If you lose it, you do not get it back — you delete it and make another.
- Back to n8n. Click Done. Treat that key like a password — never paste it into a chat, a repo, or a screen recording.
One last warning — this key can spend your money. Never commit it to code, never paste it into a chat, and if it ever shows up on screen while you are recording, revoke it before you publish.
3. New workflow
- Start a new workflow. This is your n8n home. Click Create workflow in the top right.
Now you are inside n8n. This overview page lists every workflow you have. Top right, click create workflow, and you land on an empty canvas.
4. Chat trigger
- Add the first step. Every workflow starts with a trigger. Click Add first step…
Every workflow needs a trigger — the thing that kicks it off. We want a chat trigger so you can talk to the agent and ask it for social media ideas.
- Trigger on a chat message. The trigger panel opened on the right. Pick On chat message near the bottom.
A panel slides in with every way a workflow can start — manually, on a schedule, on a webhook. We want on chat message, so we can have a conversation with the agent.
- Back to the canvas. n8n opens the node so you can configure it. Nothing to change here — click the × in the top right.
n8n opens the node so you can configure it. There is nothing we need to change here, so close it with the X in the top right and get back to the canvas.
5. AI Agent
- Add the next node. Click the + on the right edge of the trigger node.
Now we decide what happens when a message comes in.
- Open the AI nodes. The What happens next? panel opens with categories. Click AI at the top.
A panel opens and asks what happens next. The agent lives under AI, right at the top.
- Add the AI Agent. In AI Nodes, click AI Agent — it makes a plan and carries it out using the tools you give it.
There it is — AI Agent. This is the piece that can plan and then carry out actions using whatever tools you give it. You ask it for social media ideas, and it can generate them and save them to a spreadsheet — all in one step.
6. System prompt
- Open the options. The agent has no personality yet. Click + Add Option under Options.
Right now this agent has no personality and no orders. It does not know it works for BrightPath Marketing.
- Add a system message. Choose System Message. This is the standing instruction the agent follows every time.
Pick system message. This is the standing instruction — the thing the agent reads before every single request. It is where we tell it who BrightPath Marketing is, what the brand voice sounds like, and how to format the ideas.
- Write the system prompt. The box starts with You are a helpful assistant. Replace it with the standing instruction: it is long, so just Paste in the system prompt on the box.
Here is the actual prompt. Notice what it does: it describes BrightPath Marketing, defines the target audience, sets the brand voice, and tells the agent exactly what format to return — platform, topic, hook, description, and call to action. It also tells the agent to use the Google Sheets tool when you ask it to save ideas.
You are a social media content assistant for BrightPath Marketing. BrightPath Marketing is a digital marketing agency that helps small and midsize businesses with SEO, paid advertising, social media marketing, and website design. The target audience is business owners and marketing managers. The brand voice should be helpful, practical, professional, and approachable. Your job is to create useful social media post ideas based on the user's request. When generating ideas, focus on topics that educate potential customers, demonstrate marketing expertise, answer common questions, and help business owners improve their marketing. For each idea, return: - Platform - Post Topic - Hook - Short Description - Suggested Call to Action When the user asks you to save the ideas, use the Google Sheets tool to store each idea. Do not invent statistics or make unsupported claims. Keep the ideas practical and specific.
- Back to the canvas. That tells the agent who it works for and how to format ideas. Close the node with the ×.
That gives the agent everything it needs to know about BrightPath Marketing. Close the node.
7. Chat model
- Give the agent a brain. The agent has a red warning: it has no model. Click the + under Chat Model.
See that red triangle on the agent? It is complaining because it has no model. An agent can plan, but it cannot think without a language model underneath it.
- Pick OpenAI. Click OpenAI Chat Model.
OpenAI chat model. This is where that API key finally gets used.
- Open the credentials. Here is where that key goes. Click the Credential dropdown.
And here is where that key you copied finally goes.
- Create a new credential. Click + Create new credential at the bottom of the list. (Free credits instead? Pick Gateway credits in your own n8n.)
You want create new credential, right at the bottom. In your own n8n, if you skipped the key, you would pick gateway credits here instead.
- Paste the key. Paste in the API key on the field to drop in the key you copied from OpenAI.
This is the one moment it matters that you copied it — remember, OpenAI never shows it to you again.
- Save the credential. Click Save. n8n tests the connection and stores the key for every future node.
n8n tests the connection straight away, and from now on this credential is available to every node in every workflow — you only do this once.
- Open the model list. A new credential leaves Model on Select a model.... Click the Model dropdown.
Now the model dropdown.
- Choose the model. Pick gpt-5-mini — fast and cheap, plenty for this. (The list is long: type gpt-5-mini in Search... to find it.)
GPT five mini. Fast, cheap, and plenty for generating social media ideas. Do not reach for the expensive model until you have a reason.
- Back to the canvas. The model is wired up. Close the node with the ×.
That is the brain wired in. Close it up.
8. Memory
- Add memory. Without memory the agent forgets each message. Click the + under Memory.
Next, memory. Without this, every message starts from nothing — you could not say save those ideas to the sheet, because it would not remember what ideas you were talking about.
- Simple Memory. Pick Simple Memory. It keeps the recent conversation in n8n itself.
Simple memory is fine here — it keeps the recent conversation inside n8n, no database, no extra credentials.
- Back to the canvas. n8n opens Simple Memory so you can set it up. The defaults are fine (it keeps the last 5 messages). Close it with the ×.
n8n opens simple memory so you can set it up. The defaults are fine. It keeps the last five messages. Close it with the X.
9. Sheets tool
- Add a tool. Tools are how the agent acts on the world. Click the + under Tool.
And now the good part — tools. This is what separates an agent from a chatbot. A chatbot just talks. An agent does things. We are going to give it access to Google Sheets so it can save social media ideas directly into a spreadsheet your team can review.
- Search for Sheets. Google Sheets is not in Recommended Tools. In Search nodes..., type sheets.
Google Sheets is not in the recommended tools, so search for it.
- Add Google Sheets. Click Google Sheets Tool — read, update and write data to Google Sheets.
Google Sheets tool. Now the agent can write rows into a real spreadsheet. You would point it at a sheet with columns for platform, post topic, hook, description, and call to action — matching exactly what the system prompt tells it to generate. When you say save those ideas, the agent writes each one as a row.
10. Create the spreadsheet
- Back to the canvas. Before we configure this node, we need a spreadsheet for the agent to write to. Close the node — we will come back.
Before we set this up, we need to actually create the spreadsheet. Close this node for now — we are going to hop over to Google Sheets and make one.
- Open Google Sheets. Click the Google Sheets tab to create a new blank spreadsheet.
Switch to Google Sheets. You need to create the spreadsheet that this node will write to.
- Name the spreadsheet. Click the title and rename it to Social Media Ideas.
First, name it so you can find it later.
- Type the first column header. In cell A1, type Platform.
Now set up the column headers. These need to match what the system prompt tells the agent to generate. In A1, type Platform.
- Post Topic. In cell B1, type Post Topic.
B1 — Post Topic.
- Hook. In cell C1, type Hook.
C1 — Hook.
- Description. In cell D1, type Description.
D1 — Description.
- Call to Action. In cell E1, type Call to Action. That is all five columns — matching the system prompt.
And E1 — Call to Action. Five columns, matching exactly what the system prompt tells the agent to generate. When the agent saves ideas, each one becomes a row in this sheet.
- Back to n8n. The spreadsheet is ready. Click the n8n tab to go back and connect it.
The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.
- Open the Sheets node. Double-click the Google Sheets node (n8n named it Get row(s) in sheet in Google Sheets) to configure it.
Double click the Google Sheets node to open it back up. Now we can connect it to the spreadsheet we just made.
11. Configure Sheets
- Add a credential. The Sheets node needs a Google account. Click the Credential dropdown.
Now we need to connect this to a real Google account.
- Create a new credential. Click + Create new credential to sign in with Google.
Create new credential — this one uses Google OAuth instead of an API key, so it is going to open a sign-in window.
- Sign in with Google. Click Sign in with Google to connect your account.
This opens the Google account chooser so you can pick which account to connect.
- Choose your account. Click your Google account to continue.
Pick the Google account you want n8n to use. This is the account that owns the spreadsheet.
- Allow Sheets access. Google needs permission. Check See, edit, create, and delete all your Google Sheets spreadsheets.
Google is asking what n8n is allowed to do. Check the first box — this lets n8n read and write your spreadsheets.
- Allow Drive access. Check See, edit, create, and delete all of your Google Drive files.
Second box — n8n needs Drive access so it can find your spreadsheets by name.
- Allow external service. Check Connect to an external service.
Last one — this lets Google connect to n8n as an external service. Check it.
- Sign in. All three are checked. Click Continue to complete the Google sign-in.
All three checked.
- Pick the operation. Now tell n8n what to do with the sheet. Click the Operation dropdown.
Now we tell the node what to do. By default it reads rows, but we want to add rows.
- Append Row. Pick Append Row — the agent will add a new row for each idea.
Append row. Every time the agent generates an idea, it adds a new row to the bottom of the sheet.
- Choose the spreadsheet. Click the Document dropdown to pick which spreadsheet to write to.
Now pick the spreadsheet.
- Social Media Ideas. Click Social Media Ideas — the sheet we set up for BrightPath.
Social Media Ideas — that is the sheet we set up with columns for platform, topic, hook, description, and call to action.
- Pick the sheet tab. Click the Sheet dropdown to choose which tab inside the spreadsheet.
Now pick which tab inside that spreadsheet.
- Sheet1. Click Sheet1.
Sheet one — it is the only tab, so this is simple.
- Map the Platform column. Under Values to Send, click the ✦ button next to Platform — the AI agent will fill this in automatically.
Now the columns. Each column has a purple button — click it and the AI agent figures out what data goes there.
- Map the Post Topic column. Click the ✦ button next to Post Topic.
Post Topic. Same thing — click the purple button.
- Map the Hook column. Click the ✦ button next to Hook.
Hook.
- Map the Description column. Click the ✦ button next to Description.
Description.
- Map the Call to Action column. Click the ✦ button next to Call to Action.
And call to action. Each one is now set to defined automatically by the model — the agent reads your column headers and figures out what goes where.
- Back to the canvas. Google Sheets is fully configured. Close the node with the ×.
The sheets tool is fully wired up — credential, operation, spreadsheet, sheet, and column mapping. Close it and let us test this thing.
12. Test the agent
- Open the chat. Time to test. Click Open chat at the bottom of the canvas.
Everything is connected. Time to see if it works.
- Ask for ideas. Type a prompt — ask the agent for social media post ideas.
Ask it for social media ideas.
- Send the message. Click the send arrow to talk to the agent.
Send it off. The agent reads your system prompt, thinks about BrightPath Marketing, and generates three ideas with the exact format you asked for.
- Save to the sheet. Now tell the agent to save those ideas to Google Sheets.
It came back with three solid ideas — LinkedIn, Instagram, Facebook — each with a hook, description, and call to action. Now tell it to save them to the sheet. This is where the Google Sheets tool kicks in.
- Send it. Click the send arrow — the agent will use the Google Sheets tool to write the rows.
Send it. The agent uses the Google Sheets tool to write each idea as a row — platform, topic, hook, description, call to action — exactly like the system prompt told it to.
Screenshots



Frequently asked questions
- What is an AI agent in n8n?
- It is the AI Agent node plus a chat model, optional memory and one or more tools. The model decides what to do, and the tools let it act, for example by writing a row to Google Sheets.
- Is this course really free?
- Yes. Stepthrough is completely free, and the practice copy needs no accounts. To build it for real you need your own n8n, OpenAI and Google accounts, and some of those cost money once you use them for real work.
- How much does the OpenAI API cost for this?
- You pay per request, not per month. The lesson suggests ten dollars of credit, which goes a long way for short requests like these. Check OpenAI's pricing page for current rates. If you would rather not pay yet, new n8n accounts include free credits that the OpenAI Chat Model node can use (pick Gateway credits).
- Why does my agent show a red warning?
- The AI Agent node needs a chat model underneath it. Until you add one, such as the OpenAI Chat Model, n8n flags the node.
- Do I need memory for an n8n agent?
- For a back-and-forth chat, yes. Without memory the agent forgets earlier messages, so a follow-up like "save those ideas" fails.
- Is there a free n8n AI agent tutorial?
- Yes. This n8n AI agent tutorial is free and takes about 12 minutes. You build the agent step by step in a practice copy of n8n: a chat trigger, the AI Agent node, a system prompt, an OpenAI chat model, memory and a Google Sheets tool that saves the ideas.
More n8n tutorials
AI Receipt Extractor: Receipts to Google Sheets with n8nDrop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets.
Free · Live ~12 min Intermediate
n8n AI Email Responder: Draft Gmail Replies AutomaticallyBuild an n8n agent that watches your Gmail, reads each new customer email, and writes a reply as a draft in the same thread, ready for you to check and send.
Free · Live ~12 min Intermediate
Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8nEvery morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address…
Free · Live ~10 min Intermediate
Gmail AI Triage: Auto-Label Every Email and Draft RepliesBuild an n8n workflow that reads each new email, sorts it as a lead, a client or an invoice with a Text Classifier, adds the matching Gmail label, and drafts a reply to…
Free · Live ~18 min Advanced
A Support Agent That Answers from Your Own DocsTurn an n8n chat agent into a support agent that answers only from your policies in a Google Doc, refuses what it should, and hands off to a person by email.
Free · Live ~13 min Advanced
Build an AI Follow-Up Agent for HVAC Service CallsBuild an AI agent for Cedar Ridge Heating & Air that writes follow-up messages for completed service calls and saves them to Google Sheets — chat trigger, AI Agent…
Free · Live ~12 min Intermediate
From the blog
n8n Node Warnings and Errors: What the Red Meansn8n node warnings and errors explained: template warnings, the red triangle on an AI Agent, "Error in sub-node", green checks and item counts.
Nov 7, 2026 6 min read
How to Learn AI from Scratch: The Order That WorksLearn AI for work in the right order: prompts first, then real tasks with a fact check, then simple automation, then agents. Free lessons for each step.
Nov 6, 2026 6 min read
n8n Defined Automatically by the Model, ExplainedWhat "defined automatically by the model" means in n8n tools, when to click the sparkle button, and when a fixed expression is the safer choice.
Oct 25, 2026 6 min read
Visual guides
This lesson’s key ideas as quick visual guides: swipe through the slides, or read the same guide as text.
Build your first AI agent in n8nChatGPT answers. An agent does something with the answer.
Quote from a lesson One graphic
5 Steps to an n8n AI Agent That Saves to Google SheetsA visual guide: build an n8n AI agent that writes social media ideas and saves each one as a Google Sheets row, in 5 steps from the free lesson.
Step-by-step guide 7 slides
Myth: An AI Model Looks Things Up Before It AnswersMyth vs fact: by default a large language model answers from its training plus your prompt. Web search or file lookup is a separate step.
Myth vs fact One graphic
Free cheat sheets
Print it or save the PDF: the key steps and checks from this lesson on one page, free.
n8n AI Agent to Google Sheets Cheat SheetA free one-page cheat sheet for an n8n AI agent: chat trigger, AI Agent, system message, OpenAI model, Simple Memory and a Google Sheets tool.
Lesson cheat sheet Free PDF
Lovable + n8n Form Flow Cheat SheetA free one-page cheat sheet: a Lovable form posts to an n8n webhook, and an AI Agent logs it in Google Sheets and replies by Gmail.
Lesson cheat sheet Free PDF
AI Glossary Cheat Sheet: 30 Terms in Plain EnglishA free one-page cheat sheet of 30 AI and automation terms in plain English: models, prompts, n8n workflows, apps and data.
Topic cheat sheet Free PDF
All free printable cheat sheets
Terms in this lesson
Plain-English definitions, each with an example from a free lesson.
Related prompts
- Case study interview questions prompt: Plan a client interview that gets a case study's before, during and after story in their own words, with follow-up probes and…
- Email subject lines prompt: Get ten honest subject lines for a finished email, each with preview text and a character count, grouped by approach so you can…
- SEO meta description prompt: Write short search-result descriptions for your web pages: what the page offers, who it is for and one reason to click, inside…
- Social post ideas prompt: A four-part ChatGPT prompt for social post ideas built on your services and real customer questions: platform, hook and call to…
More terms on this topic
More prompts on this topic
- Client monthly report prompt: Turn your agency's monthly numbers and work log into a client report: what changed, what you did, what's next. Every number…
- Decline a request politely prompt: A ChatGPT prompt for saying no to a customer clearly and kindly: the no up front, one honest reason, a real alternative, and no…
- Proposal summary prompt: Summarize a full proposal for the decision-maker with a ChatGPT prompt that keeps every price and date exact and lists where…
- Spreadsheet formula helper prompt: Get a Google Sheets or Excel formula for the job you describe, explained piece by piece, with a quick way to test it on a copy…
