Here is my code: on("chat:message", function(msg) { if (msg.type == "api" && msg.content.indexOf("!attribut ") !== -1) { //------------------------------------------------------------------------------- // Parameter zerlegen // !attribut Name#?{Attribut|Charisma,CHA|Geschicklichkeit,DEX|Verstand,MIN|Geist,SPI|Stärke,STR} //------------------------------------------------------------------------------- var command = msg.content.replace("!attribut ", ""); var teile = command.split('#'); var wer = teile[0]; var was = teile[1]; var text = "@{" + wer + "|roll" + was + "}"; log("text=" + text); sendChat(msg.who, text); } }); I tried % instead of @ as suggested by Jarren. There is no error message if I do so. But in chat only the text charactersName|rollSomething is shown instead of doing the roll. @Jarren: If I type @{charactersName|rollSomething} in the inputfield of the roll20 chat the roll is done. I think attributes with names starting with roll are interpreted in a different way if there is a button with type="roll" and the right name in the sheets html. The sheet I am using is the TORG Eternity sheet. A string doing fine in chat but not via sendChat was "@{Pater Alejandro Reyes|rollCHA}".