Having a user click a link in a Slack Incoming Webhook Message and getting their response - slack-api

I'm looking to have a user type something like
/makemeeting today # 4:00pm
this fires a outgoing webhook, which stores the info, then it fires a incoming webhook which would display a message in a channel saying meeting scheduled, and have two links
yes | no
Here's where I'm stuck. I can do everything up till this point. I'd love for any user to be able to click on one of those links and have it perform another outgoing webhook with the proper response.
I know I can just make those links point to a website, but I'd love to keep it all within slack without having to open a browser.
Is this possible? I swear I've seen yes|no, true|false replies before in other commands and bots, but I might be imagining that.
Any help would be appreciated...
thanks

This isn't supported yet but is on Slack's roadmap for the "near term".
https://trello.com/c/DVrJLbxX/12-interactive-messages
A work around is to add reactions to your message. When the user clicks the reaction (to bump up its count), an RTM event will be dispatched for you to handle: https://api.slack.com/events/reaction_added
An live example can be seen with the Meekan calendar app: https://meekan.com/slack/
So you could have two reactions: thumbs up and a thumbs down. And handle which reaction the user clicked.

Related

Twilio: Webhook not calling specified URL on phone number

Setting up to respond to SMS replies. I've gone to my Active Numbers page, selected the number (I only have one), gone to the Messaging Service section (again only one service) and in "A message comes in", I've specified the URL of one of our HTTP Handlers. It's a .Net Core handler that we use all the time. It will try to process anything sent to its URL:
https://ourserver/lmw/core/filemanager?SC=SMS
I send an SMS message to my personal number, reply "Help", and send that. Nothing hits that URL. I have it in the debugger and it catches anything I send it. It just doesn't get hit by the reply to the SMS message.
What am I doing wrong?.. or did I misunderstand how this works?
EDIT:
I found an "Integration" section in the Messaging Service. It was set to "Defer to sender’s webhook"... which sounds right but I changed it to "Send a webhook -- Invoke an HTTP webhook for all incoming messages"... which sounds like the same thing. Anyway, it didn't change a thing. I'm still not receiving a post on the http handler.
Please note that "Help" is a special keyword when using messaging services.
According to the Twilio Help Center:
Twilio does not forward HELP/INFO messages to your incoming message webhook by default. However, if you use Advanced Opt-Out for Messaging Services, Twilio does forward HELP/INFO requests to your inbound webhook.
This is not a good answer but I wanted to close this out. I started over and released my phone number and bought a new one. I went to Active Numbers and selected the new phone. In "A message comes in", I put my webhook url in both primary and primary fails and saved that.
I then went to Messaging, Services, and selected my service. In Integration, I clicked "Defer to sender's webhook" and then put the handler url in "Callback URL" and saved that.
I went to compliance and the first two were done but 3. Campaign Use Case was incomplete. I completed that.
In Opt-out management, I edited that and put in some of my own text.
After doing all this, I replied to the message and got a response in the handler. Not sure which one of these was the problem but doing it all over seemed to work. Sorry I can't provide a better insight.

Displaying popup messages/modals with Microsoft Graph

I am currently developing an Outlook Add-In that receives a notification whenever a change in the user's calendar is recorded. The thing is that, there are some occasions where we would change an event's date from the backend by calling PATCH /events/eventId.
It would be very nice if there was any way to notify the user immediately, other than sending an email. Something like a popup modal with a warning message would work very well.
Currently the feature you requested is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process.

Twitter message reply with direct message link not carrying over conversation context

I have a Dialogflow and Twitter integration and all seems to be working fine, except for one scenario.
I have an intent that is looking for negative statements from tweets that mention the Twitter user linked to the Dialogflow integration (lets call it #Target). The purpose of this is to then reply back with a Twitter direct message (DM) link, inviting the person to engage in conversation to further explore their problem.
The scenario steps that do not work are:
Send Tweet to #Target saying for example "Your service is really bad". At this point, the output context is "negative-sentiment" if DF recognises it.
If that is the case, DF then sends back a response with a link that will allow the user to open up a DM session to further explain their issue. In this example they may have a gas supply issue.
The user opens the link in the tweet reply to start the DM.
At this point, I am looking for an explanation of the issue, for example "My gas supply has been cut off". However, if I do that, it does not recognise the intent. I have to at this point re-enter the phrase "Your service is really bad" to get it to register the "negative-sentiment" context, then I can move on.
What does work, is if I start with a DM stating "Your service is really bad", followed by "My gas supply has been cut off". It's almost as if clicking on the reply to tweet either forgets the context or its actually a different DF session that is created once we fall into the DM.
So, has anyone seen this behaviour before? Thank you in advance for your replies.
When you attempt to switch from #mentions to DMs on Twitter keep in mind the sessions don't carry over (they are separate sessions) so what you'll need to do going forward is keep track of usernames on the backend in order to connect the two distinct sessions.

Slack post by bot not always containing

I'm using the "incoming webhooks" feature of Slack to post notifications to a channel. I'm also using the "icon_emoji" feature to decorate the messages and to highlight the different types of messages. However I find that the image doesn't show up consistently:
Ie. only when it says BOT does the image also show up.
Any ideas what the issue is? Ideally I would like for the image to show up each message so that they can be scanned easily (some messages are more informative and others need to be acted upon in a timely manner).
Slack is automatically consolidating consecutive messages that are sent within a certain time frame. So the bot icon will show for the first message only and consecutive messages will display beneath the first without the bot icon.
This is standard behavior of Slack and works the same for user messages. Don't believe there is any way to turn that off.

Posting message to multiple walls does not work

I'm developing some application for the Facebook and iPhone.
User of our application would like to send to his friends notifications (only friends not other people), such as normal message. But the problem is that it’s the same message such as: "I would like to invite you to a party on Saturday". Posting one message works, but I encountered a problem when I post more messages at once. I do believe that this have to be some anti-spam filter or some other mechanism that is prohibiting posting messages in batch to walls of friends. I’m using Graph API for posting. Can somebody explain me or lead to some link how exactly this works and more importantly how to avoid this in my application…? Is it possible by paying some fee/credits to Facebook to allow my users to post messages to friends as they would like or this is simply not possible?
Just one important note: this is not a spam software and my user does not send wall messages (or notifications) to other people, only his selected friends and for sure the user is aware about this and the message is sent after user confirmation. Maybe I miss something, some application privilege?
Thank you in advance.
Marcin

Resources