cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Derricki87
Frequent Visitor

Post message in Microsoft Teams Team Channel as bot

I am reaching out because I need some assistance with a ChatBot that I created using power virtual agents in Microsoft as well as Power Automate. Basically what I'm trying to do is post in my teams Channel for my team from the answers to the questions our chatbot asks.

 

As of right now the answers to the questions are coming to an email mailbox that I created using Microsoft Flow and Power automate. There's no issue there using power automate to the email I created. However, when I want to post in a team’s channel or chat using Microsoft Flows I want it to post as the new mailbox user I created not as myself. I created a Generic Mailbox and I'm wondering if I should put in a request to get a new AD user created for the bot so it can post as itself instead of me the creator.

Not sure if anyone can help or has done this before, please let me know if anyone can help.

18 REPLIES 18
DiegoPeres
Responsive Resident
Responsive Resident

Hello @Derricki87 , For your case, you will use the Post Message in a chat or channel connector, with the following settings: 

DiegoPeres_0-1660595532512.png

In yellow highlight you can see the connection I am using on this connector, which in this case has to be the one on your service user.

The message is sent to the name of the connector's connection.

DiegoPeres_1-1660595679017.png

I changed the connection here's how it looks

DiegoPeres_2-1660595849936.png

DiegoPeres_3-1660595910681.png

 


Did I answer your question?😉
Please consider accepting it as the solution to help other members find you faster.


Like my answer?


Like it! 👍



Thanks!
Diego Peres,
Connect with me: Linkedin

 

 

 

Derricki87
Frequent Visitor

@DiegoPeres Thank you sir for the help, however when I try to use a connector other than myself it doesn't work correctly. (I'm wondering if this means I need to put in a ticket with my IT department to create a new AD user to be able to post as the bot in the Teams Channel.)

 

Derricki87_0-1660597161391.png

So as of right now it posts in our Teams Channel via my username not the ChatBot. Which makes me think I need to have a user created in our domain to be able to forward it as that user to the Teams Channel. (However, I could be wrong.)

 

I don't know the structure of your organization, but normally if you use ADD you need to create a service account with a TEAMS license so you can use it in the connector, it doesn't necessarily need to be a local AD user, the cloud user meets your needs, as you already have an email you can assign the box created in this user so it can be reused in other demands.
validate with your IT team


Did I answer your question?😉
Please consider accepting it as the solution to help other members find you faster.


Like my answer?


Like it! 👍



Thanks!
Diego Peres,
Connect with me: Linkedin

 

Thank you sir,

 

I created the Team inside of Microsoft Teams with my AD account then created the subchannels as well as the bot/connector with my Teams account. I'm wondering if I need to put a ticket in to make the generic mailbox tied to a new AD user. Although I just saw that Power Virtual Agents is has a "Preview" in the post in a teams chat or channel to post as the bot, which is exactly what I'm looking for. So maybe I'll just sit tight and wait for that to be an option.

 

Thank you again!

Hi, @Derricki87  I'm glad I could help you...
I am at your disposal.

Don't forget to mark your answer as a solution...

See you next time.

Derricki87
Frequent Visitor

Hello Again @DiegoPeres  thank you for your help again. I am trying to post it as the Power Virtual Agents (Preview) option, however it comes back as an error 400: "Channel is not supported for Power Virtual Agents Bots" is this because of the "Preview" part or is it because I don't have rights or permissions? (I created the channel some time ago) I've posted the screen shots to my flow's as well below. Let me know if you can assist or if I need to open a new post/question. I wonder if it has anything to do with the advanced options, I left them all blank.
Teams Error posting as Bot.png
Untitled.jpgUntitled2.png

Hi, @Derricki87 
In this case you are trying to post as the BOT in a team on TEAMS, for this to happen you need to add the bot into your team.
I usually only post this way when I want to send a message directly to the user as if the bot was calling him.

But the error is related to the bot not having access in the team.

Try to insert it in the team and make a new test.

Hello and Thank you @DiegoPeres 

 

I have the app/chatbot that I created installed on my teams however it's still not able to post to the chat. Not sure if my flow is wrong or not.

Derricki87_0-1661808556066.png

I'm still looking it, but any suggestions let me know.

 

 

Hi @Derricki87

 Could you send me a printout of your flow, I will simulate it here in my environment and send it to you.

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (1,515)