Slack: Get notification when Bot is offline - slack

I searched the www for a solution to a problem of mine without finding an answer.
I need to get notificated when my bot in slack goes offline, but I don't know how.
To get notificated when he logs in is cacke, because I can set him to send a message, but when he's off there is no option to send a message.
I prefer PHP, Javascript, but other languages are also fine.
Thank you very much for your effort

There are many options how to setup a way to monitor your bot and get notified when it is offline.
One option that has worked well for me is to use an external website to monitor your bot. That website will send requests to your bot every couple of minutes to see if is is still alive and will notify you if the request fails. You may need to extend your bot a bit, so that he can reply to these requests in a proper way.
There are many website that provide this service. The one I use is uptimerobot, which also happens to be free for up to 50 monitors.

Related

Get Slack channel where app is integrated

I might be missing something really simple but don't seem to find the solution.
I have created a quick and simple app which is meant to do some processing every morning and then send some logs to Slack.
I have been perfectly able to do so using Incoming Webhooks. Cool. The "problem" is that it requires me to set it up from the app settings (aka it obviously makes me define a specific channel for the Webhook so I can have the specific URL) and that's something I like a bit less.
I thought it'd be easier if I can just add/integrate the app on a channel using the Slack UI so I don't have to worry about having to know beforehand the channel(s) ID where the message has to go to and also any other user would be able to integrate in any other channel they consider.
I have integrated it on my testing channel (all good) and tested chat.postMessage (all good) but it still needs the channel (obviously). However, using conversations.list lists ALL channels and that's the opposite of what I'm looking for.
I need a way of getting just those channels where the app is integrated so I can post the message to those and only those.
Is this something that Slack doesn't allow or I'm just missing something very obvious here?
I hope it makes sense and someone can shed some light on this :)
You can use users.conversations method to get list conversations the calling user/bot may access.
https://api.slack.com/methods/users.conversations
Use Bot token to call the API.
Use type argument to search public, private, mpim & im conversations
https://api.slack.com/methods/users.conversations#arg_types
Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im

Microsoft Teams: Is at all possible to create a app/connector/bot for broadcasting?

Trying to parse through the Microsoft Documentation of this is a bit of a challenge.
Our use case is that we want the app to receive broadcasts from an external service. On that broadcast we want it to send a personalized message to every person in the team/org.
Is that at all possible? Doing this in Workplace and Slack was fairly straight forward but i'm going nowhere fast with Teams. Connectors seem weird and user-based, not team based, requiring you to set up a config page for it? Bots seem centered around AI interactions and on demand features and general apps? Not sure.
So yea the question is, is it possible. If so i would appreciate to know where to look for how to do this.
Yes, this is definitely possible. If you're wanting to send to a Team (i.e. a Channel within a Team) you can use either a bot or a webhook. If you want to send to individuals or to group chats, then you'd be looking to use a bot.
For webhooks, see Post external requests to Teams with incoming webhooks. For bots you can start here, and in that case you'd want to look into something called "Pro-active messaging", where the bot is sending a message on it's own, rather in response to a user's initial message.
The Pro-active messaging can be a bit tricky, so if you do want to go that approach (1 to 1 messaging), let me know in the comments and I give you some more guidance. However, I'd suggest rather looking at messaging the Team, and creating/using a relevant channel, rather than sending every user a 1-1 message.

Skype Bots - Please tell me I'm missing something

Working on an application and developing chat integration bot. Note that contrary to some news bots or other tools, there is no central website or server that the bot gets its data from. The software installation comes with a repository, and that is where the bot connects to. Thus, every user, upon installing the software, will basically get their own copy of the bot, alongside with their own repository, etc.
Now, having done that for Telegram: You open the telegram client, initiate a chat with the botfather, get the token for your new bot with one or two commands, and then add that token to my application. Done. Easy for the user to follow, takes a few minutes at most and they have a working bot.
Trying to do the same with Skype, the users must:
Sign up for an Azure account
Provide credit card and phone number verification (that's probably where some users will stop right away)
Log on to the Azure Portal
Create a bot channel, through a myriad of different screens I have to guide the user through.
Have the user obtain the bot's password, again through a variety of different screens he needs to be guided through. (if the user hasn't given up yet, at this point he'll definitely get grumpy)
Enable the Skype channel, and enable the bot to be added to group chats.
Attempt to locate the bot via Skype and eventually add it in.
Now, if I wanted to document this properly, this will be a 10-15 page document with tons of screenshots and all. To do what Telegram does in two minutes or even less. There's so many opportunities in all of this for something to go wrong, that I can't even consider forcing my users to go through this.
Surely, I must be missing something? It can't be that you have to go through this horrible mess of an over-engineering spectacle that is second to none, just to get the most basic bot to function?
All I need is a means to say "this is the bots name, give me its token and API URL so that it can send messages using the REST API". But I can't seem to find this for Skype.

Improving WebMail performance MVC3

I'm using the MVC helper WebMail to send emails. However the speed of it seems to be of concern. Especially when I have to send more than 1 email at the same time. I tried using a thread, but that didn't work since the Webmail object was null. How do I speed this up? Any ideas appreciated.
Forgot to mention, this is during testing and I'm using localhost and gmail! Not sure if that is causing the issue.
Thank you
If you want performance, don't use the WebMail helper. Use the classes in the System.Net namespace.
This allows you to open a new thread and send the email out-of-band from the web request.
We use Google Apps mail (gmail) in the cloud, opening a new thread, and sending the email from there, using the System.Net types (not WebMail). It works pretty well, as we can respond to the user without having to wait for the email to be sent.
Be careful about using Google Apps / gmail though, especially in development. We had one of our accounts disabled by google because of this. During development, you should use your local ISP, or better yet, use SpecifiedPickupDirectory, as it works better when unit testing email receipt.

Can I Send a Text Message from My Computer to a Cell Phone?

Is it possible to send a text message from a computer to a cell phone? I'd like to be able to do this with Ruby, not quite sure what it entails. After seeing GrandCentral and Google Voice, it seems like it's not that bad.
Is it possible? How do I get started!
Yes, it's fairly trivial.
Depends on whether you want to pay or not; some providers offer email addresses for each number that is with them, otherwise you can get an account with an SMS gateway (find one in your country, or try clickatell) and then just buy credits. They'll have various interfaces: Email, HTTP, more.
check smsroaming.com it provide services to send sms from website and also have desktop application for it. including iphone, blackberry and facebook application for it.
i hope they will help you to manage sms.
regards
Azy

Resources