Back to APIs list

Telegram API examples & templates

Use these vals as a playground to view and fork Telegram API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
testtelegrambot
idoubtit_0815
testtelegrambot
import { telegramGetMe } from "https://esm.town/v/vtdocs/telegramGetMe"; export default async function(req: Request): Promise<Response> { const token = Deno.env.get("globalTelegramBotToken"); const result = await telegramGetMe(token); return new Response(JSON.stringify(result, null, 2), { headers: { "content-type": "application/json" }, }); }
telegramSetWebhook
idoubtit_0815
telegramSetWebhook
Remix of: vtdocs/telegramSetWebhook
telegramWebhookEchoMessage
ynonp
telegramWebhookEchoMessage
Remix of: ynonp/SpeakEnglishToMe_bot
telegramSendMessage
m4rrc0
telegramSendMessage
Remix of: vtdocs/telegramSendMessage
periodical_weather_telegram
flafi87
periodical_weather_telegram
An interactive, runnable TypeScript val by flafi87
uniqueSilverHorse
idoubtit_0815
uniqueSilverHorse
An interactive, runnable TypeScript val by idoubtit_0815
finalRoundFeed
gabrieledarrigo
finalRoundFeed
An interactive, runnable TypeScript val by gabrieledarrigo
Cheklistlancamento
isidoromoraes
Cheklistlancamento
Objetivo do Sistema: Desenvolver uma plataforma intuitiva, simples e guiada que ajude o usuário (aluno/empreendedor) a seguir todas as etapas necessárias para colocar seu curso ou mentoria online no ar, mesmo que ele não tenha conhecimento técnico avançado. Funções que o sistema deve ter: Estrutura Guiada em Etapas Dividir o sistema em 10 módulos (baseados no checklist fornecido: Definição Estratégica, Planejamento, Produção, etc.). Cada módulo deve ter: Explicação simples do que é essa etapa. Lista de tarefas (checkboxes) que o aluno precisa completar. Espaços para preencher informações (ex: nome do curso, definição de público-alvo, preço, etc.). Recursos (modelos, exemplos prontos ou templates) para facilitar. Acompanhamento Visual Criar uma linha do tempo ou barra de progresso que mostre visualmente o quanto o aluno já avançou. Mostrar alertas suaves e amigáveis para tarefas pendentes. Automação de Entregáveis Gerar automaticamente: Plano de aulas/módulos a partir dos tópicos preenchidos. Página de vendas básica (modelo automático baseado nas informações do curso). Sugestões de mensagens para divulgação (com base nas respostas do aluno). Checklists finais para lançamento. Integrações Simples Integrações fáceis (1 clique) com: Plataformas de hospedagem de cursos (como Hotmart, Eduzz ou outras via API). Sistemas de pagamento (Pix, boleto, cartão). WhatsApp ou Telegram para grupos de alunos. Suporte Inteligente Um assistente virtual dentro do sistema que: Responda dúvidas frequentes. Sugira melhorias quando o aluno travar. Mostre exemplos de sucesso para inspirar. Templates Prontos Disponibilizar templates para: Página de vendas E-mails de lançamento Roteiro de gravação de aula Planilha de planejamento de módulos Experiência de Usuário (UX) Navegação extremamente simples: No máximo 3 cliques para acessar qualquer função. Botões grandes e instruções claras. Linguagem amigável, evitando termos técnicos. Sistema de Conclusão e Certificação Quando o aluno completar todas as etapas: Liberar um certificado de conclusão ("Curso/Mentoria Pronto para Vendas"). Mostrar um resumo final com todos os materiais gerados.
weatherForecast
gabrieledarrigo
weatherForecast
Daily forecast weather condition for Rho, MI ☀️🌤️☁️🌧️
smokyHandler
gabrieledarrigo
smokyHandler
The Telegram webhook handler for Smoky, my funny personal assistant!
templateTwitterAlert
charmaine
templateTwitterAlert
Twitter/𝕏 Keyword Alerts [TEMPLATE] Get custom notifications when you, your company, or anything you care about is mentioned on Twitter/X, even if they don't tag you directly. This template will help you: Search for specific mentions on Twitter/X using customizable keywords. Deliver notifications wherever you'd like (email, Discord, Slack, Telegram, etc). Example This val tracks mentions of "Val Town" and related terms, excluding noise like retweets and irrelevant accounts. Notifications are sent to a Discord webhook but can be easily reconfigured for other platforms. To see exactly how we use this template at Val Town: https://www.val.town/x/stevekrouse/twitterAlert Set Up 1. Fork this Val To use this template, fork this val on the top right corner of this page. 2. View Source Code The CODE box shows you the the full source code of this val, you may need to scroll down to see it. 3. Customize Query Define what you want to search for by modifying query : const query = "\"val.town\" OR \"val.run\" OR \"val town\" -_ValTown_ -is:retweet -from:valenzuelacity -from:val__run"; Refer to Twitter's search operators to fine-tune your query. 4. Test API call Set isProd = false in the code if you are testing, to ensure there are enough tweets to display. Toggle it back to true when you're ready to run this cron job in production and actuall send notifications. 5. Choose Notification Method This template uses a Discord webhook for notifications, but you can update this to your preferred platform by replacing the discordWebhook call with a call to Slack , @std/email , etc. Create a Discord webhook following this guide . Save your Discord Webhook URL in your Environment Variables (you can find this on the left sidebar): Key: mentionsDiscord Value: Your Discord webhook URL. Notifications will be sent using this function: await discordWebhook({ url: Deno.env.get("mentionsDiscord"), content, }); 🎉 Congrats! You now have a val running that ensures you never miss another Twitter/X mention. 🎉 NOTE: Usage Limits This val uses the SocialData API for Twitter data: Proxies via Val Town's SocialDataProxy : Limited to 10 cents per day for Val Town Pro users . This API is only for Pro users. Need more calls? Sign up for your own SocialData API token and configure the socialDataSearch function.
sendGoldPriceChart
overflowy
sendGoldPriceChart
An interactive, runnable TypeScript val by overflowy
sendEuroShortTermRate
overflowy
sendEuroShortTermRate
An interactive, runnable TypeScript val by overflowy
utils
overflowy
utils
Collection of utility functions sendTelegramMessage(text: string) : sends a text message to a Telegram group or channel sendTelegramPhoto(photoUrl: string, caption: string) : sends a photo with a caption to a Telegram group or channel
AntiSpamVerification
wahobd
AntiSpamVerification
@jsxImportSource https://esm.sh/react@18.2.0
Spark
Tade
Spark
// Telegram Bot Token - you would replace this with your actual bot token