Build · Advanced · A weekend
Build an AI agent that wakes up on a webhook, email or chat message
When an email arrives, a form is filled or someone posts in chat, an AI agent starts, does the task and reports back.
Instead of paying for Zapier, Make, Claude Code, ChatGPT Plus or Slack.
What you'll build
An agent that works when something happens, not when you open a chat window. A support ticket arrives and it reproduces the bug; a message in a channel asks for a report and it builds one; a form is submitted and it drafts the reply. Grok Bot can start routines from Slack or GitHub events, and people wire Grok into n8n webhooks for the same thing. Here the trigger, the agent and the chat all run on your own server.
Blueprint
Windmill gives every script a webhook. Rocket.Chat or any app calls that webhook when an event happens; the script runs goose headless with instructions and the event's details, goose uses Ollama and its tools to do the task, and the script posts the result back to the chat.
- Rocket.Chat An event on the webhook (message or form) Windmill
- Windmill goose run with the task and event details goose
- goose Prompts and tool results Ollama
- goose The finished result Windmill
- Windmill A report posted back to the channel Rocket.Chat
The repos
- 01 · Webhook and runner Windmill
Self-hostable developer platform that turns Python, TypeScript, Go, Bash and SQL scripts into workflows, scheduled jobs, webhooks and UIs.
- Setup
- Medium, Docker Compose (three files) with Postgres source
- Hardware
- Rule of thumb 1 vCPU and 1-2 GB RAM per worker, plus Postgres source
- Paid extras
- None required; Enterprise Edition and Windmill cloud are optional
- 02 · Do the task goose
Open-source AI agent with a desktop app and CLI that runs on your machine, connects to MCP extensions and works with any model, including Ollama.
- Setup
- Easy; download the desktop app, or install the CLI with a one-line script or Homebrew, then pick a provider source
- Hardware
- No hardware requirements documented in the README or install docs (checked 2026-10-21)
- Paid extras
- Not required with local models (Ollama, LM Studio, Docker Model Runner, Ramalama) or free tiers such as Groq; paid APIs are optional
- 03 · Run the model Ollama
Local model runner that downloads and serves open LLMs (Gemma, Qwen, DeepSeek, gpt-oss and more) with a CLI and local API.
- Setup
- Easy; one-line install script or installer, then ollama run source
- Hardware
- Apple M-series or x86 (CPU only) on Mac; 4GB for Windows binary; RAM not stated source
- Paid extras
- None for local use; Ollama Cloud plans optional (Pro $20/month)
- 04 · Where events and results go Rocket.Chat
Open core, self-hosted team chat with channels, threads, DMs, apps and federation; free Starter (50 users) and MIT Community editions.
- Setup
- Medium; Docker or Kubernetes plus a separately maintained MongoDB source
- Hardware
- Up to 500 concurrent users - Rocket.Chat 2 vCPU, 4 GiB RAM, 20 GiB disk; plus MongoDB 8.0+ (2 vCPU, 4 GiB per replica) source
- Paid extras
- None required within the free caps; Commercial, Government and Defense plans remove limits and add support
Step by step
Install commands change, so each step links to the repo's own docs for the exact commands.
-
Send events from chat
In Rocket.Chat, add an outgoing webhook for a channel or a trigger word that calls your Windmill webhook. Other apps that can send a webhook, such as forms or helpdesks, can call it the same way.
Uses Rocket.Chat · its docs
-
Post the result back and add guard rails
Have the script post goose's output back to the channel. Limit what goose can touch, log every run, and start with tasks that only read and report before letting it change anything.
Watch out
An agent that runs commands can do damage. Run it in a container with only the access the task needs, require approval for anything outward-facing, and protect the webhook with a token.
Take it further
- Trigger it from new issues in your Git host to draft a first fix.
- Run it nightly from Windmill's scheduler to check your sites and report problems.
- Swap goose for another headless agent, such as OpenHands, for coding tasks.
Questions
Can I trigger Grok Bot this way?
Grok Bot's docs describe routines started on a schedule or by events from Cursor account integrations, such as Slack or GitHub. We found no webhook you can call from your own tools, so this build uses an agent you run.
Why not just use n8n?
You can; n8n has webhook triggers. Windmill is used here because it is open source and can run the agent's command directly as a script.
Every repo here is open source, still maintained and checked against its own documentation. How we check →