https://discord.gg/botpress logo
Can the bot be activated and respond to messages o...
# 🤝help
e
I am very interested to adopt Botpress to create a user support bot to use in our business's Telegram community but there's one deal breaker. Our Telegram group is very active and therefore we want the Bot to be activated and respond only if the bot is explicitly tagged (thus quota/callback charged only if tagged). Otherwise it won't make sense if the Bot is going to reply to 1000 messages a day where 90% of those are not indeed questions that require support. I have tried to add to the Instructions prompt to tell the bot it should only respond if its Telegram bot name is tagged, but it won't work and the bot will continue to try to respond to every message. Any idea how this can be configured? Thank you very much.
b
Hello maybe put a condition when @workflow.input_user == "Call Chatbot" the workflow start and the chatbot begin the conversation.
I need to do the exact thing in Instagram, because anybody send a message on a story the bot will start. But it use too many request and AI costs
So if anybody has a another idea it will be great. Thanks
@eager-kite-3176
e
would you mind show a screenshot how you configure that? I find the docs not helpful and can't find what kind of variables i can use... I try to use a trigger but no matter what I type in the trigger label the condition genreated is always
true
Or maybe with the Intent Trigger but you need the Router Agent that is not available for normal users
And put the expression
{{event.preview}} === Help
@loud-crowd-60573 Hello could you confirm that ?
w
these solutions could work maybe but they're going to incur cost the same way
since you're routing them after the bot has already been triggered
so the interaction cost is already incurred
i'm going to take a closer look at how the telegram integration works and come back in a bit
one way i can think of that would avoid this problem altogether is to check the received payloads for text mentioning the bot for example
i'm going to set up a test telegram bot and test it myself
@big-wire-17689 @eager-kite-3176 do you guys have privacy mode enabled or disabled on your bot?
in the telegram bot, not botpress
if you created it through botfather
b
For me i didn't use Telegram, i want to test it on Instagram
This not my ticket but i need to do that on instagram too. Because actually if a user in instagram respond to a story it triggered the chatbot everytime... I just want to know if it's possible to send a triggered message to activate the chatbot
w
what do you mean?
i couldn't understand very well
you mean only activate the chatbot if there's specific text in the message?
@eager-kite-3176 for your problem, activating "privacy mode" in BotFather will probably fix it. when enabled, the bot can only see messages that tag it
b
Yes that's it
w
currently there's no event filter on the start node and the instagram integration has no triggers so you have two options and none of them are great
1. make a huge shift in your backend to put a middleman between instagram and botpress to select which messages trigger the bor, or 2. use logic in your flow to ignore conversations you don't want to start (and incur one incoming event worth of cost)
can you give me an example of a message you would want to start a conversation for?
b
like "Chat with bot"
How to do the 1st option ?
w
then you can just add
event.preview === "Chat with bot"
in a transition expression
first you need to find some service to manage your instagram DMs like manychat for example
which will expose API endpoints to send and receive those messages
b
Yes but it will count +1 message/events everytime a user send a message even if the bot is not triggered with the "Chat with bot" message
w
yes true
b
Ok that's impossible so
w
but as i said, since there's no filter on the start node and no triggers on the integration, you can't filter them before starting
in instagram yes
because of how the integration and the start node work
b
Ok you made a feature request for that ?
w
yes
e
it is enabled by default
however the bot is still triggered for every messages in the group not mentioning it
i think it might has to do with admin rights, if the bot is added as admins it bypassed privacy mode
w
yes that's probably true
privacy mode will probably fix your issue though
e
seems like not adding bot as admin + privacy mode will work, further testing now
3 Views