I have a bot for Slack implemented using RTM (https://api.slack.com/rtm) which works well but requires WebSocket connections for each user active all the time. After rewriting it using new Events API (https://api.slack.com/events) the bot works well too but appears "away" all the time. Apparently Slack determines bot's status by checking WebSocket connection which is not good as my goal is to use Events API only. Is it possible to use Events API and make a bot appear "online"?
It's one of the two reasons that we don't move to Events API for our bot. The second is that typing events are not send with Events API.
For what we know (dev4slack community, Slack's direct contacts), Slack works at make able to indicate online presence without the RTM, for bots using Events API. That seems essential, without that, Events API seems to be a half solution.
Now with the RTM gone. Slack announced that the only way to toggle your bot presence is via the app management page.
Official Tweet here.
Related
I am getting lost in all the documentation available on my first time attempting to set up a Microsoft Teams bot. I have it set up and able to write command activated messages in personal, groups and teams. I need to transition this to be able to receive a payload of data (the data that I will use to populate my activity card), but I can't figure out how am I supposed to let the bot know which Group or Team the payload is ment for.
The payload will be sent from my Azure hosted API, to the endpoint of my Bot. It should then, with some data in the payload I suppose, know which group or team to sent the processed activity card to?
If you could provide me with the documentation I need to read up on, or further explanation on how to proceed, I would greatly appreciate it.
You can listen to teams bot for incoming calls,
Bots can interact with Teams calls and meetings using real-time voice, video, and screen sharing. With Microsoft Graph APIs for calls and online meetings, Teams apps can now interact with users using voice and video to enhance the experience. These APIs allow you to add the following new features:
Interactive voice response (IVR).
Call control.
Access to real-time audio and video streams, including desktop and app sharing.
please check this doc for more info and sample
I apologize for the delay in responding to you.
I read the documentation you sent, but I am not sure how it relates as I do not need real-time voice, audio or screen sharing capabilities.
I can understand that the title writing "incoming calls" could be cause of misunderstanding, however, the issue is as described that I need to forward a payload from my API endpoint that needs to be received in the Teams Bot that listens to that specific payload. I don't know how to approach a solution for that part, after that part the Teams Bot should then sendActivity with an activity card attachment (this I have prepared already using dummy data and the card designer for layout), containing that payload data, to the group/team that the Teams Bot is active on.
I resolved this using the answers from this thread:
Programmatically sending a message to a bot in Microsoft Teams
Specifically thanks to the message from #Hilton Giesenow:
https://stackoverflow.com/a/59439602/10429879
I'm creating a bot with Dialogflow. It's quite straigtforward, and it worked on Telegram in no time. But things complicated when trying to integrate Dialogflow with Slack.
My bot is able to read direct messages from Slack, and I'm sure of it because the messages from Slack appear in the History section of Dialogflow. Good news there. In the same screen, I can see that Dialogflow answered all the messages Slack sent to it. But sadly, those answers don't appear in Slack.
By the way, just to confuse me more, the Dialogflow's test bot works flawlessly with Slack, publishing there with no issue. So, it's not anything related with the common values you have to copy from Slack and paste to Dialogflow to enable the integration.
It seems that my bot on Slack misses some kind of permission of the OAuth & Permissions screen, but I've tried some of theme, and I can't find the good one. Right now I'm using bot, chat:write:bot, im:write, and channels:read. I guess that only the two first ones are needed, but I'm totally lost and tried adding permissions with no reason. And then, I wrote this post.
Is there someone who has a simple bot that sends messages in direct messages on Slack? What are the needed permissions?
I had the same issue, it's quite easy to solve: just go on Manage Distribution in your bot's Slack API panel and click on the "Add to Slack" button.
That's all!
Under OAuth & Permissions, add "chat:write" to OAuth Scope. That will allow your bot to send messages to other users.
I'm developing Facebook messenger bot. Based on the official sample
here made by Node.js, Express, ES7.
I want to use Firebase database, trigger event.
If someone updates the database, send notice to certain people. I add source code "Child Changed" to "messages.js" in messenger-api-helpers, but it doesn't work.
I can check working "Child Changed" in HTML, but in messenger, I cannot.
Where should I write the trigger events code?
You should definitely use Facebook Messenger Broadcast API for this kind of functionality. This will broadcast a notice/broadcast to users.
Caveats:
You have to apply for this permission. (pages_messaging and pages_messaging_subscriptions.Takes about 1-2 days, but
can test on Admin/Test users of the app)
Each broadcast has to be a separate broadcast. (e.g. you can't send image and a text together, each has to be its own individual broadcast).
Have some kind of un-subscription option as well. FB user might think you are spamming even if you clearly say in the messages that your bot will send updates.
Use custom labels to create targetted sends. So you can either subdivide who you will send updates to about specific issues or just label people if they unsubscribe to your broadcast or not.
Basic workflow:
Get permission to broadcast.
On event in your Database. Start process.
Create message_creative_id via POST to endpoint
Use message_creative_id to POST a broadcast_messages
On a successful send you will get back broadcast_id
I am developing chatbot for Slack using Microsoft Bot Framework. The Web app is hosted on azure. We have few installations.
Everything worked fine before this morning when I saw that new bot just didn't respond (the old one is still working).
We've been experimenting on permissions and auth keys on slack, so I thought that was the reason. But I tried to reinstall the app, bot user, auth keys etc from scratch and it didn't help. My configured endpoint just don't hit.
I think the issue is in communication between Slack and Microsoft Bot Framework, 'cos when I'm testing from chatbot panel's web client everything is working fine. Also, Slack representatives confirmed that there's no problem from their side.
UPDATE: I re-checked all credentials again and seems like it's working, don't know what was the issue. But two side questions still actual:
1) Can I test this channel of communication somehow? Cos when my endpoint didn't hit I can't get any info on what is happening. I have 0 errors on Microsoft Bot Framework web console.
2) Docs on configuring slack channel have changed recently and now it suggesting to add "Subscribe to Bot Events", while everything worked w\o it. Can you elaborate on that? Also, it's not quite clear what is {YourBotHandle} docs referring to in https://slack.botframework.com/api/Events/{YourBotHandle}
Usually, the Bot Framework Portal is the place to see if any channel is reporting errors with your bot. You can also check https://github.com/Microsoft/BotBuilder/issues just in case there is a general problem with a channel.
Regarding the second question, {YourBotHandle} refers to the handle that you provided at the time of registering your bot, as explained here.
As far as why you need to subscribe to bot events, first I would recommend you to read the documentation about Events on Slack (here), but long story short, this allows the bot to subscribe to events and be notified when those happen instead of having the bot asking Slack if something happened or not.
One way to use the Events API is as an alternative to opening
websocket connections to the real time messaging API. Instead of
maintaining one or more long-lived connections for each team an
application is connected to, you simply set up one or more endpoints
on your own servers to receive events atomically in near real-time.
I have a room with a couple of bots, one of them needs to read all the messages on the room including other bot's messages.
Telegram API says bots can't see other bots message otherwise they might get caught in a "loop".
Since i really need to work around this i'm wondering if there is a known workaround?
There cannot be any workaround using the Bot APIs since the messages in getUpdates or webhook of the Bot will be from Users alone.
One workaround could be to use the telegram-cli and create a normal user as a Bot.