My AskAI Docs
  • Welcome
    • 👋Welcome to My AskAI
  • START HERE
    • 🤷‍♂️What is an AI chatbot?
      • How Should I Use it?
      • Where Can I Use it?
      • Will it Make Things Up?
      • How Much Content Do I Need?
      • What Is It Good/Bad At?
      • What If It Can't Answer?
    • 🏗️Build Your AI Chatbot
      • Create Your 1st AI (Chat)
      • Create Your 1st AI (Explain)
      • Create Your 1st AI (Summarize)
      • Create Your 1st AI (Search)
      • How Long Does it Take?
    • 🗃️What is Content?
    • 📼101 Video Tutorial
    • 🤔How Does it Work?
    • ⭐Reviews
    • 🆘Support
  • SECURITY + PRIVACY
    • 🔐Security
      • On-Premise
      • Set a Password For Your AskAI
      • Lock to a Domain
      • OpenAI API Keys
      • SOC-2
    • 👣Privacy
      • Your AI chatbot
      • Your Content
      • Your Data
      • OpenAI
      • Regulations
        • GDPR Compliance
        • HIPAA
  • Features
    • ❓Questions, Answers + References
      • Change the Answer "Style" (Length, Format etc)
      • Editing Suggested (Starter) Questions
      • Auto-Generated Follow-up Questions On/Off
      • Edit Follow Up Questions
      • Turn Follow Up Questions On/Off (Explain)
      • Show Source Reference Text (Explain)
      • Turn References On/Off (Chat)
      • Citation References (Chat)
      • Meta Data and References
      • 'Corrections'
        • How To Correct An "I don't know" Response
        • How To Correct An Answer
    • 🤏Summarize
    • 🗄️Adding Content
      • ☁️Content Upload & Sync Integrations
        • 🔁Connect & Sync Google Drive
        • 🔁Connect & Sync Notion
      • Automatic Content Updates
      • Upload a CSV File to Your AskAI
      • Add an Entire Website (or Sitemap)
      • Deleting or Removing Content
      • Bulk Upload a List of Files or Links
    • 🔗Integrations + Embed
      • Website
      • Slack
      • Microsoft Teams
      • WhatsApp
      • Wordpress
      • Zapier
      • Bubble
      • Add To...
        • ✈️Add to Telegram
        • 🔳Add to Squarespace
        • 🧙Add to Wix
        • 🛒Add to Shopify
        • ♦️Add to Carrd
        • 🟨Add to Zoho
        • 🚀Add to Kajabi
    • 🎨Customization
      • How It Talks
        • Customize Tone and Voice ("System Prompt")
        • Customize Your Welcome Message
        • Add a Custom Ending Message
        • Edit Your "I don't know" Response
      • How It Looks
        • Edit Starter and Follow-up Question Titles
        • Change Your Image, Name and Description
        • Personalize the Appearance of Your AskAI
        • Edit Placeholder Text (Explain)
    • 💪Power Features
      • ⚡Supercharged Answers (GPT-4)
      • 📧Email Capture
      • 🗣️Name Capture
      • 📊Analytics
        • Get your Insights Report
        • Download Question and Answer History
        • Download Questions That Couldn't Be Answered
      • 🌐Custom Domains
      • ◻️Removing Branding
    • 🤝Sharing
    • 🖱️Modes
      • Change the Mode of Your AskAI
      • Search with AskAI
  • Tutorials
    • ✅Improving Answers
    • ⬜Uploading tabular data
    • 🌎Localize Your AskAI
      • Supported Languages
    • 🔌Build a ChatGPT Plugin
    • 📺YouTube Tutorials
  • Use Cases
    • 🗣️Customer Support
    • 🧠Knowledge Sharing
    • ✍️Research
    • 📣Content Marketing
    • 👩‍🏫Teaching
    • 🚢Onboarding
  • TROUBLESHOOTING
    • 👺Integration issues
    • 🐢Slow Responses
    • 💬Chat Bubble Not Visible
    • 🤷‍♀️Why can't it answer?
    • ⬆️File Upload Issues
    • 🤓CSV Upload Issues
    • 🗝️Login
    • 😕No Content Appearing
  • API Documentation
    • API Docs
    • Ask Questions, Chat, Search
      • Query (Explain)
      • Chat
      • Search
    • Manage Content
      • Add Content
      • Update Content
      • Delete Content
      • Retrieve Specific Content
      • Search All Content
    • Create & Manage AskAIs
      • Create AskAI
      • Update AskAI
      • Delete AskAI
      • Get AskAI Details
    • Python Library
  • ACCOUNT MANAGEMENT
    • 💲Pricing + Plans
    • 🧱Limits
      • Exceeding Limits
      • Questions
    • 🦸‍♀️Your Profile
      • Changing Your Email
      • Delete an AskAI
      • Close Your Account
    • 💳Your Subscription
      • Update Payment Card
      • Download an Invoice
      • Discounts
      • Refunds
      • Tax
      • Downgrade Plan
      • Cancel Subscription
    • 🧑‍🤝‍🧑User Access
      • Transfering Data
      • Restricting Access
      • Multi-user Access
      • Setting a Password for Your Account
      • Reset Login Password
    • 🤑Affiliate Program
    • 💼Reselling + Whitelabelling
  • FAQ
    • 🪖General
      • 💡Feature Suggestions
      • 📞Human Handover
      • 🎏Answer Streaming
      • 🌡️Temperature
      • 💇‍♂️My AskAI vs Fine-tuning
      • 🤖My AskAI vs ChatGPT
      • 📚(Large Language Models) LLMs
      • 🔗Prompt Chaining
      • ⚖️What is the difference between My AskAI and My AskAI Classic?
Powered by GitBook
On this page
  1. Features
  2. Integrations + Embed
  3. Add To...

Add to Telegram

Build an AskAI bot that can answer questions in Telegram without writing a single line of code.

PreviousAdd To...NextAdd to Squarespace

Last updated 1 year ago

  1. Set up a new bot in Telegram 0:01

First, open Telegram and search for the "BotFather" bot. Type "/start" and follow the instructions to create a new bot. Be sure to name your bot something that ends with "bot".

  1. Get your API token 0:17

After creating your bot, the BotFather will provide you with an API token. Copy and store this token for later use.

  1. Build a flow 0:34

Next, create a flow that includes a Telegram bot watching for updates, an HTTP request to the AskAI webhook, and a text message to send the response back to the user.

  1. Connect your Telegram bot to the flow 0:56

In the "Watch Updates" block, add a connection and paste the API token you obtained earlier from the BotFather.

  1. Make an HTTP request to AskAI 1:06

Create a POST request using the URL and request content provided by AskAI. To find this information, go to AskAI's "Embed and Integrate" section and click on "API Access". Make sure the headers, body type, and content type match what is shown in the video.

  1. Replace the placeholder with message text 2:08

In the body of the HTTP request, replace "insert your question" with the message text coming from Telegram. You can simply drag the "Message.Text" field from Telegram into the appropriate spot.

  1. Parse the JSON response 2:27

To display a shorter message in your Telegram bot, first parse the JSON response from AskAI. In the "JSON.String" field, insert the data from the HTTP request.

  1. Send the message back to the user 2:53

Finally, use the "SendMessage" block to send the parsed answer back to the user. Insert the chat ID and the parsed answer, leaving some space for reference links.

  1. Add a filter to prevent a message from being sent on your first ‘reply’

After your Telegram “Watch updates” bot add a filter with the condition 1. Messages: Text and choose: “Text operators: Does not contain” then enter “/start” into the text field. This will ensure that a reply isn’t triggered when the bot initiates.

  1. Test your bot 3:24

Click "Run once" and wait for new data. Then, go to your bot in Telegram and type a question. For example, you can ask: "What is your returns policy?"

  1. Receive the answer 3:45

After sending the question, the webhook will process your request and send the answer back to your Telegram bot. The response will include the answer along with any references.

  1. Customize the response (optional) 3:59

If you want to shorten the answer or change the answer style, you can do so by going to AskAI and customizing the response settings.

Remember that this integration is for the "Explain" mode and does not support the conversational chat feature.

🔗
✈️