How to send messages to a bot using power automate in MS Teams? - bots

I am trying to test a bot by sending messages and checking its response messages. To Test, I am using "Post message in a chat or channel" in Power Automate,
Post as -> Flow Bot
Post in -> Chat with Flow Bot
In recipient, the bot's name is not visible. It only shows user's name
I am using "Post message in a chat or channel",
Post as -> Flow Bot
Post in -> Chat with Flow Bot
In recipient, the bot name is not visible. It only shows users names. I am expecting bot's name to show up in recipient dropdown.

To send messages to a bot using Power Automate in Microsoft Teams, you will need to do the following:
Create a Power Automate flow that uses the "Post message in a chat or channel" action.
In the "Post as" field, choose the "Flow Bot" option. This will ensure that the message is sent from the Flow Bot account, which is the account used by Power Automate to send messages.
In the "Post in" field, choose the "Chat with Flow Bot" option. This will ensure that the message is sent to the Flow Bot, which is the account that will receive the message.
In the "Recipient" field, you should be able to select the name of the bot that you want to send the message to. If you do not see the name of the bot in the dropdown list, you may need to check that the bot is installed and configured properly in Microsoft Teams.
After you have selected the recipient, you can enter the message that you want to send in the "Message" field. You can also use dynamic content to insert information from previous steps in the flow, if needed.
Save and run the flow to test it. The Flow Bot should send the message to the bot that you selected, and you should be able to see the bot's response in Microsoft Teams.

Related

Can MS bot service message end point detect user's edit behavior?

Context
Currently we are using Azure Bot Service. The Bot Service is setting up an message endpoint which is directed to our on-pre server
We can successful detect an request coming in when user send something through bot.
But when user edit the previous messages, not request comes in
Message endpoint on Azure
User send a new message on bot
User edit a message on bot
Question
Does there exists a way to receive the update request when users edit their previous messages on bot?
Check out the link mentioned below to verify "Update Activity" section which is nearer to the current requirement.
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#update-activity

Parse a value from a message in Teams using Flow

Currently I send MessageCards to Teams via the O365 connecter from Cherwell. In the message there is an #NAME being the name of the technician in Cherwell.
Does anyone know of a way to parse a new message in FLOW (starting with the 'When a new channel message is added' method) to use the name after the # as a mention in the channel.
So basically the Message appears via the O365 connector, then the flow runs to mention the person in the channel where the message arrived?
Worked a treat. I parsed out the email address from the JSON that was sent as the MessageCard then created a flow that created a variable and wrapped the around it and using he Flow Bot now have the mentions sending around from a MessageCard being sent via the O365 connector to Teams.

With a dialogflow chabot, are "actions on Google" available in Slack?

I did a bot that does a quiz. So far if I'm able to try talking to it through Dialogflow interface:
I need to click on "actions on Google".
But I am not able to do retrieve the same answers in Slack.
I did the following:
In the Slack app, go to the 'Bot users' section and click the 'Add a Bot User' button.
In the Slack app ‘Basic Information’ section, copy the 'Client ID', 'Client Secret' and 'Verification Token' and paste their values into the respective fields below.
Start the bot.
Copy the 'OAuth URL' value below and paste it into the 'Redirect URL(s)' field from the ‘OAuth & Permissions’ section of your Slack app settings. Save URLs.
Copy Events Request URL from the field below and paste it to Request URL in the ‘Events Subscription’ section of your Slack app.
Enable events in the ‘Event Subscriptions’ section.
Select necessary events in "Subscribe to Bot Events" section for example message.im, message.group, message.channel, im_created. These events will define which message types (direct, in channel, etc.) your bot will react to. Save changes. I selected message.im, message.groups, message.channels, im_created
In the Slack app settings, go to 'Manage Distribution' and add the bot to your Slack team using the 'Add to Slack' button.
In Slack I added on the left bar Dialogflow bot.
Are actions in Google used for a dialogflow chabot available when talking to it in Slack?
No, actions on google features are not available in Slack. This is because actions on google are features are used to create a chatbot for Google Assistant. Each time you select Actions on Google in the chat window of Dialogflow, you preview what your conversation looks like for Google Assistant conversations.
Since you have already created a Slack bot and integrated it with your Slack channel, so you should be able to send any responses that you create in the Default or Slack tab of the responses to your bot. Just click on the + sign in the response tab and add Slack as a channel of your bot, then click on Add Response to start creating responses just for Slack using Dialogflows UI.
If you want to use other message types in Slack using Dialogflow, have a look at the docs. It lists how you can create Rich responses for Slack bots.

Change bot user name in slack for dialogflow bot

I am recently working on dialog flow bot (API.ai)
I have integrated my chatbot with slack from API.ai. When I start conversation and continue chatting, I found that bot username displayed in slack shown as Dialog flow Bot. But I have configured the name as treselle. How to change it?
Please find the screenshot below:
Yes! you can change it.
Go to your slack chatbot application.
Click on about tab.
enter image description here
Click on settings button.
Below "Bot user", select edit bot name button beside the bot name.
I'm not sure it's possible or at least I couldn't make it neither.
If you're a developer too, here is what you can do:
create a Slack app and bot, with enabled events subscriptions that will call your application webhook each time a message is sent to your bot
create a DialogFlow agent that you will call using 'query' API
create your own web application with a webhook route called by Slack, from which you can call DialogFlow API
This way you'll be able to customize every single details, including username, description, icon of the Slack bot, and send messages with rich content!
Here are more details: https://blog.eleven-labs.com/en/en/replace-erp-by-slack-bot-with-dialogflow-and-symfony/
I was wondering the same thing. Apparently you can't change the name of the bot until it is public. Here's a quote from the documentation...
Once logged in, navigate to the instance and locate the bot user called #dialogflow-bot.
Note: In order to change the name of the agent or add a logo, you'll need to make the bot public.
https://dialogflow.com/docs/integrations/slack

how to use email channel in microsoft bot builder

Currently i am using slack channel with bot builder.
I want to use email channel, is there any sample code for this.
What is effective way to send email from bot to avoid spam
I am using node js
There's no extra code needed for the email channel. Your bot will reply to the body of an email it receives. You can add things like channel specific code if you like. Right now only office 365 emails will work, please read the documentation here
The bot will reply to an email sent to the registered email address with an email where the body is the same message that you would see as a response in other channels like slack, emulator, etc

Resources