n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: step-by-step guide with screenshots
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.
About the screenshots. They come from Stepthrough’s simulated practice environment (a practice copy of n8n), not the live tool, so no real account appears. The buttons and labels match the real screens the lesson was built against. Practice it yourself free at learn.ynteractive.com.
- Tools: n8n
- Time: about 12 minutes, 69 steps in 12 parts
- Level: beginner, no coding needed
Part 1: Get n8n
Step 1: Go to n8n.io
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.

Step 2: Enter your email
This is just practice, so anything works — it won't actually send anything.

Step 3: Sign up
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.

Part 2: API key
Step 4: Add credit first
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.

Step 5: Ten dollars is plenty
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.

Step 6: Now the key
Balance sorted. Now go to API keys in the left menu.

Step 7: Create a secret key

Step 8: Name the key
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.

Step 9: Create it
Default project, all permissions — that is fine for this. Create the key.

Step 10: Copy it now
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.

Step 11: Back to n8n
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.

Part 3: New workflow
Step 12: Start a new workflow
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.

Part 4: Chat trigger
Step 13: Add the 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.

Step 14: Trigger on a chat message
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.

Step 15: Back to the canvas
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.

Part 5: AI Agent
Step 16: Add the next node
Now we decide what happens when a message comes in.

Step 17: Add the AI Agent
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.

Part 6: System prompt
Step 18: Open the options
Right now this agent has no personality and no orders. It does not know it works for BrightPath Marketing.

Step 19: Add a system message
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.

Step 20: Write the system prompt
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.
Step 21: Back to the canvas
That gives the agent everything it needs to know about BrightPath Marketing. Close the node.

Part 7: Chat model
Step 22: Give the agent a brain
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.

Step 23: Pick OpenAI
OpenAI chat model. This is where that API key finally gets used.

Step 24: Open the credentials
And here is where that key you copied finally goes.

Step 25: Create a new credential
You want create new credential, right at the bottom.

Step 26: Paste the key
This is the one moment it matters that you copied it — remember, OpenAI never shows it to you again.

Step 27: Save the credential
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.

Step 28: Open the model list
Now the model dropdown.

Step 29: Choose the model
GPT five mini. Fast, cheap, and plenty for generating social media ideas. Do not reach for the expensive model until you have a reason.

Step 30: Back to the canvas
That is the brain wired in. Close it up.

Part 8: Memory
Step 31: Add 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.

Step 32: Simple Memory
Simple memory is fine here — it keeps the recent conversation inside n8n, no database, no extra credentials.

Part 9: Sheets tool
Step 33: Add a 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.

Step 34: Add 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.

Part 10: Create the spreadsheet
Step 35: Back to the canvas
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.

Step 36: Open Google Sheets
Switch to Google Sheets. You need to create the spreadsheet that this node will write to.

Step 37: Name the spreadsheet
First, name it so you can find it later.

Step 38: Type the first column header
Now set up the column headers. These need to match what the system prompt tells the agent to generate. In A1, type Platform.

Step 39: Post Topic
B1 — Post Topic.

Step 40: Hook
C1 — Hook.

Step 41: Description
D1 — Description.

Step 42: Call to Action
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.

Step 43: Back to n8n
The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.

Step 44: Open the Sheets node
Double click the Google Sheets node to open it back up. Now we can connect it to the spreadsheet we just made.

Part 11: Configure Sheets
Step 45: Add a credential
Now we need to connect this to a real Google account.

Step 46: Create a new credential
Create new credential — this one uses Google OAuth instead of an API key, so it is going to open a sign-in window.

Step 47: Sign in with Google
This opens the Google account chooser so you can pick which account to connect.

Step 48: Choose your account
Pick the Google account you want n8n to use. This is the account that owns the spreadsheet.

Step 49: Allow Sheets access
Google is asking what n8n is allowed to do. Check the first box — this lets n8n read and write your spreadsheets.

Step 50: Allow Drive access
Second box — n8n needs Drive access so it can find your spreadsheets by name.

Step 51: Allow external service
Last one — this lets Google connect to n8n as an external service. Check it.

Step 52: Sign in
All three checked.

Step 53: Pick the operation
Now we tell the node what to do. By default it reads rows, but we want to add rows.

Step 54: Append Row
Append row. Every time the agent generates an idea, it adds a new row to the bottom of the sheet.

Step 55: Choose the spreadsheet
Now pick the spreadsheet.

Step 56: Social Media Ideas
Social Media Ideas — that is the sheet we set up with columns for platform, topic, hook, description, and call to action.

Step 57: Pick the sheet tab
Now pick which tab inside that spreadsheet.

Step 58: Sheet1
Sheet one — it is the only tab, so this is simple.

Step 59: Map the Platform column
Now the columns. Each column has a purple button — click it and the AI agent figures out what data goes there.

Step 60: Map the Post Topic column
Post Topic. Same thing — click the purple button.

Step 61: Map the Hook column
Hook.

Step 62: Map the Description column
Description.

Step 63: Map the Call to Action column
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.

Step 64: Back to the canvas
The sheets tool is fully wired up — credential, operation, spreadsheet, sheet, and column mapping. Close it and let us test this thing.

Part 12: Test the agent
Step 65: Open the chat
Everything is connected. Time to see if it works.

Step 66: Ask for ideas
Ask it for social media ideas.

Step 67: Send the message
Send it off. The agent reads your system prompt, thinks about BrightPath Marketing, and generates three ideas with the exact format you asked for.

Step 68: Save to the sheet
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.

Step 69: Send it
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.

Now do it yourself, free
Reading the steps is a start. Doing them is how it sticks. 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 stepWatch the 8:07 video walkthrough · n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: lesson overview · All free tutorials