Skip to content
RepoQuarry

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.

  1. Rocket.Chat An event on the webhook (message or form) Windmill
  2. Windmill goose run with the task and event details goose
  3. goose Prompts and tool results Ollama
  4. goose The finished result Windmill
  5. Windmill A report posted back to the channel Rocket.Chat

The repos

  1. 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
    ★ 18k AGPL-3.0 Confirmed: 8/8 facts Official docsGitHubReplaces Zapier, Make
  2. 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
    ★ — Apache-2.0 Partial: 7/8 facts Official docsGitHubReplaces Claude Code
  3. 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)
    ★ 184k MIT Confirmed: 8/8 facts Official docsGitHubReplaces ChatGPT Plus
  4. 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
    ★ 46k MIT Confirmed: 8/8 facts Official docsGitHubReplaces Slack

Step by step

Install commands change, so each step links to the repo's own docs for the exact commands.

  1. Install Windmill and make a script

    Set up Windmill and write a short script that takes the event's JSON as input. Copy the webhook address from the script's detail page and keep its token secret.

    Uses Windmill · its docs

  2. Install goose on the worker

    Install the goose CLI where Windmill's scripts run, ideally in its own container. Its run command takes text instructions, does the task and exits, which is what an automation needs.

    Uses goose · its docs

  3. Point goose at a local model

    Configure goose to use Ollama with a model that handles tool calls well. Try the task by hand with goose first until it is reliable.

    Uses Ollama · its docs

  4. 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

  5. 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.

Shared builds

Nobody has shared one yet. Be the first.

Built your own version and put it on GitHub as open source? Share your build

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 →

Cookie preferences

Choose what we may store in your browser. You can change this any time from Cookie settings in the footer.

Essential

Security, and remembering this choice. rq-consent · 12 months

Always on