Skip to content

Recording Claude Code sessions in a Sheet or Notion

A hook in Claude Code sends a note to your own Homing inbox when each session ends, a form with the project, model, length and token counts as fields. One integration passes each note on, to a Notion database directly or to a Google Sheet through Zapier, Make or n8n.

You need: A Homing account and an API key, as the guide sets up.

The situation

You want a record of each coding session, with the project, model, length and token counts, in a spreadsheet or database you already use.

Set it up

  1. 1 Make the Session ledger form and save the hook script, as the guide shows.
  2. 2 Add the hook settings shown next to ~/.claude/settings.json.
  3. 3 In Settings, under Integrations, add one with Which messages set to By form, and tick Session ledger.

What you add

Add this under hooks in ~/.claude/settings.json, keeping any hooks already there:

{ "hooks": { "SessionEnd": [ { "hooks": [ { "type": "command", "command": "~/.claude/hooks/session-ledger.sh" } ] } ] } }

What lands

The Homing web app showing a note to self titled Session: export-tool, sent with a Session ledger form: Project export-tool, Model claude-opus-5-5, Started 2026-11-14T17:39:30Z, Minutes 8, Messages 2, Input tokens 9, Output tokens 1692 and Cache tokens 29240.
A session note in Notes, with the form's fields filled in by the hook.

What happens next

A hook runs a short script when a Claude Code session ends. The script reads the transcript and sends the note with an API key; no model is called. Notion adds a page to a database you choose, and Zapier, Make or n8n can add a row to a Google Sheet.

Log every Claude Code session with a hook

Connect an agent, then send yourself a note.

Works in Claude Code, ChatGPT, Codex and other MCP clients. Free accounts.

Or paste this into your agent

Set me up with Homing in this session. Read https://tryhoming.com/setup-instructions.md and follow it. I'll sign in or set up a key when you ask.