{"slug": "automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content", "title": "Automating NotebookLM with Hermes Agent: From Research to Multi-Platform Content", "summary": "A developer automated the process of extracting content from Google's NotebookLM by wiring it directly into the Hermes Agent, reducing a 30-minute manual workflow to about two minutes. The engineer bypassed Google's bot detection by exporting cookies from a real Chrome browser session, enabling programmatic access to create notebooks, add sources, and generate artifacts like podcasts and infographics. The solution uses a custom Python wrapper (`notebooklm-py`) that provides a CLI and API, allowing the agent to handle the entire pipeline from research to multi-platform publishing without manual intervention.", "body_md": "*NotebookLM made the writing smarter — analyzing sources, generating podcasts, building visuals. But getting those artifacts out of Google and into my publishing pipeline still took 30 minutes of manual clicking and downloading. I fixed that by wiring NotebookLM directly into Hermes Agent. Now research turns into publish-ready content in about two minutes.*\n\nNotebookLM is one of the best research tools Google has shipped. Drop in a PDF, a few URLs, or a research query and it builds a notebook — a living summary you can chat with, quiz, or turn into artifacts.\n\nBut here is where it breaks for daily publishing. After NotebookLM generates a podcast, a mind map, or a slide deck, you are back to manual mode. Visit the site. Click each artifact. Download. Rename. Move to the right folder. Format for the platform you are posting to. I was spending nearly half an hour on this for every article. The AI did the creative work; I did the file management.\n\nWorse, the standard approach for automating this — browser automation via Playwright — hits a wall. Google detects headless Chromium and Firefox instantly. The login page throws \"browser not secure\" and you are done. Every automation script I tried failed at authentication.\n\nI needed a way to run NotebookLM from code, download artifacts programmatically, and route them into my publishing pipeline. Hermes Agent already handled the platform distribution. I just needed the bridge.\n\nThe only authentication method that survived Google's bot detection was exporting cookies from my real Chrome browser. No headless browsers, no Puppeteer tricks. Just real cookies from a real session.\n\nHere is what works reliably:\n\n`notebooklm.google.com`\n\nin your normal Chrome or Edge`google.com`\n\nand `notebooklm.google.com`\n\nas Netscape format using any cookie-export extension`storage_state.json`\n\nformat`notebooklm-py`\n\nwrapper reads that state file and gets a valid token\n\n``` python\n# convert_netscape_cookies.py — one-time setup, reusable\nimport json, sys, datetime, urllib.parse\n\nnetscape_lines = open(sys.argv[1]).readlines()\ncookies = []\nfor line in netscape_lines:\n    line = line.strip()\n    if not line or line.startswith(\"#\"):\n        continue\n    parts = line.split(\"\\t\")\n    if len(parts) < 7:\n        continue\n    domain, flag, path, secure, expiry, name, value = parts[:7]\n    cookies.append({\n        \"name\": name, \"value\": value, \"domain\": domain.lstrip(\".\"),\n        \"path\": path, \"expires\": int(expiry) if expiry.isdigit() else None,\n        \"httpOnly\": \"HttpOnly\" in flag or \"httponly\" in flag,\n        \"secure\": \"Secure\" in flag or \"secure\" in flag,\n        \"sameSite\": \"Lax\"\n    })\n\nstorage = {\"cookies\": cookies, \"origins\": []}\nwith open(\"storage_state.json\", \"w\") as f:\n    json.dump(storage, f, indent=2)\nprint(f\"Converted {len(cookies)} cookies, saved to storage_state.json\")\n```\n\nUsage: `python convert_netscape_cookies.py exported_cookies.txt`\n\nI run this once per session. 23 cookies are enough for full API access. Until Google rotates their auth, this is the only reliable path.\n\nOnce authenticated, `notebooklm-py`\n\nexposes a clean CLI and Python API. I wrapped this into Hermes skills so the agent can create notebooks, add sources, generate artifacts, and poll for completion without me touching the browser.\n\n```\n# Create a notebook\npython -m notebooklm create \"Philosophy Notes\"\n# → returns notebook ID\n\n# Add sources — URLs, files, research queries\npython -m notebooklm source add <notebook-id> https://example.com/article.pdf\npython -m notebooklm source add-research <notebook-id> \"Stoicism in modern productivity\"\n```\n\nSources can be URLs, local files, Google Drive URLs, or research queries. NotebookLM processes them and builds an indexed knowledge base you can chat with.\n\nEach artifact has its own command and output format.\n\n| Artifact | Command | Output | Best For |\n|---|---|---|---|\n| Audio Overview | `generate audio` |\nMP3 | Podcasts, Telegram voice messages |\n| Infographic | `generate infographic \"cover...\"` |\nPNG | Article covers, diagrams, flowcharts |\n| Mind Map | `generate mind-map --instructions \"...\"` |\nJSON | Architecture overviews, concept maps |\n| Slide Deck | `generate slide-deck \"5 slides...\"` |\nPresentations, LinkedIn carousels | |\n| Quiz | `generate quiz` |\nText | Telegram polls, engagement |\n\nNote the positional argument for prompts. `--prompt`\n\ndoes not exist for most artifacts. Infographic, slide-deck, and report accept the description as a positional string. Mind-map only accepts `--instructions`\n\n. Audio accepts a positional topic or nothing — it builds the podcast from your sources directly.\n\nOne gotcha: `--wait`\n\ncan time out on slow generations (over 60 seconds). I always launch without waiting, get the task ID, then poll separately:\n\n```\n# Launch generation without waiting\npython -m notebooklm generate infographic \"Dark-themed cover for article about AI research tools, ocean palette\" --orientation landscape --style professional --json\n# → {\"task_id\": \"...\", \"status\": \"pending\"}\n\n# Poll in a loop until done\npython -m notebooklm artifact poll <task_id>\n```\n\nWhen the status flips to `completed`\n\n, a Google Cloud Storage URL is returned. I download that asset and route it to the right platform folder.\n\nThe full flow in Hermes Agent looks like this:\n\n```\nSource material (markdown, PDFs, URLs)\n        ↓\nNotebookLM notebook created\n        ↓\nSources added → NotebookLM indexes and summarizes\n        ↓\nArtifacts generated (infographic, mind-map, audio, slides)\n        ↓\nHermes downloads, compresses, renames assets\n        ↓\nPlatform-specific routing:\n   Dev.to      → full article with embedded infographic\n   Telegram    → voice message (audio compressed to 48kbps mono)\n   LinkedIn    → carousel from slide deck PDF\n   Medium      → essay with timeline / quote cards\n   Bluesky     → dense teaser + link to full article\n   Mastodon    → threaded summary with cover image\n```\n\nThe whole sequence runs as a single Hermes skill. I trigger it with one line: `generate notebooklm article for <topic>`\n\n. The agent creates the notebook, waits for artifacts, downloads them, compresses audio for Telegram's 20 MB limit, and writes platform drafts in parallel.\n\nNo more clicking through Google UI. No more drag-and-drop. The AI generates; the pipeline publishes.\n\nHere is the core pattern I use inside the Hermes skill:\n\n``` python\nfrom notebooklm import NotebookLMClient\nimport requests, os, time\n\nclient = NotebookLMClient()\n\n# 1. Create notebook\nnb = client.create_notebook(\"Stoic Productivity Analysis\")\n\n# 2. Add sources — mix of URLs and research queries\nclient.add_source(nb.id, source_url=\"https://example.com/seneca-essay.pdf\")\nclient.add_source(nb.id, source_research=\"modern applications of Stoic principles\")\n\n# 3. Generate cover image (infographic)\ncover = client.generate_artifact(\n    nb.id,\n    artifact_type=\"infographic\",\n    instructions=\"Dark-themed cover image for a technical article about AI-powered research tools. Ocean color palette.\"\n)\n\n# 4. Poll for completion\ntask_id = cover.task_id\nwhile True:\n    status = client.poll_artifact(task_id)\n    if status.status == \"completed\":\n        break\n    if status.status in (\"failed\", \"error\"):\n        raise RuntimeError(f\"Artifact failed: {status.error}\")\n    time.sleep(10)\n\n# 5. Download\ncover_url = status.url\nr = requests.get(cover_url)\nopen(\"assets/generated/cover.png\", \"wb\").write(r.content)\n\n# 6. Generate audio podcast\naudio = client.generate_artifact(nb.id, artifact_type=\"audio\")\naudio_task = audio.task_id\nwhile True:\n    status = client.poll_artifact(audio_task)\n    if status.status == \"completed\":\n        break\n    time.sleep(10)\n\n# 7. Download\naudio_url = status.url\nr = requests.get(audio_url)\nopen(\"assets/generated/podcast.mp3\", \"wb\").write(r.content)\n\n# 8. Compress for Telegram (20 MB limit)\nos.system(\"ffmpeg -i assets/generated/podcast.mp3 -b:a 48k -ac 1 assets/generated/podcast_tg.mp3\")\n```\n\nThe `NotebookLMClient`\n\nreads the same `storage_state.json`\n\nI built from Chrome cookies. No login step, no browser puppetry. Just API calls against a valid Google session.\n\nNotebookLM is not where content starts — it is where research gets processed. My pipeline already had source material (markdown drafts, PDFs, web pages). NotebookLM adds three things other tools do not:\n\n**Audio Overview** — two-voice podcast generated from your sources. I drop this straight into Telegram as a voice message. Compression takes a 30 MB raw file down to 7-10 MB. Voices stay clear at 48 kbps mono.\n\n**Infographics** — article covers and process diagrams generated from a text description. Before this I used Python Pillow locally. It worked, but every cover looked like the same template with slightly different text. NotebookLM generates unique styles per article. I just describe what I want.\n\n**Mind Maps** — architecture and concept maps that I embed in Dev.to and Medium articles. The output includes node coordinates in JSON, so I can render it or let NotebookLM produce the visual directly.\n\nI still write the original text. I still decide the angle and the argument. But the repetitive work — cover design, audio production, diagram drawing — moved from my desk to the agent's queue.\n\n**Playwright login is dead.** Every Chromium and Firefox instance I tried was detected by Google. \"Browser not secure\" at the login screen, every time. The cookie export method is the only approach that still works.\n\n**Wrong prompt syntax.** I spent an hour debugging `generate infographic --prompt \"...\"`\n\nbefore realizing the flag does not exist. Positional arguments only. For mind-map, use `--instructions`\n\n.\n\n**Audio timing.** NotebookLM audio generation takes 5-10 minutes. If I use `--wait`\n\n, the CLI sometimes times out after 60 seconds. I now always launch with `--json`\n\nto get the task ID, then poll in a loop until `completed`\n\n.\n\n**Image size limits.** Bluesky caps images at 2 MB. Raw NotebookLM PNGs are often 2.3-2.8 MB. I run them through `ffmpeg`\n\nfor JPEG compression at 800px width before uploading. Yes, ffmpeg — it handles image scaling too.\n\nContent production dropped from research plus design plus publishing to research plus about two minutes. The bottleneck is no longer tooling — it is deciding what to write. NotebookLM handles visuals and audio. Hermes handles routing and platform formatting. I handle ideas.\n\nThe full pipeline code is open-source:\n\n[https://github.com/AzamatSafarov/hermes-notebooklm-bridge](https://github.com/AzamatSafarov/hermes-notebooklm-bridge)\n\nIt includes the cookie converter, the one-command pipeline, a Chrome bookmarklet for one-click cookie export, and a working example of Hermes Agent integration. If you are already using Hermes, you can slot it in with two CLI commands and a cookie file.\n\nThis whole pipeline runs on the **LLM Wiki** pattern by Andrej Karpathy — a persistent wiki that the LLM builds and maintains as you go, instead of RAG that re-discovers everything from scratch on every query.\n\n[https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f#file-llm-wiki-md](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f#file-llm-wiki-md)\n\n**Dev.to**\n\n[https://dev.to/azamat_safarov_119e17602f/](https://dev.to/azamat_safarov_119e17602f/)\n\n**Medium**\n\n[https://medium.com/@akutagorasava777](https://medium.com/@akutagorasava777)\n\n**Paragraph**\n\n[https://paragraph.com/@azamatsafarov](https://paragraph.com/@azamatsafarov)", "url": "https://wpnews.pro/news/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content", "canonical_source": "https://dev.to/azamat_safarov/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content-4o1l", "published_at": "2026-05-26 10:38:27+00:00", "updated_at": "2026-05-26 11:04:08.551675+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-products", "generative-ai", "ai-research"], "entities": ["NotebookLM", "Google", "Hermes Agent", "Playwright", "Chromium", "Firefox"], "alternates": {"html": "https://wpnews.pro/news/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content", "markdown": "https://wpnews.pro/news/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content.md", "text": "https://wpnews.pro/news/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content.txt", "jsonld": "https://wpnews.pro/news/automating-notebooklm-with-hermes-agent-from-research-to-multi-platform-content.jsonld"}}