Grok Bot Library 04Bot of Bots on Grok Bot

Ticket Closer

A Grok Bot specialist that lists and resolves BrightDone tickets on netpotent.com

Version1.0 Date2026-11-06 AuthorCurt Cornum

Purpose

Ticket Closer (formerly BrightDone) lists, looks up, and resolves support tickets on the BrightDone help desk at netpotent.com through a custom PHP REST API. Truc · Bot of Bots delegates ticket work to it as a teammate.

The OpenClaw Version

Same OpenClaw pattern as Stick Counter: a skill says which script to run, and the API key lives in a local env file. The script comment reads "OpenClaw-style local .env (survives secret-card wipes better than box-secrets sync)".

Item OpenClaw Grok Bot
Chat front end Telegram-style TBD Grok Bot chat with Truc
Script TBD check_tickets.sh
Secrets Local env file /workspace/netpotent/.env
CLI flags, paths, bot ids TBD See Build Steps

Architecture

Piece Location
Skill /home/box/agent-data/workflows/brightdone-tickets/SKILL.md
Script /home/box/agent-data/workflows/brightdone-tickets/check_tickets.sh
Secrets /workspace/netpotent/.env (BRIGHTDONE_API_KEY=REDACTED)
API Authenticated PHP endpoint on netpotent.com, header X-API-KEY
Curt Truc Ticket Closer ticket API BrightDone help desk
YouOrchestratorSpecialist botServer endpoint or data
Action Request
List open Authenticated request, no parameters
Look up Authenticated request with the ticket ID
Resolve Authenticated request with a resolve action and the ticket ID

Build Steps

1. Server side

The ticket API on netpotent.com validates X-API-KEY and serves tickets. TBD PHP source is not stored on the box.

2. Secrets

bash
python3 /workspace/netpotent/upsert_env_key.py BRIGHTDONE_API_KEY REDACTED

3. Script

bash
bash /home/box/agent-data/workflows/brightdone-tickets/check_tickets.sh
bash /home/box/agent-data/workflows/brightdone-tickets/check_tickets.sh --id <TICKET_ID>
bash /home/box/agent-data/workflows/brightdone-tickets/check_tickets.sh --resolve <TICKET_ID>

Core request:

bash
CURL_OPTS=(
  -sS -L
  -H "X-API-KEY: REDACTED"
  -H "User-Agent: Mozilla/5.0 (compatible; TrucBot/1.0)"
  -H "Accept: application/json, text/plain, */*"
  -H "Cookie: REDACTED"
)

The script redacts the key if it ever appears in a response.

4. Skill and bot

Save SKILL.md, create Ticket Closer, attach the skill, and add it as Truc's teammate.

ScreenshotGrok Bot teammate chat between Truc and Ticket Closer

Bot Instructions

text
Reads (list / look up) are always safe. Run freely when asked.

Resolving, always:
1. Fetch the ticket by ID (or list open tickets to find it)
2. Show the subject and current status
3. Ask "Resolve this one?" with a question widget and wait
4. Only run --resolve after they confirm

Present Critical and High priority tickets first when listing.
Never put the key in chat, skill text, or logs.

Obstacles and Fixes

Obstacle Fix
Secret card lost the key Load from /workspace/netpotent/.env
netpotent.com cookie challenge on bare curl Send the host's challenge cookie
Key could leak in echoed responses Script replaces it with REDACTED
"BRIGHTDONE_API_KEY not set" Add the line to .env
401 Unauthorized Server key and .env key differ; update both

Verification

bash
bash /home/box/agent-data/workflows/brightdone-tickets/check_tickets.sh

Expect open ticket JSON. TBD exact JSON field names are not documented on the box.

ScreenshotTicket list output in chat

Lessons Learned

  • Separate safe reads from writes, and gate writes on confirmation.
  • Keep the key in .env and redact it in output.
  • Let the PHP API own the logic so the bot holds one scoped key.