How to build an n8n AI Agent That Plans Your Content Calendar: step-by-step guide with screenshots
Updated
Build an AI agent for Harbor & Pine Coffee Roasters that turns one campaign theme into a two-week email and content calendar in 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 ad copy. That is great for one person. But what if the AI planned a whole campaign calendar and saved it to a spreadsheet your team can review? 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 planning a calendar costs fractions of a cent.

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 give the agent a campaign theme.

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 give it a campaign theme, and it can plan the calendar and save it 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 Harbor and Pine Coffee Roasters.

Step 19: Add a system message
Pick system message. This is the standing instruction the agent reads before every request. It is where we tell it who Harbor and Pine is, how the copy should sound, and how to format the calendar.

Step 20: Write the system prompt
Here is the actual prompt. It describes Harbor and Pine, sets the tone, limits emails to two a week, and tells the agent what to return: date, channel, topic, draft copy, and status. It also tells the agent to use the Google Sheets tool when you ask it to save.

You are the campaign planning assistant for Harbor & Pine Coffee Roasters. Harbor & Pine Coffee Roasters is a small online coffee brand that roasts in small batches and sells whole-bean and ground coffee, gift boxes, and a monthly subscription. The audience is home coffee drinkers and people buying coffee as a gift. The tone should be warm, plain, and specific about flavor. Never pushy. Your job is to turn one campaign theme into a two-week email and content calendar. When planning a calendar: - Mix email with Instagram and Facebook posts - Send no more than 2 emails a week - Give every item a different angle: launch, how it is made, how to brew it, gifting, customer questions - Only mention offers the user gives you. Never invent a discount For each calendar item, return: - Date - Channel - Topic - Draft Copy (one or two sentences) - Status (always "Draft") When the user asks you to save the calendar, use the Google Sheets tool to store each item. Do not make health claims or invent reviews. Keep it practical and specific.
Step 21: Back to the canvas
That gives the agent everything it needs to know about Harbor and Pine. 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 planning a content calendar. 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 the calendar, because it would not remember which calendar you meant.

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 Google Sheets so it can save every calendar item 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, with columns matching what the system prompt tells it to return. When you say save the calendar, each item becomes 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 Date.

Step 39: Channel
B1 — Channel.

Step 40: Topic
C1 — Topic.

Step 41: Draft Copy
Cell D1 — Draft Copy.

Step 42: Status
And E1 — Status. Five columns, matching exactly what the system prompt tells the agent to generate. Each calendar item 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 calendar item the agent plans gets added as a new row at the bottom of the sheet.

Step 55: Choose the spreadsheet
Now pick the spreadsheet.

Step 56: Campaign Calendar
Campaign Calendar — the sheet we set up with columns for date, channel, topic, draft copy, and status.

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 Date 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 Channel column
Channel. Same thing — click the purple button.

Step 61: Map the Topic column
Topic.

Step 62: Map the Draft Copy column
Draft copy.

Step 63: Map the Status column
And status. 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: Give it a campaign
Give it one campaign theme.

Step 67: Send the message
Send it off. The agent reads your system prompt and plans two weeks of emails and posts in the exact format you asked for.

Step 68: Save to the sheet
Six items over two weeks — three emails and three posts, each with its own angle and a draft line of copy. Now tell it to save them. 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 item as a row — date, channel, topic, draft copy, and status.

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 “Build an n8n AI Agent That Plans Your Content Calendar” step by stepBuild an n8n AI Agent That Plans Your Content Calendar: lesson overview · All free tutorials