BotBuilder-Samples/samples/javascript_nodejs/06.using-cards
tracyboehrer 6b7d0f9d71
JS SDK 4.22.1 (#3941)
Co-authored-by: Tracy Boehrer <trboehre@microsoft.com>
2024-02-01 12:45:46 -06:00
..
bots [Node.js Samples] Refactor bots to override ActivityHandler.run() to save state instead (#1964) 2020-01-24 15:50:52 -08:00
deploymentTemplates [Node]Update node version to 16 in ARM templates (#3921) 2023-10-24 15:35:08 -05:00
dialogs Add OAuth card attachment to JS using-cards sample 2020-06-19 10:52:06 -03:00
resources samples and generator updates for 4.4 release 2019-05-02 13:51:21 -07:00
.env [#3526] Add support for MSI to JS samples and generators - bot essentials (part 1/2) (#3551) 2021-11-01 15:03:29 -07:00
.eslintrc.js r9 dependency updates (#2428) 2020-05-26 08:15:38 -07:00
README.md feat: Update Node Samples to SDK 4.20.0 and restify 10.0.0 for Compatibility with Node 18 (#3902) 2023-07-20 11:46:07 -05:00
index.js R17 Samples (#3807) 2022-08-19 08:45:36 -05:00
package.json JS SDK 4.22.1 (#3941) 2024-02-01 12:45:46 -06:00

README.md

Using Cards

Bot Framework v4 using cards bot sample

This bot has been created using Bot Framework, it shows how to create a bot that uses rich cards to enhance your bot design.

Prerequisites

  • Node.js version 16.16.0 or higher

    # determine node version
    node -v
    

To try this sample

  • Clone the repository

    git clone https://github.com/microsoft/botbuilder-samples.git
    
  • In a terminal, navigate to samples/javascript_nodejs/06.using-cards

    cd samples/javascript_nodejs/06.using-cards
    
  • Install modules

    npm install
    
  • Start the bot

    npm start
    

Testing the bot using Bot Framework Emulator

Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

  • Install the latest Bot Framework Emulator from here

Connect to the bot using Bot Framework Emulator

  • Launch Bot Framework Emulator
  • File -> Open Bot
  • Enter a Bot URL of http://localhost:3978/api/messages

Interacting with the bot

Most channels support rich content. In this sample we explore the different types of rich cards your bot may use. A key to good bot design is to send interactive media, such as Rich Cards. There are several different types of Rich Cards, which are as follows:

  • Animation Card
  • Audio Card
  • Hero Card
  • Receipt Card
  • Sign In Card
  • Thumbnail Card
  • Video Card

When designing the user experience developers should consider adding visual elements such as Rich Cards.

Deploy the bot to Azure

To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.

Further reading