▶ Stepthrough All tutorials Blog Glossary Prompts Videos Visual guides Cheat sheets Comparisons Start Learning Free

n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: video walkthrough

Updated

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

8:07 · 12 chapters · 69 steps · narrated with the lesson’s own voice-over · Watch on YouTube

Chapters

Click a chapter to jump the video there.

  1. 0:00 Intro: what you'll build
  2. 0:12 Get n8n
  3. 0:46 API key
  4. 1:57 Chat trigger
  5. 2:30 AI Agent
  6. 2:42 System prompt
  7. 3:27 Chat model
  8. 4:16 Memory
  9. 4:35 Sheets tool
  10. 4:53 Create the spreadsheet
  11. 5:43 Configure Sheets
  12. 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 step

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

Read the step-by-step guide with screenshots · n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: lesson overview · All free videos