Telegram
Send messages from your Telegram bot to people, groups, and channels, such as an alert when something happens in your app. You need a bot that you created with @BotFather in Telegram, and the bot’s token.
Connect Telegram
To connect Telegram, you need your bot’s token. @BotFather gives you the token when you create the bot. To see it again, open @BotFather › /mybots › your bot › API Token.
Only a project owner can connect Telegram. If you’re a project owner, connect Telegram to your app:
-
Open Project Settings › Connections.
-
Turn on the switch for Telegram. The Connect Telegram dialog opens.
If you’ve connected Telegram in another of your apps, the dialog first offers that connection. To use it, click Use the key from followed by that app’s name. To enter a token instead, click Paste a bot token, and then continue with the next step. For more information, see Reuse a connection.
-
Paste the token into Bot token. To open Telegram’s help on bot tokens, click Find it beside the label.
-
Click Connect.
Telegram checks the token before FlutterFlow saves the connection. For more information, see Connect a service.
What to ask
To ask for a Telegram feature, tell the agent what to send, which chat to send it to, and what triggers the message:
I just sent my Telegram bot a message. Find that chat, and send me a message there when a monthly budget goes over its limit.
When a signed-in person adds a transaction over 500, send the payee and the amount to my Telegram group without a notification sound.
Who your bot can message
Telegram lets your bot message a chat only after one of the following happens, depending on the kind of chat:
- A person: the person starts a chat with your bot.
- A group: you add your bot to the group.
- A channel: you make your bot an administrator of the channel.
Find a chat
Each message goes to a chat ID, which the agent finds for you. To find a chat, the agent reads the chats that messaged or added your bot in the last 24 hours.
Before you ask, send your bot a message, or add the bot to the group or channel. Then ask the agent to find that chat. To send to a public channel, you can also give the agent the channel’s @username.
Agent questions
If Telegram isn’t connected, the agent asks you to connect it in a card above the message box, with a Connect Telegram button. If you aren’t a project owner, ask one to connect it. See Connect when the agent asks.
Review
After the agent finishes, read the turn’s Summary and review its Changes. Check the affected screens in Screens, and try the change in Preview. If the change uses records or sign-in, test it with the thread’s own data in Data.
After you push a backend change, check the result in Backend.
While you test the feature, send to your own chat or a test group. See How connections work.
Call limit
Your app and the agent share a limit of 60 calls a minute to Telegram through your app’s connection. See Limits.
Push
After you test the feature, push the changes to your app.
Next steps
- To replace the bot token or disconnect Telegram, see Manage connections.
- For the other services that you can connect, see Available services.
Troubleshooting
- The dialog says “A bot token is a number, a colon, then a long code, like 123456789:AA….”: copy the whole token from @BotFather › /mybots › your bot › API Token, and paste all of it.
- Telegram refuses the token: see A service refuses your key.
- Telegram stops accepting the token: the token was revoked or the bot was deleted. Get the bot’s current token from @BotFather, and then replace the token.
- Your bot can’t message someone: see Who your bot can message.
- The agent can’t find your chat: send your bot a message, and then ask again. If your bot has a webhook set, the agent can’t find chats this way, so give the agent the chat ID instead.
- Your app shows a message about the service: see Messages shown in your app.