Can a notification trigger a bot in a chatroom? - bots

I am new to ChatOps and started with Slack. I got a doubt.
A bot can be triggered by some conversation happening in the chat room. But I wanted to know does vice versa happens? I mean can a bot be triggered from outside and then bot performs some operations in the chat room?

Yes slack bots can be triggered from outside.
For simple example, you can trigger a post from the bot to a channel by contacting the slack API endpoint. You can see all documentation here api.slack.com

Related

Microsoft Bot Framework: How to add Bot to chat via messaging extension?

Let's assume a user chats with another user in a 1:1 chat. (Might also be a group chat.) The user adds a bot and continues to chat while the bot now adds value to the conversation.
We are searching for a way to make adding the bot to a chat as seamless as possible through a simple button click. It seems the closest we can get to a button is using a messaging extension action command.
When the user invokes the messaging extension our backend service runs and can respond e.g. with a card. Now instead of a card is it possible to generate a response to add a bot? There are special responses e.g. for authentication. Is there a response telling the Teams client to add a bot?
Any hints are appreciated.
JIT installation of bot is an option here. You will be able to add bot to user conversation. Check following sample application which helps to add bot instantly: https://github.com/SubbaReddi/89.teams-just-in-time-installation

Bot one to one chat

I've created a telegram bot with some logic. The user put his request, the bot sends the response. But if there is more then 1 user in the chat, everyone see messages of other, as well as they see messages of the bot. So my question is how can I make it private?

Need help to build a time based notification of microsoft Bot

I am looking for a solution where I need my bot to send notifications to all the users that have interacted with the bot before. This should happen on time demand, for example I would like to send notification only for alternate Friday at 5pm CDT.
I have trie the sample 16.proactive-messages but the the notification trigger is based on a controller so we have to send explicit request to
http://localhost:3978/api/notify to proactively message users from the bot.
I am using bot builder Nodejs sdk 4.x to build the bot.
I would like notifications to go on demand based on the set time and date.
The fastest way to meet your requirement is following the official sample that you tried. To send a notification to uses, you should send a request to api/notify endpoint.
You can create a scheduled webjobs to send this request to your bot so that your bot will send notifications to your users.
Hope it helps.

Slack API client for push notification

I'm building a Slack (instant messaging) chat client, I'm looking for a way to trigger a notification to receipent when a new message is sent to him, push notification of course.
What's the endpoint or stream API to be able to trigger a push notification to devices?
I think it should be some backend microservice listening for incoming messages in a channel with a list for users to notify.
If you want to get instant notifications about new messages posted to a channel you can either use the Real Time Messaging API (RTM API) or the Events API.
The main difference:
RTM API uses Websockets and you will receive a constant stream of events about everything that happens on the connected workspace.
Events API uses standard HTTP requests and Slack will only send events to your endpoint that you subscribed too.
There are many factors to consider when choosing the right API for a project. Please also see the official FAQ from Slack on the topic for more details.

How to create an azure chat bot which can send chat messages without any user input

I have tried developing azure bots before. Currently I am trying to find out whether there is any way we could set up a bot that can constantly monitor something and send messages to particular users without user initiating a chat.
For instance, a bot monitors a system and find something wrong and sends a chat message to the user ( Bot initiates the chat in this case ). I did some research but couldn't find any way to achieve this yet.
Thanks in advance,
DM
This concept is called Proactive Messaging in the Bot Framework. There are some example in C# here: https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/core-proactiveMessages and node.js here: https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-proactiveMessages
Something to note is that different channels have different restrictions on when a proactive message can be sent to a user. For instance, on Facebook you have a 24 hour window from the time the user messaged the bot. After 24 hours, if the user has not messaged the bot, then proactive messages will not be allowed through.
More information can be found in this doc: https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-proactive-messages
Edit:
You can also create a Functions Bot in Azure using the Proactive template and it will create a bot that has BasicProactiveEchoDialog.csx that demonstrates how to en-queue a CloudQueueMessage into a CloudStorageAccount. The template will also create an Azure Function that is triggered by additions to the queue. When the function is triggered, it will send the queued message to the user on the channel.

Resources