cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ptav
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
ChristianAbata
Super User II
Super User II

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
ChristianAbata
Super User II
Super User II

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

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (58,040)