Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Manage Conversations Addresses for Google Business Messages (Public Beta)


(error)

End of Life

Google Business Messages (GBM) will be turned off on July 31, 2024. The Twilio GBM API and Google Business Profiles chat will no longer work after that point.

Learn more about the GBM End of Life from Google(link takes you to an external page).

(information)

Info

Not a HIPAA Eligible Service
Google Business Messages for Flex is not a HIPAA Eligible Service and cannot be used in Flex workflows that are subject to HIPAA.


Overview

overview page anchor

This guide describes how to add Google Business Messages (GBM) as a Conversations channel in Flex. Once added, customers can start chats with Flex agents directly from Google Search and Google Maps. Customers must message you first, as agent-initiated outbound messages are not supported.

To learn more about supported functionality, see Google Business Messages.

Limitations

limitations page anchor

For limitations, see File Attachments and API Limits and Known Issues.


Add Google Business Messages to Flex

add-google-business-messages-to-flex page anchor
  • Twilio Console(link takes you to an external page) account with Admin access
  • Flex UI v2.4.x or later
  • Google Business Profile

Step 1: Create a sender in the Twilio Console

step-1-create-a-sender-in-the-twilio-console page anchor
  1. In the Twilio Console(link takes you to an external page) , from the Develop sidebar, click Explore Products .
  2. Under Marketplace , click Channels . Tip : To pin Channels to the sidebar for access later, click the pin icon.
  3. In the sidebar, click Google Business Messages .
  4. Click Get Started.
  5. In the Your first sender window, enter a brand, sender, and email address.

    • The brand is usually the name of your company. This is visible to you, Twilio, and Google, but isn't shown to end users. Twilio recommends using only one brand per Twilio account SID or Subaccount SID. If you create more senders in the future, you can reuse the same brand.
    • A sender is the address used to interact with the business. The sender name is visible to end users. Note that Google calls the sender an "agent."
    Google_Business_Messages_New_Sender.
  6. Click Submit . Your sender is created in Twilio so you can test it right away, but it isn't connected to your Google Business Messages yet.

Step 2: Create a Conversations address

step-2-create-a-conversations-address page anchor

To receive and respond to messages in Flex, you can create a Conversations address for Google Business Messages from the Console or with the Conversations API.

Console

console page anchor
  1. In the sidebar, click Flex > Manage > Messaging .
  2. Click Create New Address .
  3. From the Address Type list, select Google Business Messages.

    Google_Business_Messages_New_Address.
  4. From the Sender name , select your sender.
  5. From the Integration type list, select how you'd like conversations to pass to Flex, via Studio or Webhook .
    - If you selected Studio , from the Studio Flow list, you can select the out-of-box Messaging Flow , unless you have removed or reconfigured your studio flow.
    - To learn more about configuring Studio Flows, see Configure pre-agent workflow with Studio and Set up a Studio Flow chatbot to respond to GBM messages. Twilio recommends setting up a chatbot to provide prompt responses and clear escalation paths to end users.
  6. Click Create Address .

You can programmatically create and manage a GBM address using the Conversations API's Address Configuration Resource.

Create a Google Business Messages Address via the API

create-a-google-business-messages-address-via-the-api page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = require('twilio')(accountSid, authToken);
_16
_16
client.conversations.v1.addressConfigurations
_16
.create({
_16
'autoCreation.enabled': true,
_16
'autoCreation.type': 'studio',
_16
'autoCreation.studioFlowSid': 'FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_16
type: 'gbm',
_16
address: 'gbm:<sender_id>'
_16
})
_16
.then(address_configuration => console.log(address_configuration.sid));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"address": "gbm:<sender_id>",
_22
"type": "gbm",
_22
"friendly_name": "My Test Configuration",
_22
"address_country": "CA",
_22
"auto_creation": {
_22
"enabled": true,
_22
"type": "webhook",
_22
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"webhook_url": "https://example.com",
_22
"webhook_method": "POST",
_22
"webhook_filters": [
_22
"onParticipantAdded",
_22
"onMessageAdded"
_22
]
_22
},
_22
"date_created": "2016-03-24T21:05:50Z",
_22
"date_updated": "2016-03-24T21:05:50Z",
_22
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}

Step 3: Test your setup with a mobile device

step-3-test-your-setup-with-a-mobile-device page anchor

Twilio creates sender test links for iOS and Android, so you can test your sender and see what your customers will experience on a mobile device.

  1. In the Console, go to Channels > Google Business Messages , and select the Sender .
  2. From Sender Test Links, click Android or iOS. You can send the copied link to yourself in an email or WhatsApp message, for example, so you have access to the link on your mobile device.

    Google_Business_Messages_Test_Links.
  3. On your mobile device, open the link to send a message as a customer.
  4. Open the Flex UI and log in as an agent.
  5. Set your status to Available .
  6. Accept the Incoming chat request and type a reply. The reply appears in Google Business Messages.

    Google_Business_Messages_Agent_and_User.

Step 4: Complete verification

step-4-complete-verification page anchor
  1. In Channels > Google Business Messages , select the Sender .
  2. Review the sender details and click Verify Sender . The sender shows as Pending verification in the Console.
  3. To complete verification, follow steps 3-5 in Google's Business Messages .

Rate this page: