AutomationFlowsAI & RAG › Cto Lume Everywhere

Cto Lume Everywhere

CTO lume everywhere. Uses toolThink, httpRequestTool, lmChatOpenAi, memoryMongoDbChat. Event-driven trigger; 14 nodes.

Event trigger★★★★☆ complexityAI-powered14 nodesTool ThinkHTTP Request ToolOpenAI ChatMemory Mongo Db ChatTool WorkflowAgentTelegram TriggerHTTP Request
AI & RAG Trigger: Event Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → HTTP Request 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
{
  "name": "CTO lume everywhere",
  "nodes": [
    {
      "parameters": {},
      "id": "14a86541-69ee-4ba0-8f46-51ed774a8dbb",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        128,
        672
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "toolDescription": "=Relative file path in the repository.\nExamples:\n- package.json\n- PROJECT_CONTEXT.md\n- artifacts/pos-app/package.json",
        "url": "=https://api.github.com/repos/hamdallah24/pos-app/contents/{{ $json.input }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "vnd.github.v3+json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.4,
      "position": [
        256,
        672
      ],
      "id": "ac93a68d-d7c4-4930-bdfa-6f2f37a0bc85",
      "name": "github_read_file",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "=List files and folders inside a GitHub repository directory.\n\nInput:\npath\n\nExamples:\nartifacts\nartifacts/pos-app\nartifacts/api-server\n\nReturns the files and folders in the specified directory.",
        "url": "=https://api.github.com/repos/hamdallah24/pos-app/contents/{{ $fromAI('path') }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "vnd.github.v3+json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.4,
      "position": [
        512,
        672
      ],
      "id": "bf7acaad-b94a-40e2-9f81-8f54444c48c2",
      "name": "github_list_directory",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "mimo-v2.5-pro",
          "mode": "list",
          "cachedResultName": "mimo-v2.5-pro"
        },
        "options": {}
      },
      "id": "f091a7d8-4390-4093-9ba1-59eb49fb59b9",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        16,
        672
      ],
      "typeVersion": 1.2,
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.telegram_chat_id || '7218843690' }}",
        "collectionName": "Memory",
        "databaseName": "CLevelAgent",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryMongoDbChat",
      "typeVersion": 1.1,
      "position": [
        -128,
        672
      ],
      "id": "262894f2-1c3d-4a02-b745-650961f5b369",
      "name": "MongoDB Chat Memory",
      "credentials": {
        "mongoDb": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "description": "Gunakan tool ini HANYA jika kamu sudah menganalisis masalah dan siap untuk mengeksekusi perubahan kode (menulis, mengubah, atau memperbaiki file) di repository GitHub. Tool ini akan otomatis memanggil Code Generator, memvalidasi syntax, dan melakukan commit ke branch.\n\nWAJIB isi parameter berikut, JANGAN kosongkan:\n- user_message: instruksi perubahan kode yang detail dan teknis, minimal 1 kalimat lengkap berisi nama file (jika tahu) dan jenis perubahan\n- repo_owner: selalu \"hamdallah24\"\n- repo_name: selalu \"pos-app\"\n- branch: selalu \"Staging\"\n- chat_id: ID chat Telegram pengguna saat ini, untuk kirim notifikasi hasil",
        "workflowId": {
          "__rl": true,
          "value": "86eCJ8nbprRs0CUW",
          "mode": "list",
          "cachedResultUrl": "/workflow/86eCJ8nbprRs0CUW",
          "cachedResultName": "CTO Agent Tools - Stage 4 (Code Generator + Validator + Repair + Commit)"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "user_message": "={{ $('Code in JavaScript1').item?.json?.text || 'Tidak ada pesan' }}",
            "repo_owner": "={{ $json.repo_owner || 'hamdallah24' }}",
            "repo_name": "={{ $json.repo_name || 'pos-app' }}",
            "branch": "={{ $json.branch || 'Staging' }}",
            "chat_id": "={{ String($('Code in JavaScript1').item?.json?.chat_id || '7218843690') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "user_message",
              "displayName": "user_message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "repo_owner",
              "displayName": "repo_owner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "repo_name",
              "displayName": "repo_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "branch",
              "displayName": "branch",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "chat_id",
              "displayName": "chat_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        624,
        672
      ],
      "id": "bbf5cb76-df73-4b3e-bc98-2eb8da0dc5cf",
      "name": "Call 'CTO Agent Tools - Stage 4 (Code Generator + Validator + Repair + Commit)'"
    },
    {
      "parameters": {
        "description": "Gunakan tool ini untuk mendelegasikan tugas teknis ke sub-agent spesialis (Security, DevOps, QA, Software Architect) yang akan membaca skill file SOP dari GitHub sebelum bekerja.\n\nWAJIB isi 6 parameter berikut, JANGAN kosongkan:\n- skill_file: nama file skill, salah satu dari: Security_skill.md, DevOps_skill.md, QA_skill.md, Software_Architect_skill.md\n- task_description: instruksi/tugas teknis yang jelas untuk sub-agent kerjakan\n- repo_owner: selalu \"hamdallah24\"\n- repo_name: selalu \"pos-app\"\n- branch: selalu \"Staging\"\n- telegram_chat_id: ID chat Telegram pengguna saat ini\n\nGunakan tool ini ketika:\n1. User meminta audit keamanan (security)\n2. User meminta deployment atau infrastruktur (devops)\n3. User meminta testing atau quality assurance (qa)\n4. User meminta analisis arsitektur sistem (architect)\n5. User meminta bantuan yang memerlukan keahlian spesifik di luar kemampuan CTO Agent\n\nJANGAN gunakan tool ini untuk:\n- Membaca file (gunakan github_read_file)\n- Melihat struktur folder (gunakan github_list_directory)",
        "workflowId": {
          "__rl": true,
          "value": "RV5wbuCzWhbGS3Nf",
          "mode": "list",
          "cachedResultUrl": "/workflow/RV5wbuCzWhbGS3Nf",
          "cachedResultName": "Sub-Agent: Dynamic Specialist (Chameleon) - Anti Typo"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "repo_owner": "={{ $json.repo_owner || 'hamdallah24' }}",
            "repo_name": "={{ $json.repo_name || 'pos-app' }}",
            "branch": "={{ $json.branch || 'Staging' }}",
            "telegram_chat_id": "={{ String($('Code in JavaScript1').item?.json?.chat_id || '7218843690') }}",
            "task_description": "={{ $json.task_description }}",
            "skill_file": "={{ $json.skill_file || 'SoftwareArchitectskill.md' }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "skill_file",
              "displayName": "skill_file",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "task_description",
              "displayName": "task_description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "repo_owner",
              "displayName": "repo_owner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "repo_name",
              "displayName": "repo_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "branch",
              "displayName": "branch",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "telegram_chat_id",
              "displayName": "telegram_chat_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        384,
        672
      ],
      "id": "b652bffb-eae1-4844-948f-6e817dce4ba7",
      "name": "Sub-Agent: Dynamic Specialist"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Code in JavaScript1').item.json.text }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "Anda adalah CTO Agent (orchestrator) untuk proyek POS App milik Lum\u00e9 & DURAL.\n\nPERAN\nAnda TIDAK menulis kode dan TIDAK menganalisis teknis sendiri. Tugas Anda hanya: pahami permintaan \u2192 delegasikan ke tool yang tepat \u2192 evaluasi hasil \u2192 teruskan ke user. Detail teknis (tech stack, isi file, cara implementasi) adalah tanggung jawab sub-agent, BUKAN Anda.\n\nBAHASA & FORMAT\nBahasa Indonesia. Beri Penjelasan Singkat, padat, jelas, profesional. Maksimal 4000 karakter.\n\nROUTING (pilih satu)\n1. Baca file saja (contoh: \"baca package.json\") \u2192 github_read_file. Jangan pakai sub_agent.\n2. Lihat struktur folder (contoh: \"scan repository\") \u2192 github_list_directory. Jangan pakai sub_agent.\n3. Apa pun yang menyangkut source code, bug, fitur, refactor, security, deployment, database, architecture, performance, testing, repository \u2192 WAJIB sub_agent. JANGAN PERNAH menganalisis atau menjawab teknis ini sendiri.\n\nPEMILIHAN SUB-AGENT (skill_file)\n- Security_skill.md \u2192 auth, session, csrf, xss, sql injection, rate limit, audit keamanan\n- DevOps_skill.md \u2192 deployment, docker, ci/cd, nginx, pm2, server, hosting\n- QA_skill.md \u2192 testing, bug hunting, validation, regression\n- Software_Architect_skill.md \u2192 fitur baru, refactor, database, desain sistem, performa\n\nALUR WAJIB\n1. Panggil sub_agent dengan parameter: skill_file (pilih sesuai tabel di atas), task_description (jelas dan teknis), repo_owner=\"hamdallah24\", repo_name=\"pos-app\", branch=\"Staging\", telegram_chat_id=ID chat Telegram user saat ini.\n2. Evaluasi hasil sub_agent.\n3. Jika hasil hanya laporan/analisis/rekomendasi umum \u2192 teruskan ke user, STOP. Jangan panggil code_generator.\n4. Jika hasil mengandung rekomendasi perubahan kode konkret \u2192 ringkas jadi instruksi implementasi yang actionable, lalu panggil code_generator.\n   - user_message WAJIB: kalimat teknis lengkap, minimal 10 kata, sebutkan nama file (jika diketahui) dan jenis perubahan persis.\n   - Contoh BENAR: \"Tambahkan express-rate-limit pada endpoint /api/users dengan batas 5 request per menit di server/routes/users.ts\"\n   - Contoh SALAH (jangan kirim seperti ini): \"perbaiki rate limit\" \u2014 terlalu pendek, akan ditolak sistem.\n   - repo_owner=\"hamdallah24\", repo_name=\"pos-app\", branch=\"Staging\", chat_id=ID chat Telegram user saat ini.\n\nLARANGAN\n- Jangan panggil code_generator langsung dari permintaan user tanpa melalui sub_agent.\n- Jangan mengarang isi file, struktur repo, atau hasil analisis. Jika data tidak tersedia, katakan \"informasi tidak ditemukan\".\n- Jangan melakukan commit file tanpa memberikan analisis dan persetujuan user buatkan proposalnya terlebih dahulu dan tanya user 'SETUJU' berarti lanjutkan dan jika 'TIDAK SEJUTU' jangan lanjutkan intinya tunggu persetujuan user sebelum commit dan HARUS DISERTAI PENJELASAN DAN PROPOSAL\n\nKEGAGALAN TOOL\nJika tool gagal, coba ulang maksimal 2 kali dengan parameter yang diperbaiki. Jika masih gagal, laporkan error apa adanya ke user \u2014 jangan kerjakan sendiri sebagai pengganti.",
          "maxIterations": 3
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        176,
        400
      ],
      "id": "b5dbd6c3-416d-4161-8793-58cea17fd04d",
      "name": "CTO_Agent",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.3,
      "position": [
        -400,
        384
      ],
      "id": "dc9f79eb-64ab-43da-8008-5e1a5fd059e4",
      "name": "Telegram Trigger",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://n8n-duatuonaiw0g.jkt6.sumopod.my.id/webhook/logger-v1",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "chat_id",
              "value": "={{ $json.message.chat.id }}"
            },
            {
              "name": "level",
              "value": "SUCCESS"
            },
            {
              "name": "agent",
              "value": "CTO"
            },
            {
              "name": "message",
              "value": "={{ 'Task selesai. Respons: ' + $node['CTO_Agent'].json.output.substring(0, 150) + '...' }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        496,
        400
      ],
      "id": "55295c23-edb5-4c5c-847b-2c8c0a5fc0ff",
      "name": "Loig success"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://n8n-duatuonaiw0g.jkt6.sumopod.my.id/webhook/logger-v1",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "chat_id",
              "value": "={{ $json.chat_id }}"
            },
            {
              "name": "level",
              "value": "={{ $json.level }}"
            },
            {
              "name": "agent",
              "value": "={{ $json.agent }}"
            },
            {
              "name": "message",
              "value": "={{ $json.message }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -128,
        384
      ],
      "id": "b4854e93-4cc4-4a9b-941e-a08be242e6e3",
      "name": "INFO",
      "retryOnFail": false,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "// Ambil data dari Telegram\nconst chatId = $json.message?.chat?.id || '7218843690';\nconst messageText = $json.message?.text || '';\n\n// Format data untuk Logger\nconst logData = {\n  chat_id: chatId,\n  level: 'INFO',\n  agent: 'CTO',\n  message: `Task diterima: ${messageText.substring(0, 100)}...`\n};\n\n// Return data untuk HTTP Request DAN CTO_Agent\nreturn {\n  // Data untuk HTTP Request (Logger)\n  ...logData,\n  \n  // Data untuk CTO_Agent\n  text: messageText,  // \u2190 INI YANG DIBUTUHKAN CTO_AGENT!\n  chat_id: chatId\n};\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -272,
        384
      ],
      "id": "8ed4091d-7a64-4d9f-8f1a-22dc893214f3",
      "name": "Code in JavaScript1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "daa631ed-8d0b-4014-9692-78e54a15f42e",
              "name": "Debug_text",
              "value": "={{ $('Code in JavaScript1').item.json.text }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        32,
        336
      ],
      "id": "519e9726-ba25-4e20-9c01-8d1aa8e4a0da",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "chatId": "={{ $json.telegram_chat_id || '7218843690' }}",
        "text": "={{ $json.message || $json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        640,
        400
      ],
      "id": "24e1c1cd-ffc6-48cd-8027-d6f821da90b7",
      "name": "Send a text message",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "github_read_file": {
      "ai_tool": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "github_list_directory": {
      "ai_tool": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Call 'CTO Agent Tools - Stage 4 (Code Generator + Validator + Repair + Commit)'": {
      "ai_tool": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sub-Agent: Dynamic Specialist": {
      "ai_tool": [
        [
          {
            "node": "CTO_Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "CTO_Agent": {
      "main": [
        [
          {
            "node": "Loig success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loig success": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "INFO": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "INFO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "CTO_Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "40775cdb-7942-4898-a3f2-66210f4c5f8b",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "W4oIbAiNz2GUw6Mb",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

CTO lume everywhere. Uses toolThink, httpRequestTool, lmChatOpenAi, memoryMongoDbChat. Event-driven trigger; 14 nodes.

Source: https://github.com/hamdallah24/lumespos/blob/af88cebc08460893740f1e034f344cdd4cad7ca8/n8n-workflows/0-ORIGINAL-CTO-Agent.json — 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

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Bitlab-Chatbot. Uses telegramTrigger, telegram, snowflake, httpRequest. Event-driven trigger; 87 nodes.

Telegram Trigger, Telegram, Snowflake +13
AI & RAG

Personal Assistant. Uses memoryBufferWindow, agent, agentTool, httpRequestTool. Event-driven trigger; 77 nodes.

Memory Buffer Window, Agent, Agent Tool +15
AI & RAG

This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste

Telegram, Telegram Trigger, Google Drive +8