Getting time and location of a Telegram chat user


I have a simple ai coach chatbot that user’s can privately chat to with Telegram. I feel great that I got that working! pops champagne but I’d like to do the following:

  1. Only message the user one time in the morning, at a time they have set. And again in the evening, at a time they’ve set.
  2. If the user sends any messages to the bot the bots one response should be something like “I’ll commit that to memory! But I won’t respond until [morning time set by user]”

My scenario is super simple:
[Telegram Watch for Updates] > [OpenAI chat completion] > [Telegram reply to message]
But of course I need more modules to do the other things.

There are probably several ways to do this. Also, I plan on building a landing page to link to the bot, and there is an opportunity there to capture some data, if there is a way to link a website visitor to a telegram user and check they are the same user.

Make sense? Very grateful for any guidance or points in the right direction. I love learning about Make and all the possibilities.

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of two scenarios:

  1. New Telegram message > Store message in Data Store > Message user

  2. Search all Telegram messages for user in Data Store > OpenAI > Message user > Delete messages for user in Data Store

Give it a go and let us know if you have any issues!

Perhaps consider joining the Discord fan server and maybe you can explore this idea with other users further.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

1 Like