Skip to content

X Grok to Obsidian

Verified

Export Grok conversations from X (x.com) via browser-network capture and convert them into Obsidian-ready Markdown files. Use when a user wants to back up Gr...

109 downloads
$ Add to .claude/skills/

About This Skill

Export Grok conversations in two stages.

Stage 1 — Capture conversation JSON from X/Grok

Run the browser script in Chrome DevTools Console on `https://x.com/i/grok` while logged in.

Use script: `scripts/export_grok_items_capture.js`

  • Behavior:
  • Intercept only `GrokConversationItemsByRestId` responses (`fetch` + `XHR`)
  • Load chat history with multi-pass scrolling
  • Open each discovered conversation to trigger backend responses
  • Save one JSON file with conversation metadata + ordered item payload
  • Quick settings (edit at top of script before run):
  • `INDEX_PASSES` (default `3`)
  • `CAPTURE_PASSES` (default `3`)
  • `MAX_CHATS` (`null` = all, or number for test)
  • Output:
  • `grok-network-capture-<timestamp>.json` downloaded by browser

Stage 2 — Convert JSON to Obsidian Markdown

Run Python converter locally:

```bash python3 scripts/convert_grok_capture_to_md.py \ --input /path/to/grok-network-capture-*.json \ --out /path/to/output-folder ```

  • Converter defaults:
  • Frontmatter fields: `URL`, `created`
  • Body starts immediately with `# <title>` (no blank line before header)
  • Turn headings: `## User` / `## Grok` (no numbering)
  • Turn separator: `---`
  • Turn order: reverse API item order (API is newest-first)
  • Reasoning/deepsearch omitted by default
  • Useful flags:
  • `--include-reasoning` include `thinking_trace` blocks
  • `--separator "---"` customize turn separator
  • `--overwrite` overwrite same-title files instead of creating `Title 2.md`

Notes

  • Prefer several index/capture passes because X history rendering is lazy and inconsistent.
  • If discovered chat count is unexpectedly low, re-run Stage 1 with higher pass counts.
  • Keep scripts generic; avoid user-specific absolute paths.

Use Cases

  • Export Grok AI conversations from X (x.com) via browser network capture
  • Convert exported Grok conversations to Obsidian-compatible markdown files
  • Archive AI conversations for future reference and knowledge management
  • Build a personal knowledge base from Grok conversation history
  • Organize Grok conversations with proper metadata and linking in Obsidian

Pros & Cons

Pros

  • +Solves a specific pain point — no official Grok conversation export exists
  • +Obsidian markdown output integrates into existing knowledge management workflows
  • +Browser network capture approach works without API access

Cons

  • -Browser network capture is fragile and may break with X platform changes
  • -Requires manual browser interaction to trigger the network capture

FAQ

What does X Grok to Obsidian do?
Export Grok conversations from X (x.com) via browser-network capture and convert them into Obsidian-ready Markdown files. Use when a user wants to back up Gr...
What platforms support X Grok to Obsidian?
X Grok to Obsidian is available on Claude Code, OpenClaw.
What are the use cases for X Grok to Obsidian?
Export Grok AI conversations from X (x.com) via browser network capture. Convert exported Grok conversations to Obsidian-compatible markdown files. Archive AI conversations for future reference and knowledge management.

100+ free AI tools

Writing, PDF, image, and developer tools — all in your browser.