This application automatically checks the Spanish Embassy's appointment website for available slots and sends notifications via Telegram to multiple users when appointments become available.
- Multi-user support: Monitor appointments for multiple users simultaneously
- Efficient checking: Single appointment check per cycle, then notifies all users
- Parallel notifications: All users get notified instantly when slots are found
- Personalized credentials: Each user receives their own embassy credentials in notifications
- Docker and Docker Compose
- Telegram Bot Token (get it from @BotFather)
- Telegram User IDs for each user you want to notify
- Embassy website credentials for each user
- Clone this repository
- Create a
compose.override.ymlfile with your environment variables:services: notifier: environment: - EMBASSY_URL=your_embassy_appointments_url_here - TELEGRAM_BOT_TOKEN=your_bot_token_here - 'USERS_JSON=[{"telegram_user_id":"123456789","embassy_id":"user1@example.com","embassy_password":"password1"},{"telegram_user_id":"987654321","embassy_id":"user2@example.com","embassy_password":"password2"}]' - HEADLESS=true
The USERS_JSON environment variable should contain a JSON array of user objects. Each user object must have:
telegram_user_id: The Telegram user ID to send notifications toembassy_id: The user's embassy website username/IDembassy_password: The user's embassy website password
Example for a single user:
[{"telegram_user_id":"410079790","embassy_id":"92350447","embassy_password":"your_password"}]Example for multiple users:
[
{
"telegram_user_id":"410079790",
"embassy_id":"user1@example.com",
"embassy_password":"password1"
},
{
"telegram_user_id":"987654321",
"embassy_id":"user2@example.com",
"embassy_password":"password2"
}
]Note: Make sure to wrap the USERS_JSON value in single quotes in YAML to prevent parsing issues.
Start the application:
docker compose -f docker-compose.yml -f compose.override.yml up -dView logs:
docker compose -f docker-compose.yml -f compose.override.yml logs -fStop the application:
docker compose -f docker-compose.yml -f compose.override.yml downInstall dependencies:
bun installRun in development mode:
bun run devThe development script will automatically load environment variables from your compose.override.yml file.
- The application runs in a loop, checking for appointments at the configured interval
- It uses Puppeteer to scrape the embassy website
- When appointment slots are found, it sends personalized notifications to all users via Telegram
- Each user receives their own embassy credentials in the notification
- The application runs in headless mode by default, suitable for server deployment
The following environment variables can be configured in the compose files:
EMBASSY_URL: The URL of the embassy appointment page (default: https://www.citaconsular.es/)TELEGRAM_BOT_TOKEN: Your Telegram bot token (required)USERS_JSON: JSON array of users with their telegram_user_id, embassy_id, and embassy_password (required)SCRAPE_INTERVAL_MINUTES: Check interval in minutes (default: 10)PAGE_TIMEOUT_MS: Page load timeout in milliseconds (default: 60000)HEADLESS: Whether to run in headless mode (default: true)
To find your Telegram User ID:
- Message @userinfobot on Telegram
- The bot will reply with your user ID
- Use this ID in the
telegram_user_idfield