Automate the collection and transmission of past month's pictures from an Immich shared album to a Telegram channel.
- Monthly Reminder: Pings a list of users on the 1st of every month.
- Confirmation System: Waits for all users to reply with
/yesbefore proceeding. - Chronological Order: Fetches photos from a specific Immich album and sends them to a Telegram channel in chronological order.
- Media Support: Handles both photos and videos (up to Telegram's limits).
-
Clone the repository.
-
Install dependencies:
pip install -r requirements.txt
-
Configure the bot:
- Copy
.env.exampleto.env. - Fill in your
TELEGRAM_BOT_TOKEN. - Fill in your
TELEGRAM_CHANNEL_ID(the bot must be an admin in the channel). - Add the Telegram user IDs of you and your friends to
ALLOWED_USER_IDS(comma-separated). - Fill in your
IMMICH_URLandIMMICH_API_KEY. - (Optional) Adjust
ALBUM_NAME_PATTERNto match your Immich album naming convention. Default isPictures {month} {year}(e.g., "Pictures April 2026").
- Copy
-
Run the bot:
python bot.py
- Automatic: The bot will automatically message all allowed users at 10:00 AM on the 1st of each month.
- Manual Trigger: Use
/triggerto manually start the check for the previous month (useful for testing or if you missed the start of the month). - Status: Use
/statusto see who has confirmed so far. - Confirm: Users reply with
/yeswhen they have finished uploading their pictures.
bot.py: Main entry point, handles Telegram logic and scheduling.immich_client.py: Wrapper for the Immich REST API.state.json: Local persistence for user confirmations (generated at runtime).