0

I am trying to create a msg to send to the user:

var msg = new Builder.Message().address(messageAddress);
msg.addAttachment(??);

bot.send(msg, (err)=>{
    if(err){
        reject(err);
    }
    resolve();
});

How do I add a table to my msg?

Example of a table:

enter image description here

Bill Software Engineer
  • 7,362
  • 23
  • 91
  • 174
  • Refer to this answer https://stackoverflow.com/a/48160573/2884059 . You can try `msg.addAttachment(JSON.parse(jsonStringCard));` putting the json from that answer in the `jsonStringCard` variable – Javier Capello Sep 30 '18 at 04:13

1 Answers1

1

I was able to this to work based on the answer of stackoverflow.com/a/48160573/2884059 .

var msg: Builder.Message = new Builder.Message(session);
msg.addAttachment({
    "contentType": "application/vnd.microsoft.card.adaptive",
    "content":{
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
            {
                "type": "ColumnSet",
                "columns": columnSet
            }
        ]
    }
});
session.endDialog(msg);
Bill Software Engineer
  • 7,362
  • 23
  • 91
  • 174