OpenClaw x Lark x n8n: The AI System That Runs My Entire Team
8 AI bots, 49 workflows, 12 databases — all running on a single 4GB RAM server. Here's how I built an AI system that manages every department using OpenClaw + n8n + Lark, without writing a single line of code myself.

Why I Needed AI to Run My Team
My company's vision is AI Expert Company Team — the idea that AI isn't just a product we sell to clients, it has to be something our own team uses every single day.
The reality? The same problems kept coming back, every week.
❌ Before AI
- 📋 Data scattered everywhere — HR in Lark Base, tasks in Asana, sales in CRM, payroll in Spreadsheets
- 🔇 Nobody following up — no time to open every table every morning, so overdue tasks just... silently piled up
- 😵 Incomplete data — people forgot to fill fields, used wrong formats, entered the wrong numbers
- 🤷 No visibility — had to ping each person one by one to find out what they were working on
- ⏰ Routine tasks ate time — weekly reports, deadline reminders, manual nudges
✅ After AI
- 📊 Centralized view — bots pull from every source and summarize it automatically
- 🔔 Auto follow-up — overdue alerts fire with context and suggested next steps
- ✅ Data quality checks — catches anomalies and missing fields every week
- 📋 Full picture in one chat — every status visible without asking anyone
- ⚡ 49 automations running — routine work happens without anyone thinking about it
The question I kept asking myself: what if there was someone who never forgot, never slept, and could manage the team on my behalf?
What If AI Could Be a "Senior Colleague"?
I didn't want a bot that fires dry alerts like this:
❌ Generic Bot
EX VAT + VAT ≠ NET PAY: 5 records- Team sees it, doesn't know what to do
- No context. No fix. Just noise.
✅ "Senior Colleague" Bot
- "Found 5 records where the numbers don't add up. For example: 'ABC Contractor' shows 10,000 + 700 VAT ≠ 10,500 total."
- "→ Check the NET PAY column on those rows."
- "If you're stuck on anything, just ask — be bold 💪"
A good bot doesn't just send data. It tells you what it found, shows a real example, explains how to fix it, and gives you a little encouragement.
Four things that make the difference:
- Say what it found — plain language anyone understands
- Show a real example — actual record names and amounts
- Tell you how to fix it — which table, which column
- Give a nudge — reference the "Dare" culture values of the company
That's the core idea behind OpenClaw. Everything else is built around it.
How OpenClaw + n8n + Lark Work Together
Three components, one system. OpenClaw is the brain, n8n is the muscle, and Lark MCP is the nervous system connecting everything. It all runs on a single Linux server — 2 cores, 4GB RAM — with Docker containers keeping things separated.
OpenClaw — The Brain
Open-source AI Agent platform (55,000+ GitHub stars). It receives messages, reasons through them, queries data from Lark Base or Asana, and sends back formatted Interactive Cards. Claude Sonnet 4 is the primary model, with Gemini as fallback.
n8n — The Muscle
Runs 49 scheduled automations. It pulls data, builds cards, and pushes them into the right Lark chat rooms — without anyone asking. It's what keeps the system alive even when I'm not looking.
Lark MCP — The Nervous System
The bridge between OpenClaw and Lark Suite. It lets bots read and write Lark Base databases and send Interactive Card messages with buttons — the thing that makes bots feel alive in chat.
What Is OpenClaw? (And What Can It Actually Do?)
OpenClaw is an open-source AI Agent Platform with 55,000+ GitHub stars. In this system, it handles four core jobs:
Receive and Reply in Lark
Team member @ mentions a bot in chat → OpenClaw picks it up → queries Lark Base or Asana → builds a response → sends it back as an Interactive Card with context and next steps.
Push Automated Reports via n8n
n8n triggers on a schedule → fetches data → builds a card → sends it to the designated Lark room. Nobody has to ask. The reports just show up.
Strict Access Control
Each bot can only send to its assigned rooms. HR Bot → HR room only. Sales Bot → Sales room only. Cross-room messaging is blocked. One early mistake taught me why this matters.
Fully Configurable via Text Files
AGENTS.md sets the rules. SOUL.md defines the "senior colleague" personality. TOOLS.md controls which data each room can access. Everything is editable with plain text — no code required.
| Config File | Controls |
|---|---|
config/openclaw.json | AI model selection (Claude Sonnet 4 primary, Gemini fallback), retry settings, rate limits |
.env | All API keys, Lark Chat IDs for every room |
workspace/AGENTS.md | Agent behavior rules |
workspace/SOUL.md | Bot personality, escalation tone levels |
workspace/TOOLS.md | Data access permissions per room |
8 Bots — One for Every Department
Each bot owns one department, one chat room, and one set of data sources. They don't overlap. They don't interfere with each other.
📸 Real Screenshots from Lark — Click a Bot to See It
Bot HR — People & Attendance▶
Distribution chart + per-person ranking with % over allowance shown automatically every month
Bot PM — Project & Task Tracking▶
Pie chart broken down by person + bar chart ranking the top 11 contributors by overdue estimate
Bot AE — Sales Forecast▶
23-deal pipeline weighted by probability, with total value summary and trend indicators
Bot Account — Budget Health Check▶
90% paid out + pie chart of approval status + flags 885 records missing Approval Status field
Bot Management — Workspace Audit▶
Checks 61 tables: Active 20 / Dormant 36 / Dead 5 + bar chart showing table counts per Bitable
Bot Trade — Daily Trading Intelligence▶
Signals for 8 markets (Gold/Silver/Oil/BTC/EUR/THB/S&P/SET) with Entry/TP/SL for every trading style
Bot EA — AI Trading Analysis▶
EA Spike Scalper reviewed by 5 AI expert perspectives: Quantitative, Risk, Strategy, Execution, Meta
Bot R&D — News Intelligence▶
5 curated articles with average relevance score of 66/100, translated to Thai by AI
Bot EGP — Government Procurement Scanner▶
Shows relevance score, category, budget, and decision buttons for each project
Nat Personal Bot — CEO Daily Brief▶
415 tasks summarized + Eisenhower Matrix grouping into Q1-Q4 priority buckets every morning
🟢 Bot HR — People & Attendance
Room: Bot HR | Data source: Lark HR Base
- 📊 Weekly attendance summary (with emoji bar 🟩🟨🟧🟥 showing trends visually)
- 📋 Leave balance checks on demand
- 🗓️ Company holiday reminders
- ✅ Leave approval status updates
- ⏰ Monthly late arrival report with rankings
🔵 Bot PM — Project & Task Management
Room: Bot PM | Data source: Asana + Lark Collection Plan + Project Cost
- 🔴 Overdue Asana tasks with direct links to open them
- 😴 Stale tasks untouched for 14+ days flagged automatically
- 🚧 Blockers surfaced by scanning for keywords: "blocked", "waiting", "pending"
- 💰 Project margin report — profit/loss per project every week
- ✅ Budget data quality checks — empty fields, duplicates, VAT mismatches
🟡 Bot Sales — Pipeline + Government Procurement
Room: Bot AE (Sales) + EGP | Data source: Lark CRM + e-GP API
- 📈 Weekly sales forecast weighted by deal probability
- 🔔 Deals with no activity in 7+ days flagged for follow-up
- 🔍 e-GP auto-scan twice a day for matching government projects
- 👀 Competitor monitoring — flags known competitors in the same bid
- ⏰ Deadline alerts at 5/3/1 days out with decision buttons (Join / Skip)
🟠 Bot Accounting — Payroll & Budget
Room: Bot Account | Data source: Lark Incentive / Payroll / Budget
- 💵 Weekly incentive data quality check
- 📊 Monthly incentive summary with 🏆🥈🥉 rankings
- 💰 Monthly and year-end salary summaries
- ✅ Payroll validation — SSO contributions, Net Pay calculations
🟣 Bot Admin + ⚫ Bot Dev + 🩷 Bot Marketing
- 🗓️ Admin — daily meeting reminders (Mon–Fri 09:00), customer visit alerts, AI Workshop reminders every Monday 13:00
- 🔒 Dev — SSL certificate checks, API health, web health every 6 hours + who's on leave today
- 📅 Marketing — content calendar reminders 7 days ahead, across all channels
49 Workflows That Never Sleep
All 49 workflows run on n8n with defined schedules. Every single one runs automatically — no one has to remember to trigger it.
Key Workflows at a Glance
| # | Name | Schedule | What It Does |
|---|---|---|---|
| 01 | HR Weekly Attendance | Every Monday | Attendance summary + trend bars |
| 08 | Weekly Sales Forecast | Every Monday | Weighted pipeline summary |
| 11 | Overdue Task Alert | Daily | Flags overdue Asana tasks with links |
| 14 | API Health Check | Every 6 hours | Checks all API endpoints |
| 23 | EGP Auto Scanner | Twice daily | Scans government procurement portal |
| 30 | Daily Bot Test | 07:30 | Tests all 8 bots are alive and responding |
| 36 | Payroll Monthly Summary | 23rd of month | Generates salary report |
| 47 | Lark OAuth Token Manager | Every hour | Auto-refreshes Lark access token |
| 48 | Lark-Notion 2-Way Sync | Every 5 min | Syncs tasks between Lark and Notion |
All 49 workflows combine to 8,683 lines of JSON. That sounds like a lot. But I didn't write a single line manually — AI built every workflow.
12 Databases — The System's Memory
The system connects to 12 Lark Bases — 100+ tables, 5,000+ records — plus 4 external APIs. Together they give every bot the data it needs to actually be useful.
| Database | Tables | Bot | What's Inside |
|---|---|---|---|
| HR (KPI) | 6 | HR | Attendance, Leave, KPI, Job Descriptions |
| Sales CRM | 20 | Sales | Accounts, Pipeline, Forecast |
| Collection Plan | 6 | PM, Account | P/O, Revenue, Budget |
| Incentive + Payroll | 2 | Account | Incentive tracking, Salary, SSO |
| External API | Used For | Bot |
|---|---|---|
| e-GP API | Government procurement scanning | Sales |
| Asana | Task tracking, overdue, blockers | PM |
| Lark Calendar | Meeting analysis (1,200+ events) | PM, Admin |
| Notion | 2-way task sync with Lark | Dev |
The EGP Scanner: AI Finds Government Contracts
Thailand's government procurement portal (e-GP) lists every public tender. Before this system, someone had to manually check it every day — or miss opportunities entirely. Now a bot does it twice a day, automatically.
How It Works
- Scans the e-GP API twice daily
- Filters results using 18 keywords relevant to our business (website, AI, chatbot, information system, e-office)
- AI classifies each result against 16 product categories
- Checks whether known competitors have registered
- Sends an alert to the EGP Lark room with decision buttons (Join / Skip)
- Sends deadline reminders at 5 / 3 / 1 days before closing
📋 Government Information Management System Development
🏛️ Office of XYZ Agency
💰 Budget: ฿2,500,000
📅 Closing: 20/03/2026 (9 days left)
🏷️ Category: e-Office / Information Systems
👀 Competitors: 2 known players registered
[Button: Join ✅] [Button: Skip ❌]
The tricky part: e-GP uses Cloudflare Turnstile CAPTCHA. The scanner needs a CAPTCHA solver plus 3–8 second random delays to avoid getting blocked. Stealth mode, basically.
Other Special Systems
News Intelligence
Pulls articles from multiple sources → AI scores relevance → summarizes and translates to Thai → sends to Lark automatically. The R&D bot handles this daily.
Trading Intelligence
Analyzes 8 markets → applies technical indicators (MACD, RSI, MA) → AI generates signals with Entry/TP/SL → sends a Lark card. Two bots cover this: Trade and EA.
Lark-Notion 2-Way Sync
Syncs every 5 minutes. Handles 24 fields, multiple owners, sync-loop prevention, and automatic token refresh every hour. Harder to build than it sounds.
Why Bot Personality Is the Secret Weapon
This isn't just automation. It's a system designed to feel like a real colleague. There are 4 tone levels the bots use depending on how serious the situation is:
Level 0 — Praise ✅
"Great work, team! Data quality looks clean — nothing to fix. You nailed it 💪"
Level 1 — Teach + Ask 💡
"Could you fix these records when you get a chance? If you're stuck on anything, just ask — be bold 💪"
Level 2 — Warn ⚠️
"I've flagged this a few times now. Is something blocking you? Let me know — I want to help."
Level 3 — Serious 🔥
"I've brought this up multiple times. Let's raise the bar — we need WOW results 🔥"
Every message the bot sends closes with one of 16 "Dare" values — Dare to think, Dare to act, Dare to be different, Dare to fail, Dare to ask, Dare to admit... It's the company culture, reinforced in every single message.
I'm not a psychologist, but I know this: the team responds very differently to a bot that sounds like a colleague versus one that reads like a system log. The "senior colleague" framing changed how people engaged with the messages.
One Server, 4GB RAM, Entire Company
Everything runs on a single Linux server — 2 cores, 4GB RAM. Docker containers with hard memory limits keep each component from starving the others.
AI Model Strategy — No Single Point of Failure
Deploy Flow
- Edit files locally in the project
- Run
deploy.sh→ auto-backups config (keeps last 5 snapshots) → git pull → validates config → docker compose up - Health check runs automatically for every service
- If something breaks → run
rollback.shto revert instantly
Lessons Learned (The Hard Way)
✅ What Worked
- 🎭 Bots need personality — team engagement went up significantly when messages sounded human
- 🔒 Strict access control — sent data to the wrong room once, never again. Multiple protection layers now.
- 🔄 Model fallback chain — when Claude is down, Gemini picks up. The system never goes fully silent.
- 🤝 Legacy data encouragement — phrasing messages as "no pressure on old data" reduced team anxiety about catching up
⚠️ What I Learned the Hard Way
- 💥
channels.larkmissing from config → all bots stop receiving events entirely. Now deploy.sh catches this automatically. - 📝 Markdown tables in Lark render as raw text → switched everything to list format
- 🤖 e-GP uses CAPTCHA → needed a solver plus stealth delays to avoid blocks
- 🔑 Access tokens expire → built an auto-refresh workflow that runs every hour
- 💾 4GB RAM is tight → set strict
mem_limiton every container and reduced Node.js heap
What's Next
✅ March 2026 — just shipped:
- Installed lossless-claw plugin — a persistent memory system so bots don't "forget" between sessions
- Created AGENTS.md + SOUL.md workspace files that make the agent smarter and more consistent
🔮 On the roadmap:
- Interactive BI dashboard (replacing static HTML reports)
- Auto-generate invoices from won e-GP bids
- Competitor sentiment analysis from news feeds (NLP)
The Numbers
I'm not a developer. I've only been doing this — AI + vibe code through Cursor — since January 2026. Two months in, and a system like this is running in production, sending 20–30 messages a day, managing a real team.
The technology isn't the hard part. The hard part is deciding what you want AI to say — and making sure it sounds like your company, not a generic alert system.
Published by: Idea2Level | Updated: March 2026
System: OpenClaw v2026.3.7 + n8n + Lark Suite + 49 Workflows + 8 Bots
FAQ
What exactly is OpenClaw? How is it different from a regular chatbot?
OpenClaw is an open-source AI Agent Platform with 55,000+ GitHub stars. What makes it different from a standard chatbot is the workspace file system — AGENTS.md, SOUL.md, TOOLS.md — which lets you define personality, rules, and data permissions in plain text. It's not just answering questions. It's acting as a representative of the company with its own character and access controls.
Do you need to write code? Or can you really do this with vibe code?
This entire system was built with vibe code — AI wrote everything. n8n is a visual workflow builder where you drag and drop nodes. OpenClaw config is JSON and Markdown. I'd describe my role as "directing" the AI rather than writing code. That said, you do need to understand what you want — the AI can write it, but you have to know what to ask for.
What does it cost to run something like this?
The main costs are: a Linux server (2 Core, 4GB RAM), AI API fees (Claude Sonnet 4 via OpenRouter as primary, Gemini as fallback), and Lark Suite licenses. At 20–30 messages/day using Sonnet (not Opus), the API cost stays manageable. The server is the biggest fixed cost.
How long did it take to build?
It didn't start as 49 workflows. It started with one bot (HR) to solve one problem, then grew organically as each department surfaced real pain points. Each bot and workflow came from an actual need, not a grand plan. The whole thing evolved over roughly two months — building, breaking, learning, and rebuilding.
Why Lark instead of Slack or Microsoft Teams?
The team was already using Lark Suite for everything — chat, calendar, documents, and Lark Base (a built-in low-code database). Keeping the AI inside Lark meant no new tools to learn and no behavior change required. Lark Base also eliminates the need for a separate database, which simplified the whole architecture.
Can other companies replicate this system?
Yes — if you use Lark and n8n, the stack is replicable. OpenClaw is open source. The 49 workflows are exportable JSON. The harder part is the config files — SOUL.md, AGENTS.md, TOOLS.md — because those have to reflect your actual company culture and data structure. The technology is generic. The soul of the system is specific to you.
ชอบบทความนี้ใช่ไหม?
สมัครสมาชิก Idea2Level เพื่อเข้าถึง Content, Template และ Community คุณภาพสูง
สมัครสมาชิกบทความที่เกี่ยวข้อง

OpenClaw x Lark x n8n: ระบบ AI ที่ดูแลทีมทั้งบริษัทแทนผู้บริหาร
สร้างระบบ AI Agent ด้วย OpenClaw + n8n + Lark ที่ดูแลทีมทั้งบริษัท — 8 Bots, 49 Workflows, 12 ฐานข้อมูล รันบน server เครื่องเดียว 4GB RAM ทั้งหมดสร้างด้วย vibe code
สร้าง idea2logic.com ด้วย AI — เปิดโครงสร้าง 30+ หน้า 40+ API ทั้งระบบ
สร้าง idea2logic.com ทั้งระบบด้วย AI — 30+ หน้า, 40+ API, 14 database tables ค่า server ไม่ถึง 1,000 บาท/เดือน บทความนี้เปิดโครงสร้างทั้งหมดด้วย Interactive Diagram
Master Template สำหรับ Vibe Code บน Cursor — รัน 1 ไฟล์ ได้ระบบตรวจคุณภาพ 360° ครบ 143 ข้อ
ออกแบบระบบ Quality Gate 360° สำหรับ Cursor — 8 Phases, 143 Checklist Items, 17 Scripts, Lark Alert พร้อม Dashboard ที่สร้าง AI Prompt ให้อัตโนมัติ ทุกอย่างพร้อมรันจาก 1 คำสั่ง ใช้ซ้ำได้ทุก project