How to research community members behaviors in your Telegram group for free using Amplitude

In this article I’ll show you how to employ Amplitude product intelligence to get valuable insights about your community for free.

Amplitude Pipedream Telegram Node.js Integration API — one wave
Originated from “The Wave” by Hokusai
A solution flowchart

Ingredients

  1. Telegram bot, completely free. Telegram is an instant messaging platform, having 400 million monthly active users in April 2020.
  2. Amplitude, free account up to 10K group users. Amplitude is an analytical platform for 40,000+ digital products.
  3. Pipedream, free account. Pipedream is a low-code tool that helps 50,000+ developers to integrate any API in a fast and professional manner.

Telegram bot

Telegram is a super fast-growing platform for instant messaging; however, it is a black box at the statistics level. Managing a large group is a mess. But, with help from Telegram Bot API, you can create simple but effective tools to work with your groups.

Step 1. Create new Telegram bot. Save the token.

Name it as you like. Let me omit the details to be clear and concise. The outcome — is the token.

Step 1. Create new Telegram bot. Dialogue with BotFather

Step 2. Add bot to your group.

In your group, click “Add members” and choose bot from list. Now your bot, as any user in the group, will be informed on every event fired in a group.

Amplitude

Amplitude is an analytical platform for digital products that helps them to grow by understanding its users, improve their experiences, and increase retention. You can arrange a realtime dashboard with the most important charts and obtain a new look at your group.

Step 3. Create an Amplitude project. Save the API key.

  1. Sign up and create a free account, then you will be navigated to demo.
  2. Verify your email and click “Set up on the Free Plan” button on the top.
  3. Fill “Create New Organization” form, skip the intro, etc.
  4. Click “Create Project” button.
  5. Save the “API Key”.
Step 3. Save the API Key

Pipedream

Now, the magic part. In the early days, you had to be a software developer to commit the next steps, which meant a lot of time, resources, and knowledge. Now, with low-code tools as Pipedream, there is no need to hire a programmer and rent a server. Build and deploy your programs on the fly, oh, sorry, don’t think about building and deploying. Just own your empire of scripts and bots for free with a few Node.js lines.

Step 4. Create your endpoint and workflow.

  1. Sign in with Google or GitHub.
  2. Open my public workflow: http://bit.ly/telegram-to-amplitude.
  3. Click “Copy” on the top right corner.
  4. Paste your Amplitude “API Key” into the corresponded field (marked with red border).
  5. Create your endpoint by clicking the “Create source” button.
  6. Enable the trigger by clicking the black switch button on the top right.
  7. Copy your unique endpoint URL address, it will look like “https://RANDOMADDR.m.pipedream.net” and save it.
Step 4. Create your endpoin and workflow

Step 5. Route all events from Telegram to that source.

That’s the trickiest part. Telegram didn’t have an interface for that, and you should combine the address and open manually. Use plain text editor for that. Here is the instructions.

Finally, in Amplitude

In this tutorial I’m covering the basics, and you will receive events in Amplitude for two main events in your group:

  • “New member”, when new user joins the chat.

Step 7. Check the “User look-up” page.

Post anything onto your Telegram group. After a short period, you should see it:

  1. in the “User look-up” page of your project on Amplitude.

Step 8. Craft reports for your product.

You are ready to create your charts. For example, here is m: uniques for the last 6 weeks in an event segmentation chart and a lifecycle graph. As you can see, active existing users passed into the “New user” category for the start.

Event segmentation chart and weekly lifecycle graph
Retention chart

Conclusion

It needs time to run, but it worth it. And you will not get the fast result, as it only takes new events. But from now — you are the owner of your private data source.

Next steps?

If you are a product manager or a data analyst like me, there’s plenty of space for your imagination. Feel free to suggest your use-cases here in the comments or get in touch via Telegram or Twitter.

  • Refine events detecting. Detect the first message for a new user, question marks, or hashtags in posts. Add conversion events.
  • Group itself is a strict tool for the community; therefore, I’ve made a no-code web app with profiles, events, and ratings, which is accessible only for the group members.

Notes

Due to the limitations of the protocol, it’s unable to receive the“user left” event in “supergroups”.

Credits

Thanks to Antony Castrio for influencing and helping with the text :)

Product Manager, Data Analyst, No-Code maker, and an Indie Hacker. I create my life. https://igormartynov.com/