webhook-transforms
What it does
This skill sets up a way for outside services to send events into your brain. Each event is converted into a page with its source noted, and failed events are saved rather than lost.
When to use it
- ✓When you want texts, meeting results, or social mentions to be saved to your brain automatically.
- ✓When you want to define how an outside event should be turned into a brain page.
- ✓When you need to check what happens to an event if its conversion fails.
Skill link
https://github.com/garrytan/gbrain/blob/master/plugin/skills/webhook-transforms/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Save every meeting summary my recording app sends to me as a page in my brain, and keep any event that fails.”
5 new skills a week. 1 minute to read.
How it works
The agent defines a conversion step that turns the event data into a brain page, then registers an address that the outside service can call. If a conversion fails, the raw data is saved in a holding folder and retried once.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Webhook Transforms
Contract
This skill guarantees:
- External events are transformed into brain pages with proper citations
- Raw payloads are preserved (dead-letter queue if transform fails)
- Entity extraction runs on every transformed event
- Input sanitization: no raw HTML/script passes to brain pages
- Error handling: transform failure logs raw payload, retries once
Phases
Define transform. Map event schema to brain page format:
- Input: raw webhook payload (JSON)
- Output: brain page content (markdown) + metadata (slug, type, citations)
- Must sanitize: strip HTML tags, escape script content
Register webhook URL. Provide the external service with the webhook endpoint.
On event received:
- Parse payload
- Run transform function
- Write brain page via
gbrain put - Extract entities, run enrichment
- Add timeline entries to mentioned entities
- Sync:
gbrain sync
Error handling:
- If transform throws: log raw payload to
_dead-letter/{timestamp}.md - Surface error type to agent
- Retry once
- Don't lose events
- If transform throws: log raw payload to
Example Transforms
SMS Received
Input: {from: "+1555...", body: "Meeting moved to 3pm", timestamp: "..."}
Output: Timeline entry on sender's brain page + task update if action item detected
Meeting Completed
Input: {title: "Weekly sync", attendees: [...], transcript: "...", summary: "..."}
Output: Delegate to meeting-ingestion skill
Social Mention
Input: {platform: "twitter", author: "@handle", text: "...", url: "..."}
Output: Brain page in media/ + entity extraction + backlinks
Output Format
Event transformed and written to brain. Report: "Webhook: {event_type} from {source} → {brain_page_path}"
When it fails
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
- A transformed write returns
write_pending(exit 10): the event is accepted; record the request id and poll it, never replay the event under a new id. source_binding_required/insufficient_scope: the webhook's token cannot write that source; tell the user which grant the brain host's operator must add.- A malformed payload: reject it with the parse error and log it; do not write a partial page.
Anti-Patterns
- Passing raw HTML/script to brain pages (XSS risk)
- Silently dropping events when transform fails (use dead-letter queue)
- Processing webhooks without entity extraction
- Not sanitizing external input before brain writes
FAQ
What happens if a conversion fails?
The raw event is saved to a holding folder and retried once, so the event is not lost.
Is web content cleaned before it is saved?
Yes. HTML and script content is stripped so that no raw code ends up in a brain page.
Do incoming events get linked to people and companies?
Yes. The skill runs entity detection on each event and adds timeline entries to the people involved.
Details
Original description by the author
Generic framework for converting external events (SMS, meetings, social mentions) into brain-ingestible signals. Define a transform function, register a webhook URL, and incoming events get processed through the brain pipeline.
repo: garrytan/gbrain
Popularity
- GitHub stars
- 31k
- Ranking position
- #9318
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
gbrain
31kLets your agent search a shared company knowledge brain for facts about people, projects and decisions, and save durable notes to it.
brain-ingest-gate
31kChecks new content against an existing knowledge brain before it is added, to avoid duplicates and resolve named entities first.
brain-link-discipline
31kMakes sure your agent includes a working link to each brain page it reports, in the same message, so you can open it right away.
brain-ops
31kGives your agent the core routine for a knowledge brain: check existing context first, save explicit notes with their source, and link related pages.
Similar skills
knowledge-automation
394kHelps your agent set up a recurring job that brings new content into your Knowledge vault on a schedule, then checks that the job runs.
knowledge-source-ingest
394kHelps your agent keep a Knowledge vault current with new items from chat channels, feeds, or mailboxes, without re-adding what it already has.
benchmark
280kHelps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.