Skip to content

Send or forward messages from Telegram

Start with a connected interface. Choose Web for your own setup, or CLI / Agent for terminal instructions.

Set up in the Web app

  1. Create a dedicated bot with @BotFather: send /newbot, follow the prompts, and retain its token.
  2. Obtain your own numeric user ID using Telegram Desktop's data export. Open Settings → Advanced → Export Telegram data, include personal information, and choose JSON. Use personal_information.user_id, not your @username or the bot's ID. Telegram may require another-device confirmation or a waiting period.
  3. Prepare the Extension: inkcre/telegram version 0.3.0 on Core Host 0.2.x. Select the online Core client to install and enable it.
  4. Open Sources and the create-source form. Enter Nickname My Telegram inbox and choose Type extensions.telegram.source.Source. Paste this into Config, replace both values, and save/create:
json
{
  "bot_token": "YOUR-BOT-TOKEN",
  "bound_user_id": 123456789,
  "download_attachments": false
}
  1. Send a distinctive private message to the bot, then collect once. Saved messages receive a 👍 reaction. Index and search for the text.
  2. Schedule collection; */5 * * * * polls every five minutes while Core runs.

Use one bot per Source. This is an inbox, not group/channel history import or a notification destination. Attachments remain metadata-only unless download_attachments is enabled. Telegram retains updates for a limited time; keep another copy if your instance sleeps.

Start with a working instance and a connected CLI. The version below targets Core Host 0.2.x; check the linked release listing for other Host versions. If already installed, inspect inkcre-cli extension get inkcre/telegram before changing it. Keep credential files and command output private.

  1. Create a dedicated bot with @BotFather: send /newbot, follow its naming prompts, and retain the token. Obtain your own numeric user ID using Telegram Desktop's data export: open Settings → Advanced → Export Telegram data, include personal information, and choose JSON format. In the exported JSON, use personal_information.user_id, not your @username or the bot's ID. Telegram may require confirmation from another device or a waiting period.

  2. Install and enable the Core Extension:

    sh
    inkcre-cli extension install inkcre/telegram --version 0.3.0
    inkcre-cli extension enable inkcre/telegram
  3. Save telegram.json, replacing the token and example user ID:

    json
    {
      "nickname": "My Telegram inbox",
      "config": {
        "bot_token": "YOUR-BOT-TOKEN",
        "bound_user_id": 123456789,
        "download_attachments": false
      }
    }
    sh
    inkcre-cli source create --type extensions.telegram.source.Source --input telegram.json
  4. Send a distinctive text message in a private chat with the bot, then collect the Source ID. Successfully saved messages receive a 👍 reaction. After indexing, search for its text.

  5. Add a schedule to forward messages without running the CLI each time. */5 * * * * polls every five minutes while Core is awake. Telegram retains updates for a limited time, so a long-sleeping instance should not be your only copy.

Use one bot for one Source. This is a capture inbox, not group/channel history import or a notification destination. Attachments are metadata-only in this example; enable download_attachments when you want their bytes saved too. See the Telegram collector and published releases.

Next: index and search for a known item, then schedule collection.