AutomationFlowsAI & RAG › Generate & Optimize Brand Stories with Ollama Llms and Google Sheets

Generate & Optimize Brand Stories with Ollama Llms and Google Sheets

ByAashit Sharma @aashitsharma on n8n.io

This n8n automation template allows marketers, branding teams, and creative professionals to auto-generate, evaluate, and iteratively optimize brand stories using Ollama-hosted LLMs and LangChain agents. Each story is refined until it meets quality criteria and is then saved to…

Chat trigger trigger★★★★☆ complexityAI-powered13 nodesAgentOllama ChatChat TriggerGoogle Sheets
AI & RAG Trigger: Chat trigger Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4765 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "f0fa65c1-68a1-4ad8-94f5-12dcce2ce708",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "346fff16-a415-4e28-af89-bfb2dca3a633",
      "name": "Evaluator Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        700,
        340
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "065c3094-415c-4aa8-a964-85bc73efe394",
      "name": "Optimizer Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1380,
        420
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "9e38b175-e7d7-454f-8d14-0deef8a9f902",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        340,
        640
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "123150d5-cd70-4c4e-9803-549d92ae8011",
      "name": "Ollama Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1400,
        660
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7a2e6ce1-fb42-4c44-9ead-356eff3e4fa2",
      "name": "Chat Input: Start Story Flow",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -100,
        340
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9a2f1aa8-b5c9-4887-81c1-2450707b6e4b",
      "name": "Brand Storytelling Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        120,
        340
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "56a6384a-8ccd-41bd-82d6-ab5882b055d6",
      "name": "Set Brand variable",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        340
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "47ae1610-3bcc-4507-815a-eea07a36c0d1",
      "name": "Save Brand Story to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1360,
        220
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "80beca32-318c-4e55-9678-5302ee2b7d17",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        620
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "30105c81-95cc-4362-9153-7e6748a08d8e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3d16e5be-ca4b-4c0b-a567-e60afeeb7bcb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        660
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "bd008cb7-78f5-49c4-a76a-76e170946173",
      "name": "Evaluation Check",
      "type": "n8n-nodes-base.if",
      "position": [
        1060,
        340
      ],
      "parameters": {},
      "typeVersion": 2.2
    }
  ],
  "connections": {
    "Evaluator Agent": {
      "main": [
        [
          {
            "node": "Evaluation Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Optimizer Agent": {
      "main": [
        [
          {
            "node": "Set Brand variable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluation Check": {
      "main": [
        [
          {
            "node": "Save Brand Story to Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Optimizer Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Brand Storytelling Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Evaluator Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Optimizer Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Brand variable": {
      "main": [
        [
          {
            "node": "Evaluator Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Brand Storytelling Agent": {
      "main": [
        [
          {
            "node": "Set Brand variable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Input: Start Story Flow": {
      "main": [
        [
          {
            "node": "Brand Storytelling Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n automation template allows marketers, branding teams, and creative professionals to auto-generate, evaluate, and iteratively optimize brand stories using Ollama-hosted LLMs and LangChain agents. Each story is refined until it meets quality criteria and is then saved to…

Source: https://n8n.io/workflows/4765/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is built for B2B marketers, consultants, founders, and agency owners who need to produce high-quality, research-backed thought leadership content — without spending hours on research and

Chat Trigger, Agent, HTTP Request +2
AI & RAG

HDW Lead Geländewagen. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, outputParserStructured. Chat trigger; 92 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +5
AI & RAG

This comprehensive workflow automates the complete financial document processing pipeline using AI. Upload invoices via chat, drop expense receipts into a folder, or add bank statements - the system a

Chat Trigger, HTTP Request, Google Sheets +8
AI & RAG

Who’s it for Creators who want to create faceless videos automatically, while keeping human oversight and quality control.

Read Write File, Agent, OpenAI Chat +7
AI & RAG

The Best Linkedin Posting System. Uses httpRequest, lmChatOpenAi, agent, chatTrigger. Chat trigger; 49 nodes.

HTTP Request, OpenAI Chat, Agent +8