I Just Wanted a WhatsApp Channel That Teaches Me One German Word a Day. It Took a Week and a Git History Rewrite.
Here's the thing nobody tells you about WhatsApp automation: the hard part was never the AI, and it was never the German. It was WhatsApp itself. I wanted something dumb simple - a WhatsApp Channel that posts one German word every morning, A1 level, with an example sentence and a mnemonic. Gemini can write that in a second. The actual project turned out to be an argument with WhatsApp's session…
Nobody tells you that the challenging part of creating a WhatsApp channel that posts one German word a day is not the AI or the language, but the WhatsApp platform itself. The author wanted a simple solution: a WhatsApp channel that sends a single German word each morning, complete with a sample sentence and mnemonic. However, the project became complicated, involving multiple hosting platforms, the git history, and the WhatsApp session model.
The 43MB 仓库 , whatsapp-web.js, is the library commonly used, but it presents difficulties when trying to deploy the project. The session it needs to remain logged in is a complete Chromium profile, including cookies, IndexedDB, and cache, amounting to 43MB. This size exceeds GitHub Secret limits, requiring a workaround of encoding and decoding the session.
Moreover, the session expires unpredictably, and the QR code linking process is cumbersome on a headless server. The author explored two solutions: either run the linking step once on a local machine or use a different library, Baileys, which communicates directly with WhatsApp's multi-device protocol via WebSocket. Switching to Baileys resolved both the session and hosting issues, allowing the project to run on a small free-tier server with minimal resources.
Additionally, the author removed sensitive data from the git history to prevent potential account hijacking, using git filter-repo to strip the compromised files from all commits. The final solution is a simple GitHub Actions workflow that fetches the WhatsApp session from a free MongoDB cluster, requests a new word from Gemini, posts the message, and updates the session in MongoDB.
The entire process costs just a few minutes of free CI time daily and requires no server or Docker image.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.