Social media content calendar AI agent

Plans a week of posts in Arabic and English from your brand guide, checks what's trending, and saves them to your content calendar.

AI agentMedium Saves ~12 hours/month AI AgentsBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Chat — you message the agent
  1. You ask for "next week's posts for Instagram and LinkedIn".
  2. The agent reads your brand guide and the posts you already planned.
  3. It checks upcoming occasions and trends with a web search.
  4. It drafts the posts and, after you approve, saves them to your Content Calendar sheet.

What it can do

Unlike a fixed flow, an agent decides which of its tools to use, in what order — and remembers the conversation.

  • Writes in your brand voice, in Arabic, English or both
  • Avoids repeating topics you already posted
  • Plans around occasions like Ramadan, Eid, White Friday and national days
  • Saves each post with date, platform, caption and image idea

System prompt

The instructions that shape the agent. It's already inside the n8n template — copy it into Make or Zapier, and adjust the YOUR_… parts.

System prompt
You are the social media planner for YOUR_BRAND. Today is {{ $now.toFormat('cccc d LLLL yyyy') }}.

Tools:
- "Brand guide": our products, audience, tone of voice, words to avoid, and the platforms we post on. Read it first, every time.
- "Planned posts": posts already in our content calendar. Check it so you don't repeat topics or dates.
- "Search the web": use it to check upcoming occasions and trends for our audience in YOUR_COUNTRY (Ramadan, Eid, White Friday, national days, school season).
- "Save post": saves one post to the calendar. Use it only after the user approves the drafts.

When the user asks for posts:
1. Ask which platforms and which week, if they haven't said.
2. Draft the posts: date, platform, caption (in Arabic, English or both, as the brand guide says), and an image idea.
3. Show the drafts and ask for changes. Save only the posts the user approves, one "Save post" call each.

Rules:
- Never invent prices, offers, product features or results. Use only what's in the brand guide, or put [brackets] for the user to fill in.
- Keep religious and national occasions respectful; no jokes about them.
- Vary the formats: product, behind the scenes, tips, customer stories, questions.

Safety rules

Built into the prompt and the tools:

  • Never saves posts until you approve them
  • Never invents prices, offers or product claims; uses only your brand guide
  • Keeps religious and national occasions respectful

Uses your own AI key (Claude, OpenAI or another model). Cost depends on the model and conversation length — a small, fast model keeps most conversations to a fraction of a cent.

Diagram

Content chatChat TriggerContent agentAI AgentClaude modelAnthropic Chat Mo…◷MemorySimple MemoryGBrand guideGoogle Sheets ToolGPlanned postsGoogle Sheets ToolSearch the webSerpAPI (Google S…GSave postGoogle Sheets Tool
Trigger AI Agent tool

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.

Workflow JSON
Show code (276 lines)
{
  "name": "Social media content calendar AI agent (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Social media content calendar AI agent\nPlans a week of posts in Arabic and English from your brand guide, checks what's trending, and saves them to your content calendar.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "public": true,
        "mode": "hostedChat",
        "initialMessages": "Which week and which platforms should I plan posts for?",
        "options": {
          "responseMode": "lastNode"
        }
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Content chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "2c527986-fe42-4d6f-a072-a193e1cbc46d"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You are the social media planner for YOUR_BRAND. Today is {{ $now.toFormat('cccc d LLLL yyyy') }}.\n\nTools:\n- \"Brand guide\": our products, audience, tone of voice, words to avoid, and the platforms we post on. Read it first, every time.\n- \"Planned posts\": posts already in our content calendar. Check it so you don't repeat topics or dates.\n- \"Search the web\": use it to check upcoming occasions and trends for our audience in YOUR_COUNTRY (Ramadan, Eid, White Friday, national days, school season).\n- \"Save post\": saves one post to the calendar. Use it only after the user approves the drafts.\n\nWhen the user asks for posts:\n1. Ask which platforms and which week, if they haven't said.\n2. Draft the posts: date, platform, caption (in Arabic, English or both, as the brand guide says), and an image idea.\n3. Show the drafts and ask for changes. Save only the posts the user approves, one \"Save post\" call each.\n\nRules:\n- Never invent prices, offers, product features or results. Use only what's in the brand guide, or put [brackets] for the user to fill in.\n- Keep religious and national occasions respectful; no jokes about them.\n- Vary the formats: product, behind the scenes, tips, customer stories, questions."
        }
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Content agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        -125,
        220
      ]
    },
    {
      "parameters": {
        "contextWindowLength": 10
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        45,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Returns our brand guide: products, audience, tone, words to avoid, platforms.",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Brand",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Brand guide",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        215,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Returns the posts already in the content calendar (date, platform, topic, caption).",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Calendar",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Planned posts",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        385,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Searches Google for upcoming occasions and trends.",
        "options": {}
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Search the web",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        555,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Saves one approved post to the content calendar.",
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Calendar",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "date": "={{ $fromAI('date', \"Publish date YYYY-MM-DD\", 'string') }}",
            "platform": "={{ $fromAI('platform', \"Instagram, LinkedIn, X, TikTok or Facebook\", 'string') }}",
            "topic": "={{ $fromAI('topic', \"Short topic\", 'string') }}",
            "caption": "={{ $fromAI('caption', \"The full caption\", 'string') }}",
            "image_idea": "={{ $fromAI('image_idea', \"What the image or video should show\", 'string') }}",
            "status": "Approved"
          }
        },
        "options": {}
      },
      "id": "2c527986-fe42-4d6f-a072-a193e1cbc46d",
      "name": "Save post",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        725,
        220
      ]
    }
  ],
  "connections": {
    "Content chat": {
      "main": [
        [
          {
            "node": "Content agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Content agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Content agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Brand guide": {
      "ai_tool": [
        [
          {
            "node": "Content agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Planned posts": {
      "ai_tool": [
        [
          {
            "node": "Content agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search the web": {
      "ai_tool": [
        [
          {
            "node": "Content agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Save post": {
      "ai_tool": [
        [
          {
            "node": "Content agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Fill the Brand sheet well: products, audience, tone and words to avoid. It makes the biggest difference.

Related flows