OpenClaw Hooks Crash Course - Gemma 4 Ollama 100% Local

From the creator

Create unlimited custom hooks in OpenClaw — running fully local with Ollama + Gemma 3n E2B In this video I show how to build a Telegram audit hook from scratch so OpenClaw sends a message to your Telegram every time someone runs /new, /reset, or /stop in the chat. Same pattern works for Slack, WhatsApp, webhooks, or any custom function you want to trigger. Everything runs locally on a Beelink Pro mini PC (AMD Ryzen 7 H255, 24GB RAM, 1TB SSD) with OpenClaw pre-installed and Gemma 3n E2B served via Ollama — small model, surprisingly strong performance for an edge device. https://www.bee-link.com/products/beelink-ser9-pro-amd-ryzen-7-h-255-openclaw?variant=48874933846258 https://openclaw-ai.com/en/docs/automation/hooks/ https://mer.vin/2026/05/openclaw-hooks-setup-guide/ What you'll learn What hooks are in OpenClaw and when to use them Setting up Ollama + Gemma 3n E2B on a local box SSH into a pre-installed OpenClaw device from your main machine Folder structure for a custom hook (handler.ts, package.json, hook.md) Wiring into command events (new, reset, stop) Other event types you can hook into: agent events, gateway events, message events Enabling the hook and restarting the gateway Testing the hook end-to-end with Telegram Honest notes This example uses Telegram because the integration is already there, but the handler.ts is where you can call literally anything — your own API, a webhook, a guardrail check, whatever. You can also use hooks defensively, e.g. block or audit reset/clear actions for security. Commands used ollama run gemma3n:e2b openclaw hooks list openclaw hooks enable telegram-audit openclaw gateway restart Folder structure ~/openclaw/hooks/telegram-audit/ ├── handler.ts ├── package.json └── hook.md Resources Beelink Pro (OpenClaw pre-installed): [link] OpenClaw install one-liner: [link] Full hook source code (handler.ts, package.json, hook.md): [link] OpenClaw docs — hooks & events: [link] Related videos OpenClaw + Telegram integration (full setup): [link] Creating custom skills for OpenClaw: [link] Open a remote OpenClaw machine in Cursor / Windsurf / VS Code: [link] Chapters 00:00 Intro — hook enabled, Telegram audit demo 00:47 Beelink Pro setup + finding the device IP 01:22 SSH into the OpenClaw machine 01:41 Install Ollama + Gemma 3n E2B 02:45 OpenClaw install + Ollama model provider 03:17 Open the web UI via token URL 03:39 What hooks are and when to use them 04:30 Creating the telegram-audit hook folder 05:19 hook.md, handler.ts, package.json walkthrough 06:30 Customising the trigger — Telegram, WhatsApp, webhooks 07:09 Enable the hook + restart the gateway 08:11 Live test: /new → Telegram notification 08:26 Other event types: agent, gateway, message 08:59 What to build next Like and subscribe if this was useful — more OpenClaw deep-dives coming. #OpenClaw #Ollama #Gemma3n #LocalAI #AIAgents #SelfHosted This video explores how to integrate OpenClaw with Telegram, demonstrating how to create automated notifications using custom hooks. We show how to set up a "telegram bot" to send messages whenever a new session is created within OpenClaw, enhancing "ai automation". Additionally, the tutorial covers running OpenClaw locally with the powerful "gemma 4 ollama" model, showcasing its performance even with a smaller size for efficient "local ai" operations.

Choose to Build with AI
Matched to Gemma

AI Maker Residence 3

The third AI workshop taught by our legendary teacher, Nick Sarafa. This is a full-day hands-on training workshop for purposeful co-creation with AI using Claude Code. Imagine having access to hundreds of billions of dollars of computing power and knowing exactly how to make it work for you through the power of super intelligence.

◆ Fri 09 Oct 2026 ◆ KOKO Cafe, London ◆ With Nick Sarafa
AI Maker Residence 3
Live event
AI Maker Residence 3
Fri 09 Oct 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.