I would like customers to be able to click a button to send themselves a transcript at any point in the conversation. This button should essentially send a message to the bot which would initiate an “email transcript" dialog to prompt for their email and send the transcript. I was able to add a button to the directline webchat client (in my title bar) but I can't figure out how to have it create an activity for the bot. I have a custom store that sends an "inactive" activity but I wasn't able to use this same method to make the button send an activity. Can this be achieved? Or is there another way for customers to get a copy of their transcript?
I have achieved the actual transcript retrieval and emailing in code, initiates by a LUIS intent, I just want to provide an intuitive "always there" option to do this.
The WebChat offers a simple sample that shows you how to send activities programmatically to the bot. In this sample they are creating a separate button with an Event Listener, which will sent your message as a message activity.
If you would like to sent it as an event in the background, you could have a look at this sample, which you could combine with the event listener of the first example.
How to send a message programmatically
How to send welcome event
Note: you need to use the JavaScript WebChat, it is not possible to add this functionality to the iFrame version of the Bot Service.
Related
I am using power automate to post a message to a teams channel. The message cannot be edited by admin of that teams channel or any user in that channel. I could not find an option to make the teams message editable or make it editable only by admin of that channel. Any pointer on making power automate teams message editable by admin of the group?
In general messages sent from one "user" (or bot) can't be edited by other users, even an admin - that would be a disaster for things like auditability. However, messages sent from a bot (e.g. the Flow bot) -can- be edited by the bot. However, in the case of Power Automate, it does not offer this as an action for the "post a teams channel message" Action, only for the Action that sends an Adaptive Card message. If you can change your flow to send this kind of message, there is an action to then update it later, using the message id.
I am trying to implement messageBack feature of Adaptive Card in Slack Builder Kit where on clicking of a button I can show a default response of the bot before the response comes from the API. This could be implemented in Adaptive Card using messageBack. Is there a way to do similar thing in Slack Builder Kit template.
On clicking the button, I want to show 'Thank you for clicking' and then I want to show the response which comes from the API.
When the button is clicked, you can update the message that you sent with "Thank you for clicking" using the chat.update method. After that, you could update it once more to show the response from the API or just send another message via chat.postMessage.
Alternatively, you could send an ephemeral message with the text "Thank you for clicking" using the chat.postEphemeral method, which would only show up for the user that clicked the button and then send a regular message with the API contents in a later message.
How is this class used? If there is a submit button using Action.Submit on an adaptive card, how does the Microsoft Bot get this message?
So this question doesn't get flagged as too generic, there is a Webex adapter connected to a Microsoft bot using this exact demo.
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-adapter-connect-webex?view=azure-bot-service-4.0
The OnMessageActivityAsync message gets the message from the bot, for example, if the user types "Hello", and the bot responds back with an adaptive card that has the action "Action.Submit" that will give the user a card with a submit button. Now, if the user clicks "submit", Webex should send something back to the bot. I don't think it's a message, because I never receive a message. Webex has, on it's side of documentation, a webhook with ActionAttachments. But after creating this webhook and clicking submit, what is the bot supposed to receive?
The answer to this was to change the Webex access token from the auto-generated token to the bot's access token. After doing this, the Action Attachment was working and the bot received the Event Activity.
In a Slack conversation, is it possible to click on a button to send a message to the Slack channel?
The Slack conversation could be:
The user types a word (or message)
A slackbot shows some text and two buttons
The user clicks on a button to send a TEXT message to the Slack channel
The Slackbot reacts on the 'action' message.
It is not possible to create an REST service for my Slackbot, because the Slackbot is behind a firewall. So, registering commands is not possible.
So sending a message as the result of a button click is needed. The Slackbot can react on that message.
I read that attachments could be a good way to do this, BUT the is 'outmoded'.
I tried to send an secondary attachment, which is outmoded, but that was not possible.
The next approach was adding a webhook. So pushing a button resulted in using the url, but that is of course not possible because I cannot send a POST request via a simple (get) url.
Please give a short example.
This will not work.
Every interactive feature (e.g. buttons) require your app to be able to receive POST requests from Slack through the public Internet. Since you say you can not provide that (e.g. behind a company firewall) you will not be able to use any interactive features.
See also this answer: How to integrate internal APIs (Not accessible outside office network) to slack slash commands
Referral events should send an event according to the documentation here. See #2 for more information.
I am trying to receive this event, however, it does not seem as though the event is sent to the bot framework. We verified that the permission is granted with Facebook Messenger setup. I am using nGrok and can see all messages routed to the bot, however, this event does not show up when using an http://m.me/ link
Are these events supported?
You need to subscribe to Referral Messages in the Facebook Messenger Developer Portal. Open the settings blade on the left, scroll down to webhooks, and hit edit events.
Then enable messaging referrals and click save.
When the user clicks on the m.me link it will open the conversation and send a message activity to the bot. Note, I could only get this behavior to work if I added a ref parameter to the link - https://m.me/<PAGE_NAME>?ref=<VALUE>.
Hope this helps!