05-13-2019 06:35 AM
I need a bot I am writing to send a text message to a variable list of users based on logic I have written. I can't find any examples of this type of thing anywhere. Is there a simple way of doing this. I would be executing out of bot that hears a message like "go do some work". Inside the handler for that, I determine the users that should receive a text and then I want to send the same text message to all of them.
Is there an example of something like this anywhere, or is there something in the docs that I missed?
Thanks,
Peter
Solved! Go to Solution.
05-13-2019 11:19 AM
That should be quite possible. If you are already successfully using Botkit, then this should be very easy - just use the 'bot.say()' command, providing the Jabber user ID as the 'channel' parameter: https://botkit.ai/docs/v0/core.html#botsay. Do this in a loop for each target user...
Note, Botkit has just launched a new/refactored version based on the MS bot framework in its 'master' branch in the Botkit repo - however the Jabber functionality has not yet been ported there. I believe you can still use the 0.7.4 version directly by downloading: https://github.com/howdyai/botkit/releases/tag/v0.7.4
05-13-2019 07:12 AM
If you want to send a text meaning to an IP phone's display, see the <ciscoipphoneexecute> object and POSTing messages to phones in the IP Phone Services SDK: https://developer.cisco.com/site/ip-phone-services/
If you mean via Webex Teams, there are a number of learning labs that cover chat-ops and automating sending messages here: https://developer.cisco.com/learning/tracks/devnet-express-cloud-collab-it-pro
If referring to SMS, you'll need to look to an outside service, something like Twilio...
05-13-2019 07:23 AM
Thanks for the reply dstaudt.
I'm a total newbie with this stuff, so sorry for dumb questions. I am a javascript programmer and was asked by a friend if I could help him implement a few things, but this environment is something new for me....
So, the scenario I am talking about is that my bot will accept a command to do something from a windows jabber client (that part is basically working), and from that transaction, I will decide on several users to message. They are not on windows jabber, but have jabber for android or ios. on their mobile devices.
Can I send a text message to this list of users and have it work with their jabber mobile app?
Thanks again,
Peter
05-13-2019 11:19 AM
That should be quite possible. If you are already successfully using Botkit, then this should be very easy - just use the 'bot.say()' command, providing the Jabber user ID as the 'channel' parameter: https://botkit.ai/docs/v0/core.html#botsay. Do this in a loop for each target user...
Note, Botkit has just launched a new/refactored version based on the MS bot framework in its 'master' branch in the Botkit repo - however the Jabber functionality has not yet been ported there. I believe you can still use the 0.7.4 version directly by downloading: https://github.com/howdyai/botkit/releases/tag/v0.7.4
05-13-2019 01:58 PM
Thanks again, I''ll try that. Thought it might be something along those lines but it seemed too easy and I was unclear about the channel.
Cheers
05-20-2019 06:06 AM
So I am trying this and the code is below. I am not getting any errors on sending, but the users I am targeting for messages are receiving nothing. Is there something else I need to do?
05-22-2019 11:08 AM
Does anyone here know how this works. No errors, but the messages are not received by the intended user - Super frustrating...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide