Adaptive Card Templating for JavaScript @ 2.3.1

Occasional Contributor

Hello all,
I am desperately trying to use the latest version of the module adaptivecards-templating



So far I used the version 1.4.0. In this version was included the module adaptive-expression.
From version 2.0.0 the module adaptive-expression must be installed additionally.

I have also done that. However I get an exception that it becomes undefined.

Does anyone know how I can use the latest version 2.3.1 of adaptivecards-templating with adaptive-expression. As soon as I use the version 1.4.0 of adaptivecards-templating everything is good.


thank you in advance



5 Replies
@Mikel85570 - Thanks for reporting your issue.
We will check this at our end and will get back to you.
@Mikel85570 -As per Document, Before version 2.0, the adaptivecards-templating package embedded a full copy of the adaptive-expressions package. This model didn't allow an application to use Adaptive Card templating with a more recent version of adaptive-expressions, and bug fixes in adaptive-expressions would always have to be accompanied with a new release of the adaptivecards-templating package.

From version 2.0 on, adaptivecards-templating doesn't embed adaptive-expressions anymore, and it is the responsibility of the consuming application to explicitly load this package.

Ref Document-

@Sayali-MSFT , thank you for your reply.
Yes - that is how it was described and of course I am aware of it. My question is in the direction of how I can include the adaptive-expressions and so also use it with adaptivecards-templating. Simply adding adaptive-expressions with npm does not work. It would be very helpful if I have an example of this. 


Currently this is my configuration of the modules


I include the modules in the HTML page as follows.


It is not clear to me now if I have to include the adaptive-expressions explicitly? In the TS code I have seen that actually the adaptive-expressions is automatically included via import. However, also an attempt to include the module adaptive-expressions manually did not bring the desired success.


can no one help me?
Probably I'm just doing something wrong!
Would be grateful for any help. Also gladly an example code.
I suspect I'm just doing something wrong when including adaptive-expressions. In the code an exception is generated when addressing the instance AES.

@Mikel85570 - Sorry for delay in response, please refer the below sample -
here we can use the below version-
"adaptive-expressions": "^4.18.0",
"adaptivecards-templating": "^2.3.1"


const {
} = require('botbuilder');
const TextEncoder = require('util').TextEncoder;
const ACData = require('adaptivecards-templating');

 const template = new ACData.Template(AdaptiveCardTemplate);


Sample Link-Microsoft-Teams-Samples/teamsConversationBot.js at 14fded521862f3ee9861f07bb1497c2a190ee5f6 · Office...