# Connect Telegram reminders

> Set up the bot, private chat and callback connection once.

Canonical: https://ownpost.fyi/docs/guides/telegram

## Before you begin

Telegram and your workspace's HTTPS URL. An administrator configures the bot token and webhook once; you can then change the private chat and reminder timing in Settings.

## Steps

1. In Telegram, open the official BotFather, create a bot with /newbot and keep the bot token private. Open your new bot and press Start.

2. Send the bot a message. Before installing a webhook, use Telegram getUpdates to identify the numeric ID of your private chat. Do not choose a group/channel ID.

3. Store TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in your deployment's secrets. Generate and store a separate TELEGRAM_WEBHOOK_SECRET.

4. Register a Telegram setWebhook request with url set to your workspace's /api/telegram/webhook, secret_token matching TELEGRAM_WEBHOOK_SECRET, and allowed_updates containing callback_query.

5. Inspect getWebhookInfo: its URL must match your workspace and errors should be resolved. An existing webhook prevents getUpdates; follow the official recovery steps when repairing a setup.

6. Open Settings → Connections → Telegram and choose Edit reminder settings under Telegram reminders. Enter Private chat ID, or leave it blank to use the deployment's saved chat. Choose First post reminder, then Save reminder settings.

7. Choose Send test reminder and check your Telegram chat. This verifies message delivery. Test the buttons separately in the next step.

8. Create a routine in Assistant and test Mark done or Snooze from Telegram. Verify that the same occurrence updates in the app and leaves Home when completed.

## A practical example

After a test message arrives, create a small test routine and press Mark done in Telegram. Check that the same item moved to History in OwnPost; receiving a message alone does not verify the buttons.

## Check the result

You receive the test and a real reminder, and its buttons update the intended occurrence.

## Troubleshooting

Bot configured, message delivered and webhook verified are different states. For no message, check Start/chat ID/secrets; for broken buttons, check webhook URL/secret and the private owner chat.

## Keep going

[Complete pending routines from the app or Telegram](https://ownpost.fyi/docs/guides/reminders)

[Choose what can notify you](https://ownpost.fyi/docs/guides/notifications)

[Build your daily writing challenge and routines](https://ownpost.fyi/docs/guides/routines)

[Telegram webhook API and parameters](https://core.telegram.org/bots/api#setwebhook)

## Related

- [Previous: Create a routine](https://ownpost.fyi/docs/guides/routines)
- [Next: Complete routine items](https://ownpost.fyi/docs/guides/reminders)
