Hermes + Notion + GBrain: A Complete Setup Guide

This post is a continuation in a series detailing how to build the best personal AI assistant, using Hermes, GBrain and now Notion. First install & setup Hermes and then install & configure GBrain.


Usecase: Why do we need Hermes + Notion + Gbrain?

Since the demise of Evernote, I moved my entire digital work & personal life to Notion, including all projects & tasks. My biggest gripe with Notion was that maintaining it was a manual chore, with zero improvement in knowledge & intelligence over time.

As you use Hermes for work & automation, Gbrain learns by extracting, dreaming, synthesizing key learnings and connects the dots automatically.

Once I decided to make Hermes as my Personal AI Assistant, I first connected it to Gbrain to enable automatic learning knowledge graph. What was missing is context of all my projects & tasks which was in Notion. Managing two disconnected systems wasn’t an option. But moving away from Notion entirely isn’t trivial either.

So based on Garry Tan’s Gbrain recipes, I decided to build a custom Hermes + Notion recipe. Now Hermes knows which projects I am working on. I can whatsapp or slack to add, update or complete tasks in natural language just like how I would talk to a person. Hermes interprets it and makes necessary changes to projects & tasks in Notion.

But the kicker is, Gbrain automatically synthesizes key learnings necessary to see patterns & connect the dots across what I read on the internet with the projects & tasks that I am working on a daily basis.

You can download the source-code from Github.


Part 1: Connect Hermes to Notion

Step 1: Create a Notion Integration

  • Go to notion.so/my-integrations → New integration
  • Name it (e.g. “Hermes Agent”), select your workspace
  • Copy the Internal Integration Token — this is your NOTION_TOKEN
  • Open your tasks database in Notion → … (top right) → Connections → add your integration
  • Do the same for every parent page above your database (else it throws 400 error)

Step 2: Get Your IDs

  • Database ID: from your database URL: https://notion.so/yourworkspace/<DATABASE_ID>?v=….
  • The 32-character string before ?v= is your database ID.
  • Project page IDs: Copy the ID from the Notion URL
  • You need one per project.
  • Verify what your integration can actually see — I had the wrong database ID initially.
  • This confirms it:

This returns every page and database your integration can access — with the correct IDs and exact column names. Note them down. My title column was Task name, not Name — that mismatch would have caused silent failures.

Step 3: Install notion-client

Gotcha: notion-client v3 dropped databases.query() entirely. Rather than fight the SDK, skip it and call the Notion REST API directly with requests. It’s simpler and immune to SDK version changes. The scripts below use this approach.

Step 4: Create notion_tasks.py

Install at: ~/.hermes/skills/productivity/notion-tasks/scripts/notion_tasks.py

Test it directly before touching Hermes:

If these work from the shell, Hermes will run them identically.

Step 5: Configure Hermes

Add this block to ~/.hermes/config.yaml under system_prompt:

Update channel_prompts.default:

Critical: The skill must be registered in both system_prompt AND channel_prompts.default. Missing either causes Hermes to apply the skill inconsistently.

Restart Hermes


Part 2: Connect Notion to GBrain

The idea: every Sunday, fetch last week’s Notion tasks, distil them with OpenAI, write a summary knowledge page to GBrain per project. Your agent accumulates context automatically.
GBrain already uses OpenAI for embeddings — so we reuse its existing API key. No new credentials needed.

Step 1: Find the right Python

GBrain’s openai package is Node.js, not Python. Hermes’s venv already has the Python openai package:

Use this Python for the enrichment script — not system Python.

Step 2: Find the GBrain binary

Check the available commands — GBrain v0.22+ uses put <slug> not page create:

Step 3: Create gbrain_enrichment.py

Step 4: Test manually

Verify in GBrain:

Step 5: Schedule weekly cron

Add (every Sunday at 8pm):


Github Repo

Find the Github repo here: https://github.com/mantenasud/hermes-notion-gbrain.


Thanks to @Teknium & rest of the @NousResearch team for building an amazing product and @garrytan for open-sourcing super smart Gbrain.

That’s all folks!
If you have suggestions to improve this further, please comment. Would love to learn. Please Like, Repost so other first timers can also learn. Please subscribe, to learn with me, how to Build the World’s Best Personal AI Assistant for yourself.

†

Posted in Uncategorized

Leave a Reply