ARCHIVED - NO LONGER MAINTAINED
As of October 22, 2025, the application window for Spanish citizenship under the "Law of Grandchildren" (Ley de Nietos / Ley de Memoria Democrática) has officially closed. This repo is no longer maintained or monitored, and the script no longer works as the application portal is closed.
It served its purpose and helped during the application period. Keeping it public for historical and educational purposes.
An automated tool to solve a simple problem: getting an appointment at the Spanish Consulate in Santiago, Chile was very difficult. Slots would appear and disappear within seconds, and manually refreshing the page was a losing battle.
This script automated the process:
- Used Puppeteer (headless browser automation) to navigate the Spanish consulate's appointment system
- Checked if "LEY MEMORIA" appointment slots were available
- Sent instant push notifications to your phone via Pushover when slots opened up
It ran on a schedule (via cron job or render.com), checking continuously so you didn't have to.
- Linux/MacOS
- Node.js 20
npm installThe script runs once per execution. Use a scheduler (cron, render.com cron jobs, etc.) to run it periodically.
node index.jsFor production mode:
NODE_ENV=production node index.jsThe script used Pushover for notifications—a one-time $4.99 payment for 10k push notifications per month.
Required environment variables:
PUSHOVER_APP_TOKEN=<App key>
PUSHOVER_USER_KEY=<User or Group key>
This was deployed on render.com. Due to Puppeteer cache issues, a workaround was needed:
- Set
PUPPETEER_CACHE_DIR=/opt/render/project/puppeteer - Use the
render-buildandrender-runcommands - See
puppeteer.config.cjsfor the cache workaround
Built quickly for personal use. Never meant to be scalable or maintainable—just a tool that got the job done when it mattered.