Skip to content

This sample demonstrates how to receive a message from the Business Messages platform and echo the same message back to the user using the Business Messages NodeJS SDK.

Notifications You must be signed in to change notification settings

JoshuaPerk/bm-nodejs-echo-bot

 
 

Repository files navigation

BUSINESS MESSAGES: Echo Bot

This sample demonstrates how to receive a message from the Business Messages platform and echo the same message back to the user using the Business Messages Node.js client library.

This sample runs on the Google App Engine.

See the Google App Engine (https://cloud.google.com/appengine/docs/nodejs/) standard environment documentation for more detailed instructions.

Documentation

The documentation for the Business Messages API can be found here.

Prerequisite

You must have the following software installed on your machine:

Before you begin

  1. Register with Business Messages.
  2. Once registered, follow the instructions to enable the APIs for your project.
  3. Open the Create an agent guide and follow the instructions to create a Business Messages agent.

Deploy the sample

  1. In a terminal, navigate to this sample's root directory.

  2. Run the following commands:

    gcloud config set project PROJECT_ID

    Where PROJECT_ID is the project ID for the project you created when you registered for Business Messages.

    gcloud app deploy
    
  3. On your mobile device, use the test business URL associated with the Business Messages agent you created. Open a conversation with your agent and type in "Hello". Once delivered, you should receive "Hello" back from the agent.

    See the Test an agent guide if you need help retrieving your test business URL.

About

This sample demonstrates how to receive a message from the Business Messages platform and echo the same message back to the user using the Business Messages NodeJS SDK.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.9%
  • CSS 1.2%
  • EJS 0.9%