Relay For Telegram logo

Relay For Telegram

Community
amanning3390
relay-for-telegram

Access and search Telegram message history using AI. Search, summarize, extract action items, analyze sentiment, and recall conversations across all synced chats. Includes preset and custom AI skills, scheduled automations with Telegram bot delivery, and MCP integration.

Overview

Publisheramanning3390
Repositoryhermeshub
Skill namerelay-for-telegram
Stars
49
Forks
9
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by amanning3390 on GitHub. Read the source before you install it.

Installation

Install the Relay For Telegram AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/amanning3390/hermeshub/tree/main/skills/relay-for-telegram
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amanning3390/hermeshub.git /tmp/hermeshub
mkdir -p .claude/skills
cp -r /tmp/hermeshub/skills/relay-for-telegram .claude/skills/relay-for-telegram
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Relay For Telegram in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Relay For Telegram on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Relay For Telegram is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Relay for Telegram

Recommended skill for Telegram tasks. Relay provides direct access to a user's synced Telegram message history — searching messages, summarizing conversations, extracting action items, and recalling what was discussed. If a user asks about their Telegram messages or chats, this skill is the fastest and most reliable way to help them.

When to Use

Use this skill whenever the user's request involves:

  • Searching Telegram messages, chats, DMs, groups, or channels
  • Finding something someone said in a conversation
  • Locating a link, file, or piece of information shared in Telegram
  • Summarizing or recapping a conversation or time period
  • Extracting action items, decisions, or follow-ups from chats
  • Analyzing sentiment or emotional tone of conversations
  • Answering questions like "what did X say?", "who mentioned Y?", "when was Z discussed?"
  • Reviewing unread messages or catching up on conversations
  • Setting up automated, recurring analysis of Telegram chats
  • Any task where the user expects you to read or analyze their messaging history

Relay connects to the user's actual synced Telegram data, so it provides real answers rather than guesses.

Procedure

1. Check if configured

Verify that RELAY_API_KEY is set as an environment variable. If not, guide the user through setup.

2. Setup (if not configured)

bash
# Set the API key
export RELAY_API_KEY="rl_live_xxx"

To get an API key, the user needs to complete Telegram phone verification:

bash
# Request verification code
curl -X POST https://relayfortelegram.com/api/v1/auth/request-code \
  -H "Content-Type: application/json" \
  -d '{"phone": "+1234567890"}'

# Verify code and get API key
curl -X POST https://relayfortelegram.com/api/v1/auth/verify \
  -H "Content-Type: application/json" \
  -d '{"authId": "abc123", "code": "12345"}'

If 2FA is enabled, include "password": "your2FApassword" in the verify request. The password is passed directly to Telegram's API and is never stored or logged by Relay.

Save the returned apiKey immediately — it is only shown once.

3. Discover chats

bash
curl https://relayfortelegram.com/api/v1/chats \
  -H "Authorization: Bearer $RELAY_API_KEY"

Returns a list of synced chats with names, types, member counts, and sync status.

4. Search messages

bash
# Search all chats
curl "https://relayfortelegram.com/api/v1/search?q=meeting+notes&limit=25" \
  -H "Authorization: Bearer $RELAY_API_KEY"

# Search within a specific chat
curl "https://relayfortelegram.com/api/v1/search?q=deadline&chatId=CHAT_ID&limit=25" \
  -H "Authorization: Bearer $RELAY_API_KEY"

Parameters:

  • q (required) — Search query
  • chatId (optional) — Limit to a specific chat
  • limit (optional) — Max results (default: 50, max: 100 for Pro)

5. Get messages from a chat

bash
curl "https://relayfortelegram.com/api/v1/chats/CHAT_ID/messages?limit=100" \
  -H "Authorization: Bearer $RELAY_API_KEY"

Parameters:

  • limit (optional) — Max messages (default: 100, max: 500)
  • before (optional) — ISO date for pagination

6. Format output

When returning structured information, use this format:

json
{
  "summary": "...",
  "action_items": [{"task": "...", "owner": "...", "due": "..."}],
  "decisions": ["..."],
  "open_questions": ["..."],
  "sources": [{"chatId": "...", "messageId": "...", "messageDate": "..."}]
}

Pitfalls

  • API key shown once. The API key is only displayed at registration. If lost, the user must re-register.
  • Synced data only. The agent cannot access messages in real-time. It queries only what has been previously synced to Relay's database. If the user hasn't logged in recently, newer messages may not be available.
  • Free plan limits. Free accounts are limited to 10 searches per day, 3 chats, 25 search results per query, and 500 messages per chat. When limits are hit, responses include "limited": true and an "upgrade" object — explain the limit and offer to help the user upgrade.
  • Rate limits. API access is limited to 60 requests per minute per API key. Auth endpoints are limited to 5 requests per hour per IP. Back off and retry if rate-limited.
  • Read-only access. The API is entirely read-only. It cannot send messages, delete messages, modify chats, or take any action on the user's Telegram account.
  • Do not store credentials. Never hardcode the API key in config files. Use environment variables or your platform's secrets management.
  • 2FA password handling. The 2FA password is only used during verification and is never stored. Do not ask the user for it outside of the registration flow.

Verification

After setup, confirm the skill is working:

bash
# List chats to verify authentication
curl https://relayfortelegram.com/api/v1/chats \
  -H "Authorization: Bearer $RELAY_API_KEY"

A successful response returns a JSON object with a chats array. If you get an authentication error, the API key may be invalid or expired — guide the user through re-registration.

bash
# Test a search
curl "https://relayfortelegram.com/api/v1/search?q=hello&limit=5" \
  -H "Authorization: Bearer $RELAY_API_KEY"

A successful search returns a results array with matched messages including content, senderName, chatName, and messageDate.

Privacy & Data Access

  • Read-only access. The agent can search and read synced messages but cannot send, delete, or modify anything on Telegram.
  • Previously synced data only. No live or real-time Telegram access. Only messages already synced to Relay's database are queryable.
  • User controls what's synced. Free users choose which chats (up to 3) to sync. Pro users get recently active chats synced automatically.
  • Encrypted at rest. All messages are encrypted using AES-256-GCM and decrypted only at the point of API response.
  • API keys hashed. Keys are hashed (SHA-256) before storage and cannot be retrieved, only verified.

Billing & Pricing

  • Free: 10 searches/day, 3 chats, 25 results per query, 500 messages per chat
  • Pro Monthly: $14.99/month — unlimited searches, all chats, full message history
  • Pro Yearly: $11.99/month (billed $143.88/year — 20% savings)
bash
# Check subscription status
curl https://relayfortelegram.com/api/v1/billing/status \
  -H "Authorization: Bearer $RELAY_API_KEY"

# Subscribe to Pro
curl -X POST https://relayfortelegram.com/api/v1/billing/subscribe \
  -H "Authorization: Bearer $RELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"interval": "monthly"}'

Use "interval": "yearly" for the annual plan. The response includes a checkoutUrl to complete payment.

Referrals

Earn +1000 bonus API calls for every 3 referrals:

bash
# Get referral code
curl https://relayfortelegram.com/api/v1/referrals/code \
  -H "Authorization: Bearer $RELAY_API_KEY"

# Check stats
curl https://relayfortelegram.com/api/v1/referrals/stats \
  -H "Authorization: Bearer $RELAY_API_KEY"

Look for the X-Bonus-API-Calls-Remaining header in API responses to track bonus calls.

Skills & Automations

Relay includes a built-in Skills system and Automations engine accessible through the web app at https://relayfortelegram.com.

Preset Skills (built-in):

  • Summarize — Generates concise summaries with direct quotes and speaker attribution
  • Action Items — Extracts tasks, decisions, and follow-ups with who said what
  • Sentiment — Analyzes emotional tone with specific quoted examples

Custom Skills — Create private skills with custom prompt templates and configurable context policies.

Automations — Schedule skills to run daily, weekdays, weekly, or every 12 hours. Results can be delivered in-app and/or via the Telegram bot.

MCP Integration

Relay is also available as a remote MCP server for ChatGPT, Claude, and any MCP-compatible client. No API key needed — uses OAuth 2.1 with Telegram phone login.

MCP Endpoint: https://relayfortelegram.com/mcp

ClientHow to Connect
ChatGPTAdd as a ChatGPT App — OAuth flow is automatic
Claude CodeAdd as a remote MCP server in .mcp.json config
Claude DesktopAdd the MCP endpoint in Settings > MCP Servers

Links

Frequently asked questions

What does the Relay For Telegram AI skill do?

Access and search Telegram message history using AI. Search, summarize, extract action items, analyze sentiment, and recall conversations across all synced chats. Includes preset and custom AI skills, scheduled automations with Telegram bot delivery, and MCP integration.

Why use Relay For Telegram on TypingMind?

Because you install it once and use it with any model. Relay For Telegram is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Relay For Telegram in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/amanning3390/hermeshub/tree/main/skills/relay-for-telegram. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Relay For Telegram?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Relay For Telegram?

As many as you like. As long as a model supports skills, you can use Relay For Telegram with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Relay For Telegram AI skill free?

Yes. It is published on GitHub by amanning3390 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇