Intro to AI Automation · Module 5 of 6

AI Social Media Idea Agent

n8nIntermediate~12 min practice69 steps

Why this matters

A marketing agency wants fresh social post ideas every week that the whole team can review. Today someone asks ChatGPT, copies the answer, pastes it into a shared spreadsheet and tidies the columns. It takes half an hour, and it only happens when that person remembers.

The Custom GPT from Module 1 writes well, but it cannot put anything anywhere. A person still sits in the middle, copying and pasting.

In this module the AI stops being a chat you copy from. You build an AI agent in n8n that writes the ideas and saves them as rows in a Google Sheet on its own. That is the step from "AI helps me" to "AI does the job".

Robert’s intro to this module

What you’ll build

A working n8n workflow for BrightPath Marketing: a chat box you can type to, an AI agent with a system prompt that knows the brand, a model to think with, memory so it remembers the conversation, and a Google Sheets tool so it can save its work.

You test it with two messages: "give me three post ideas", then "save those ideas". Three new rows appear in the sheet, one per idea, with the platform, topic, hook, description and call to action.

It is the longest module in the course (about 12 minutes). The Steps menu in the practice lets you stop and come back to any chapter.

What you need

  • Nothing to start the practicen8n, the OpenAI key and the Google sign-in are practice copies inside the lesson.
  • An n8n account, to build it for realThe free trial at n8n.io is enough.
  • An OpenAI API key with a little creditFrom platform.openai.com (the developer side, not ChatGPT). About $10 of credit lasts a long time. Or use n8n’s free AI credits instead.
  • A Google accountThe one that will own the Social Media Ideas spreadsheet.

Concepts

4 ideas you’ll use in the practice.

Workflows, nodes and triggers

n8n is a visual automation tool. A workflow is one automation. You build it from boxes called nodes, connected left to right, and n8n runs them in order.

The first node is always a trigger: the thing that starts the workflow. Here it is a chat message, so you can talk to the agent. Later it could be a form, an email or a time of day.

An agent is an AI that can take action

A chatbot answers. An agent can also act, using tools you give it: write a row to a sheet, send an email, look something up.

You stay in charge of what it is allowed to do. It can only use the tools you plug in, and it follows the system prompt you write, which works like the instructions in your Custom GPT.

Keys and credentials

An API key is a long secret code that lets n8n use OpenAI’s models. It is also how OpenAI knows who to bill, so a key with no credit behind it just returns errors.

n8n saves the key as a credential: a stored login you set up once and reuse in every workflow. Google works the same way, except you sign in with Google instead of pasting a key. Treat keys like passwords and never paste them into a chat or a document.

Memory makes a conversation work

Without memory, every message is the first message. "Save those ideas" means nothing if the agent has already forgotten the ideas.

Simple memory keeps the last few messages of the chat, which is all this agent needs.

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.

n8nAI Social Media Idea Agent69 steps · ~12 min · nothing touches your real accounts

Do it for real

Now repeat it in your own account. Tick each step as you go.

Downloads

Quick check

3 questions to check you’ve got it.

1. What is the difference between a chatbot and an agent?

  • An agent is a newer model
  • An agent can take actions with the tools you give it
  • A chatbot cannot answer questions
Show the answer

An agent can take actions with the tools you give it. Both answer. Only the agent can also act, like writing rows into a Google Sheet.

2. Where does the OpenAI API key come from?

  • Your ChatGPT settings
  • platform.openai.com, the developer side of OpenAI
  • n8n creates it for you
Show the answer

platform.openai.com, the developer side of OpenAI. API keys live at platform.openai.com, and they need a little credit to work. A ChatGPT subscription does not include API credit.

3. You ask the agent to "save those ideas" and nothing is saved. Which piece is most likely missing?

  • Memory
  • The chat trigger
  • A longer system prompt
Show the answer

Memory. Without memory the agent has forgotten the ideas from your first message, so there is nothing to save.

Up next · Module 6

Build a Web App with an AI Backend

Your agent still waits for you to type to it. Next, a website form sets the whole thing off: every visitor’s question is saved and answered while you do something else.

Start module 6 →