This guide deploys an Echo Bot to App Engine on Google Cloud Platform for use with Business Messages.
The Echo Bot is a sample application that echoes the messages of users back to them and allows you to experiment with the rich features of Business Messages. At the end of this guide, you’ll have a bot that is ready to send and receive messages on the Business Messages platform.
In Prerequisite setup, you
- created a GCP project with a service account
- downloaded a JSON credentials file as a key to the service account
- deployed the Echo Bot to App Engine
- enabled the Business Messages and Business Communications APIs
- configured your webhook URL
If the Echo Bot is no longer deployed, head back to Prerequisite setup and complete Deploy the web application to GCP.
For this guide, you'll create and configure a Business Messages agent in the Business Communications Developer Console, which will enable the Echo Bot to send and receive messages.
Create a brand and an agent
An agent is a conversational representation of a brand—the conversational entity that users interact with. You create a brand to represent the business and an agent so that consumers can conversationally connect with them.
- Open the Business Communications Developer Console and sign in with your Business Messages Google account.
- Click Create agent.
- If you're prompted for Agent type, choose Business Messages.
Enter values for Brand name and Agent name.
Use whatever values you like, or use the following suggestions:
Field Value Brand name Echo Brand Agent name Echo Bot
Click Create agent.
When your agent is available, click your agent.
In the left navigation, click Agent information.
Update the values however you like, or use the following suggestions:
Under Test URLs, click the Android button or iOS button to copy the agent's test URL to your device's clipboard.
Send this URL to a corresponding mobile device. (iOS devices require the Google Maps app.)
Start the conversation
On your device, use the Business Messages Agent Launcher to open the URL you copied in the previous step. Manually navigating to a test URL doesn't work because of browser security measures.
The URL opens the associated conversational surface for your agent, and you're greeted by your agent’s welcome message.
At this point, you can interact with the Echo Bot. It echoes messages you send in the conversation back to you. Additionally, you can invoke rich features by sending specific strings: “carousel”, “card”, “chips”.
The logic that echos messages and invokes rich features is stored in the Echo Bot sample application that you deployed to GCP App Engine in the Prerequisite Setup.
Now that you've created your first agent, learn more about Business Messages and what else you can do on the platform.