How to Create a Telegram Bot with Node.js and Sanity

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • telegram-react

    Experimental Telegram web client with tdlib, webassembly and react js under the hood

  • Secondly, Telegram is open source and can be rebuilt from the ground up using the source code (check out the React version). So if you have fun with our project, there's no limit to how far you can extend it in the ecosystem!

  • node-telegram-bot-api

    Telegram Bot API for NodeJS

  • The node package we're working with, [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api/blob/master/doc/tutorials.md), comes with great documentation. Let's start with one of the methods from the README. We'll tell our bot to send an introduction anytime a user runs /start.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • nodejs.dev

    Discontinued A redesign of Nodejs.org built using Gatsby.js with React.js, TypeScript, and Remark.

  • Basic knowledge of NodeJS

  • tdesktop

    Telegram Desktop messaging app

  • Download Telegram desktop. Visit Botfather to immediately open a chat and begin creating your bot.

  • request

    🏊🏾 Simplified HTTP request client.

  • // helpers.js const fs = require('fs') const request = require('request') const sanityClient = require('@sanity/client') const client = sanityClient({ // ... }) const download = (url, path, callback) => { //the "request" library helps us make HTTP requests in node //though it is deprecated, it works for our purposes. //more here: https://www.npmjs.com/package/request request.head(url, (err, res, body) => { request(url) //using Node's .pipe() method, we connect the //readable stream to a writeable stream. .pipe(fs.createWriteStream(path)) .on('close', callback) }) } module.exports = { client, download }

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts