Skip to content
Skillpedia
Automations31k · #9318

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

Copy 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

Use this skill to help me: https://github.com/garrytan/gbrain/blob/master/plugin/skills/webhook-transforms/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

  1. 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
  2. Register webhook URL. Provide the external service with the webhook endpoint.

  3. 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
  4. Error handling:

    • If transform throws: log raw payload to _dead-letter/{timestamp}.md
    • Surface error type to agent
    • Retry once
    • Don't lose events

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills