cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Building a simple bot in Teams

Hi all, I'm trying to build a simple dice roller bot for MS Teams but running across some fairly basic problems. Any help is greatly appreciated, thanks.

 

1. I've set it the flow to trigger on a new message to a specific team and channel. That works well

2. I assign the plaitext content of the message to a variable. That works too.

3. I try to check that the variable starts with "/roll" but that always fails

 

I tried printing out the content of the variable, using the dynamic expression variables('cmd'), in a reply message to the same channel. but rather than showing the actual content, it instead seems to contain a json: {"contentType":"text","content":"/roll d6"}. So I suspect the issue is connected with that. IF so, then the question is how to I setup the check in (3) above?

 

Many thanks

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Building a simple bot in Teams

hi @ptav  in Power Automate everything you have in background is Json languaje, all are apis. So if you need to manage the content you can use Parse Json see

 

json.gif



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Building a simple bot in Teams

hi @ptav  in Power Automate everything you have in background is Json languaje, all are apis. So if you need to manage the content you can use Parse Json see

 

json.gif



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
New Member

Re: Building a simple bot in Teams

Thanks! that solved the issue and the dice roller is now working. Now how do I deploy it?

 

Even though it is finished it doesn't seem to start up on it's own (only when I use the "Test" button on the editor).

 

Ideally I would like to make it installable as an addin to any team or channel like one can do on Discord but that can be done later. for now making it specific to a channel is ok

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,658)