CreateBlogSupport
Log inSign up
Home
Create
  • Authentication
  • Login with Webex
  • Bots
  • Embedded Apps
  • Integrations
  • Service Apps
  • Instant Connect
  • Workspace Integrations
  • Suite Sandbox
  • Contact Center Sandbox
  • Guest-to-Guest Sandbox
  • Submit Your App
  • Tutorials

Create

Create Your Own Gmail Bot Integrated with Webex

This article explains how you can create your own Webex-integrated Google Gmail bot.

anchorPrerequisites

anchor

Before continuing, you will need access to a few developer resources and the Node.js framework:

  • Google Developer Account: You'll need to apply for a developer account on the Google Cloud Platform to access the Google Gmail APIs. You can apply for one at the Google Cloud Console: https://console.cloud.google.com/.
  • Cisco Webex Account: You'll need a Webex developer account if you don’t have one already. You can create one on the Webex Developer Portal: https://developer.webex.com/.
  • Node.js: To create the Webex bot, you’ll be leveraging the Webex Node Bot framework. Make sure you’ve got Node.js installed on your platform of choice.

anchorBuild the Bot

anchor

Once you have your accounts set up and Node.js installed, follow these steps to create your own Google Gmail bot:

  1. Login to the Google Cloud Console.
  2. Create a new project or select an existing project.
  3. Navigate to APIs & Services and then Credentials.
  4. Select Create Credentials and then select OAuth Client ID.
  5. Set the application type to Web application.
  6. Under the Authorized redirect URIs section, add the URI where your application will handle the OAuth 2.0 response. This is typically your server's endpoint that handles token exchanges. Note down the Client ID and Client Secret for future use.
  7. In the Google Cloud Console, navigate to APIs & Services and then Library.
  8. Search for Gmail API and enable it for your project.
  9. Under APIs and Services, go to OAuth 2.0 consent screen tab, ensure you include the following scope:
    • https://www.googleapis.com/auth/gmail.modify - Read, compose, and send emails from your Gmail account.
  10. Follow the Push Notifications Guide to configure the webhook.
  11. Log in to Webex for Developers.
  12. Create your Webex bot at: https://developer.webex.com/my-apps/new/bot.
  13. Note down the bot's access token, which you'll use to make API requests.

anchorBuild the OAuth App

anchor

To build the OAuth app:

  1. Use the Gmail API to authenticate users and access their emails.
  2. Use the Webex Messages API to post email notifications to a Webex space.
  3. When a new email is received, use the Webex API to send a notification message to the relevant Webex space.
  4. Implement functionalities for replying to emails, marking as starred, saving drafts, and deleting emails using the Gmail API.

anchorTest and Deploy

anchor

Make sure you:

  1. Test the integration thoroughly to ensure tasks are being created, viewed, and edited as expected.
  2. Deploy the bot on a server and ensure it is accessible to handle requests and manage token exchanges.

anchorUse the Webex Node Bot Framework

anchor

To simplify the creation of your bot, you can use the Webex Node Bot Framework available on GitHub. This framework provides a robust and easy to use platform for handling bot interactions:

  • https://github.com/webex/webex-node-bot-framework

For any queries related to bot framework you can join the following Webex space: Webex-Node-Bot-Framework Support.

anchorAdditional Resources

anchor

For more information on Google Gmail and Webex, see:

  • Gmail API Documentation: https://developers.google.com/gmail/api.
  • Webex API Documentation: https://developer.webex.com/docs.
In This Article
  • Prerequisites
  • Build the Bot
  • Build the OAuth App
  • Test and Deploy
  • Use the Webex Node Bot Framework
  • Additional Resources

Connect

Support

Developer Community

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2025 Cisco and/or its affiliates. All rights reserved.