Slack integration for alarms or alerts - slack-api

I am new to Slack. I can't find any integrations for an "alarm clock"-type integration, as explained below.
What I'm looking for is a reminder to post to one of our Slack channels on a set schedule. For instance: each weekday at 9 AM, our #bug-fix channel gets a message like "do your bug fix XYZ thing."
I've searched Slack's integrations page but can't find anything that does this. Can anyone recommend an integration like this, or point me to a resource where I might be able to find one?
Many thanks in advance.
EDIT: I've found an IFTTT recipe that looks promising, which I'll share here in case any one else has this same question:
https://ifttt.com/recipes/177138-post-a-daily-reminder-to-a-slack-channel
However, I don't know the Slack integrations ecosystem well. Other suggestions would be appreciated.

Just type this in Slack:
/remind #bug-fix to do your bug fix XYZ thing. every weekday at 9am
Setting reminders in Slack

I am not sure if you are looking for a generalizable alarm clock with static messages, or something custom. You can use Incoming Web Hooks to write your own custom integration. Create a simple script that you schedule as a cron job to run at 9am. If it's a weekend, your script can exit, otherwise it can grab the data it needs to post (from whatever criteria you want in your bug tracking system, or wherever) and send it to your Slack channel. If you search GitHub for "slack webhook" you will find examples for every language of sending a message to Slack. They make it very easy to send messages to a channel.

Related

Reading a slack topic programmatically

I am attempting to read a slack topic. At the moment when looking at the slack API methods, there is no mentioning of this.
My goal is that with the conversations.SetTopic method I am successfully able to add a topic onto the slack channel. However, I would like to find a way to read that topic programmatically so that my Jenkins automation script could adjust to it.
Is there a way where one could read the topic on a slack channel programmatically?
I was able to solve this, It wasn't clear at first as I kept looking for something similar to conversations.SetTopic.
Instead I found out that conversations.list does what I was thinking about which is to read the conversation topic and send it back to me.

Twilio: Is there a way to export all opt outs?

I want to export everyone who has reply stop (opt out) for my messages. I see that my options are
API. However, through the API I can see that I get everything in pages of 50 messages, so I have to go and do a lot of code to go page by page, message by message just to check if the content is stop. Seems a bit unnecessary for a 1 time job.
From the console in my account, however when each time i try to filter on status received I get the following error, and when I dont filter I get error:
Your export request has more than 10,000 records, please filter your results and try again.
Surely there must be an easy way that I can get all the list of numbers that had opt out?
This answer above is not strictly true as of October 2020. Twilio now has an "insights" dashboard that allows you to view and download "Opt outs Received". When you click on that dashboard you are able to see and download the information.
It is under: Programmable Messaging -> Monitor -> Insights
Our account has "Opt-Out Management" enabled and this addition has been a game changer in finding out what users have or have not done in our system.
There isn't a way to export all opt-outs for LC's/TF's that Twilio maintains on your behalf but opt-outs are forwarded to your application for logging as well as added to the Twilio maintained opt-out list. Your application can keep track of the opt-outs this way. You can find more details in the Help Center article below.
Twilio support for opt-out keywords (SMS STOP filtering)
"When Twilio receives one of these replies, we will create a "blacklist" entry on our side, and then pass the message on to your webhook. Once we have a blacklist entry for a particular recipient phone number, any future attempts to message them will be met with a 400 response from our API, along with Error Code 21610 - Message cannot be sent to the 'To' number because the customer has replied with STOP. Recipients can disable this message stop, and resume receiving messages with the START, YES, or UNSTOP commands as outlined below."
Also, if you use the Twilio helper library for the respective language, it handles the paging for you, for example, for Node.js, reference.
Usage and Migration Guide for Twilio's Node.js Helper Library 3.x
"One of the biggest advantages of twilio-node 3.x is that it automatically handles paging for you! In both list and each, you can specify the maximum number of instances to grab (limit), and the page size (pageSize). The library will take care of everything else."

Webhooks triggered by Google Assistant

I noticed that IFTTT.com is using a Google Assistant integration that allows them, basically, to set up for each of their users some kind of "trigger words" that trigger a call to a webhook. I searched a lot in the API docs and found no proper way to do the same, only ways to set up conversations or IoT interactions.
I kind of want to build something similar to the IFTTT integration with a way to programmatically set up actions via an API (not via the dashboard).
Is it possible to do or is this just a custom development Google made for IFTTT?
In my researches I found out about something called "Direct actions" but it does not seem to exist anymore in the Google Assistant Doc. Can you help me with that?
I don't know if my questions are very clear, please tell me if they are not
Thanks in advance for your help
Have a good day
Here's similar options to the IFTTT integration:
Create routines in the Google Home app. That will allow you to create custom commands that activate one or several actions.
Create a smart home action. It's a type of direct action, as opposed to a conversational action, and will let you directly invoke the Assistant for a subset of commands.
You could also create a conversational action. While it would not give you the same direct control, you can still run actions quickly by doing a deeper invocation, ie. "Ask my test app to do an action". It would also give you much greater flexibility over the input.

Viewing user responses from slack to errbot

I'm very new to bots. I'd like to develop a quick/simple test that makes it possible for a bot (errbot) to write a message to slack, then view responses back to the bot from users on slack.
How do I go about achieving this? Do I need to write a plugin for this?
Apologies if my question is too general/ambiguous -- I haven't come across an example that clearly explains this.
Yes, you need to program a bot a way or another, Errbot is just a framework that help you do that (concentrate on messages/responses) through plugins and not on the technicalities of the services it is connected to (Slack or any other).

Anyone found a way to download google chat logs?

I'd like to be able to get all my Google chat logs so that I can use them for training a chat bot type of thing.
I am aware of the limitations that have been imposed by Google so that chats cannot be simply downloaded through IMAP. I'm looking for workarounds.
As of September 2011, Google removed the restriction on downloading chats. Google now allows export of chatlogs using IMAP.
It's not possible to download the chat logs unless they're attached to an email conversation - maybe you could fwd all of the logs that are held in your 'chats' folder and then download the conversations over IMAP or POP?
I recently had to do the same thing and coded a quick ruby script. http://9seats.com/2011/04/archiving-gmail-chat-logs-with-ruby/
If you're looking to make a program to do this, you could use a greasemonkey script and a local PHP server.
The greasemonkey script would pick up chats as you visit them, parse them, and send them to the local PHP server, which could then dump it to a TXT, SQL, whatever.
Contact me if you want some help, I might be interested in this, though I'll be on holidays the next months :)
Take a wander through the Google Talk API. And this may, or may not, help too: GMailAPI
If you know how to download a email. You can do the same to chat. Because chats are nothing but an email tagged with label chat. If you see chats, they are actually sent from the person you chatted with to you.

Resources