-1

I am implementing a cisco spark bot , which is now known as Webex teams. I am able to send receive simple text message from user. Is there a way to send rich card to user from Bot? I could not find any helpful documentation.

Here is my code I use to interact with bot

var SparkBot = require("node-sparkbot");

var SparkAPIWrapper = require("node-sparkclient");
// Starts your Webhook with default configuration where the SPARK API access 
token is read from the SPARK_TOKEN env variable 
var bot = new SparkBot();

var spark = new SparkAPIWrapper(process.env.SPARK_TOKEN);

bot.onMessage(function (trigger, message) {
     if (message.personEmail != "mytestbot@webex.bot")

       spark.createMessage(message.roomId, "You said " + message.text, { 
       "markdown": 
        true }, function (err, message) {
        if (err) {
        console.log("WARNING: could not post message to room: " + 
        message.roomId);
        return;
       }
    });
});

Rich cards may contain buttons , links, list , thumbnail etc..

Planet-Zoom
  • 1,005
  • 2
  • 9
  • 20

1 Answers1

1

This is not supported yet on the platform side. The best you have at the moment is you can use markdown to style messages.

Peter Swimm
  • 111
  • 1
  • 4
  • 1
    You can, here is a list of message formatting options: https://developer.webex.com/formatting-messages.html Webex Teams runs a public channel if you need help getting started: https://eurl.io/#SyNZuomKx – Peter Swimm Jul 18 '18 at 19:35
  • the link refers to message formatting via REst API. I am looking for node js library methods. – Planet-Zoom Jul 19 '18 at 06:48
  • The API is the limiting factor, you have to use what formatting objects they provide. – Peter Swimm Aug 07 '18 at 19:29