Bill Software Engineer
Bill Software Engineer

Reputation: 7812

In Microsoft Bot Framework, how do I send a msg with a table format?

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

Upvotes: 0

Views: 279

Answers (1)

Bill Software Engineer
Bill Software Engineer

Reputation: 7812

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);

Upvotes: 1

Related Questions