Greeting and salutations all. Here is my first foray into writing a technical blog.

Cosmos DB is fun. Adaptive Cards are fun. I like fun things, so I thought it would be fun to get my bot to display items from a Cosmos DB in an Adaptive Card.

In your Node.JS project, install the following npm packages:

npm install @azure/cosmos
npm install adaptive-expressions
npm install adaptivecards-templating

Step 1 — Set up the Cosmos DB Client

Set up the connection to the Cosmos DB Client as above. In my example, I’ve stored the keys, endpoint and database information in the ENV file.

Step 2 — Connect to the Cosmos DB Client

Steve Johnson

Father, Gamer, Man Utd Supporter, Bots, Tech and all things Azure and Microsoft 365. SuperDry shill. Also likes Patty & Bun and BrewDog.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store