Send a message in a channel "only visible to you" - slack-api

I can not see in the slack API documentation the way for a bot to send a message in a channel that response to a user.
The same way slackbot does reply when doing /help.
Anyone can let me know if that is possible?
Notice the "Only visible to you". In the RTM manual they say that the messsage is of the same type as the event message. I don't see any attributes that would say it is visible only to a certain user.

Sending private messages in channels with the "Only visible to you" tag is called "ephemeral" and is now possible through the Slack API.
https://api.slack.com/methods/chat.postEphemeral
(I'm not sure since when)

Related

Why does Twilio say that sending a WhatsApp message must use a pre-approved template, then allow me to send an arbitrary untemplated message?

I'm in the Twilio WhatsApp sandbox following their tutorial. The tutorial says: "Messaging with WhatsApp has a few differences from SMS: to send outbound messages, such as notifications, you must use a pre-approved template from WhatsApp."
The tutorial lets me choose a template to send a test message, but it also lets me overwrite the text that gets sent with something unrelated - in this case the string "Random untemplated text" (as depicted in screenshot below). I clicked Make Request and I got "Random untemplated text" in a WhatsApp message on my phone.
Doesn't this contradict the statement that WA requires you to use a pre-approved template?
When you send a message to some company Whatsapp phone from your phone, it's opened a 24-hour conversation session, in this session you're allowed to send any message to the customer. In the case of the Twilio Sandbox number, to start you need first to send a code to Whatsapp, "join ...", this message opens the 24-hour session, so any message that you send via API will arrive for you. :D.
The 24-hour session is closed after 24 hours of the last customer message, when the session is closed, you can send just pre Whatsapp approved messages, and if the customer answer this message, the cycle repeat.
You can see more information about it in this documentation.
I hope that it can help you.

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.

How to get and add URL of message originated in one slack channel to another slack channel

i'm new to slack programing so bear with me.
In my company we have slack bot that users can use to alert other users, by posting an alert in one slack channel relevant user will get alerted in other channel. The problem is that user that was alerted don't know from which channel or thread the alert originated and have to manually search multiple channels.
The question is how can i accomplish this so that the user will get alerted and in addition get link to channel or thread where the alert was triggered from.
It depends on how users trigger alters, but you'll usually get a Channel ID in the payload from Slack.
When you're alerting the other users, if you include that channel ID in the message, but wrap it <#[channelid]> e.g. <#CHJ9HDXE1>, then the Slack clients will convert that into a link to the channel, or you could also use chat.getPermalink to convert a message_ts into a clickable link.

Is there any possible way to read message in ms teams before clicking the send button

I am trying to create a teams app that will detect the message that user has typed in before the message is sent on clicking the send button or on the send button click event or before the recipient receives the message. The idea is to read the message and using AI grammatically correct the text or detect if any inappropriate message is being sent that violets office rules, kind of like Grammarly. My question is it possible to detect this text through any possible means like graph api. i am open to any suggestion, not just teams app it can be some kind of windows application that can interact with teams app . Will be taking care of AI part myself.
This isn't supported, there is no No event when user is typing message. You can get an event when user sends the message. For more info here

Twilio send specific message based on message received

I was wondering if anyone knows of good resources for learning how to send Twilio messages based on what message a client sends. For example if a client texts "current song", to send the current song title. If a client texts "current artist", to send the current artist. I wasn't able to find anything about that in the Twilio documentation. I may have overlooked it or something. Wasn't sure how to do a Google/Bing search on the topic as I wasn't getting results with my search term.
Thanks in advance!
Twilio Developer Evangelist here,
For your example, you would want to parse the message body of any incoming SMS and have some logic on your end that checks if that message is "current song" or "current artist" and handle that appropriately. How you handle generating a response is left entirely to the developer's discretion.
To get up and running quickly with receiving and responding to SMS, check out the Twilio documentation if you haven't already. The dropdown on the right hand will let you select from several languages to get started with.
A quick example using NodeJS with Express would look like this:
router.post('/text',function(req,res) {
if(req.body.Body == "current artist"){
console.log("A request for the current artist has been made.");
}
});

Resources