Insights Videos Blog Learning
SETUP GUIDE

Email Channel Configuration - Gmail

Setting up Gmail as an Email Channel in Webex Contact Center Guide

This guide walks you through the step-by-step process of configuring Gmail as an Email Channel in Webex Contact Center using OAuth 2.0. The setup process includes configuring your Gmail account, creating Email Assets, setting up the Entry Point, and designing the associated workflows. These steps are essential to successfully connect your support email account with the Webex Contact Center platform.

Pre-requisites

  1. You have admin credentials to configure in Control Hub, Management Portal, and Webex Connect.
  2. You have your Gmail account credentials ready.
  3. You have set up basic configuration for Webex Contact Center, including Agent Desktop and Digital Workflows.

Quick Links

Step 1: Create a Gmail Account

Google has disabled the "Less Secure Apps" feature for all accounts. Previously, this setting allowed sending emails through Gmail SMTP. In this setup, we will use OAuth 2.0 authentication to enable outbound email functionality.

Note: The steps in this section apply only to Gmail accounts. The Google UI may change from time to time, but the setup goals remain the same. Always refer to the latest documentation from Google if you notice interface differences.

  1. Use or create a Gmail account that will handle your incoming support emails.
  2. This will be referred to as your support email address throughout this guide.
  3. Log in to the Gmail account at https://mail.google.com.
  4. Turn off Smart Features:
    • Go to Settings → See all settings → General.
    • Scroll down to the "Smart features" section.
    • Uncheck "Smart features in Gmail, Chat, and Meet".
  5. Enable POP3/IMAP settings:
    • Click on the Settings icon → See all settings.
    • Go to the Forwarding and POP/IMAP tab.
    • Enable POP Download and Auto-Expunge on, then click Save Changes.
Gmail account configuration step 1

Figure 1: Gmail Account Configuration - Enable POP/IMAP

Gmail account configuration step 2

Figure 2: POP Download and Auto-Expunge settings

Update from January 2025: Google has removed the manual option to enable or disable IMAP. IMAP access is now always enabled, and no further action is required for IMAP availability.

Step 2: Setup Google Cloud OAuth

  1. Log in to Google Cloud Console.
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services → OAuth Consent Screen.
  4. If this is the first time you are setting up OAuth for Gmail, you will need to configure Google Auth Platform:

    Refer to Get started with the Google Auth Platform for details on configuring Google Auth Platform and for future changes if any.

    • Fill in APP Information details such as App name, User support email, and click Next.
    • Choose External under Audience and click Next.
    • Fill in developer contact email and click Next.
    • Agree to the Terms of Service and click Continue.
    • Click Create.
  5. Click Audience in the left sidebar and add Test Users by clicking on Add users.
  6. Add any of your Gmail addresses you prefer to use for testing as a Test User.
  7. Click Publish App in the same Audience page to make it live.
  8. Now click Clients in the left sidebar and click Create client and select Web Application under OAuth Client ID Application type.
  9. Now go to Credentials → Create Credentials → OAuth Client ID.
  10. In the Create OAuth client ID page that opens, add:
    • A name for the application, example: Webex Connect
    • Authorized JavaScript Origin: https://your-webex-connect-domain
    • Authorized Redirect URI: https://your-webex-connect-domain/callback
  11. Click Create and download the credentials JSON file.

Configure OAuth Consent Screen

  1. Input the below details under Scopes > Add Scopes manually
    {
      "https://www.googleapis.com/auth/gmail.modify",
      "https://www.googleapis.com/auth/gmail.readonly",
      "https://www.googleapis.com/auth/gmail.send"
    }
  2. Click Save and then Publish.

Step 3: Configure Email App in Webex Connect

  1. Log in to Webex Connect.
  2. Navigate to Assets → Apps.
  3. Click Configure New AppEmail.
  4. Create Email Asset and Register to Webex CC

    Figure: Create Email Asset and Register to Webex CC

  5. Enter a friendly name and your support email address (from Step 1).
  6. In Webex Connect, choose OAuth 2.0 as the Authentication method.
  7. Fill the fields using the credentials JSON file:
    • Client ID, Client Secret
    • SMTP Server: smtp.gmail.com
    • SMTP Port: 587
    • SMTP Encryption: STARTTLS
    • Username: support email address
    • Authorization URL: https://accounts.google.com/o/oauth2/auth
    • Token URL: https://oauth2.googleapis.com/token
    • Refresh Token URL: https://oauth2.googleapis.com/token
    • Scope: https://mail.google.com/
    • Redirect URL from Step 2
  8. Click Generate Token.
  9. If you had checked the 'I would like to explicitly review before providing consent for authentication' checkbox, then you will need to log in using your Gmail account and provide consent for token generation.
  10. Generate Token for Email Asset

    Figure: Generate Token for Email Asset

  11. Once the token is generated, click Save.
  12. Main Configure Email App in Webex Connect

    Figure: Configure Email App in Webex Connect

  13. Click on Register To Webex CC and select the service you want to register this asset to. Click Register.
  14. Register Email Asset to Webex CC

    Figure: Register Email Asset to Webex CC

  15. Take note of the Forwarding Address shown on the page. We will use this later in Step 4.

Step 4: Verify Gmail Forwarding

To verify our email forwarding settings in Gmail, we will need to handle the verification email sent by Google and approve the forwarding address.

Google has changed how they send verification emails. To handle this, let us create a dummy workflow to handle emails and make use of the debug logs to verify the email forwarding.

  1. In Webex Connect, go to Services and open your service, example: My First Service.
  2. Click View My Flows and click on Create Flow.
  3. Enter a flow name such as Email_Dummy or anything you prefer. We will not be using the flow after verification.
  4. Click Create.
  5. Select Email from the channels list.
  6. In the Configure Email Event page, select Incoming Message as the Event and click on Save.
  7. Click and drag the green ball on the Configure Email Event node and select onBegin as the Node Event and 101 - Successfully completed flow [Success] as the Flow Result. Click on Save.
  8. Create a dummy email workflow

    Figure: Create a dummy email workflow for verification

  9. In Step 3, we had taken note of the forwarding address from Webex Connect.
  10. Copy the Forwarding Address.
  11. Go to Gmail → Settings → Forwarding and POP/IMAP → Add a forwarding address.
  12. Add forwarding address in Gmail

    Figure: Add forwarding address in Gmail

  13. Paste the forwarding address from Webex Connect and proceed with the verification steps initiated by Google. This step will send a verification email to the forwarding address.
  14. Go back to the dummy workflow and check the Debug Logs in the workflow.
  15. Open the transaction that was triggered for the verification email. Click Decrypt Logs and take note of the message body.
  16. You will need to use the verification URL in the message body and open it in your browser to complete verification. You may have to use an online tool to extract the URL or manually remove the extra characters in the URL before using it in your browser.

Step 5: Email Channel and Queue Creation

Create Email Channel (Entry Point) in Control Hub

  1. Login to Control Hub and navigate to Contact Center under Services section in the sidebar.
  2. Click on Channels under Customer Experience in the sidebar.
  3. Click on Create Channel.
  4. Input Name & Description as per your preference.
  5. Select Email in the Channel Type dropdown.
  6. Click on the dropdown button under Asset Name and select the Email Asset created in Step 3.
  7. Set Service Level Threshold to 2 hours.
  8. Select your preferred Time Zone.
  9. Click on Save.
  10. Email entry point and queue creation

    Figure: Email Entry Point and Queue Creation in Control Hub

Create Queues in Management Portal

  1. Navigate to Queues under Customer Experience section in the sidebar.
  2. Click on Create Queue.
  3. Input Name & Description as per your preference.
  4. Select Inbound Queue from the dropdown for Queue Type.
  5. Select Email from the dropdown for Channel Type.
  6. Leave the Queue Routing Type to Longest Available Agent.
  7. Click on Create Group under Email Distribution and select your Team.
  8. Set Service Level Threshold to 2 hours.
  9. Set Maximum Time in Queue to 3 hours.
  10. Select your preferred Time Zone.
  11. Click on Create.
  12. Queue creation in management portal

    Figure: Queue Creation in Management Portal

Step 6: Create/Upload Email Flow

  1. Download the email flow from the GitHub page .
  2. Navigate to Webex Connect Flows → v3.3 → Template → Media Specific → Workflows → EmailInboundFlow.workflow.zip, click and select the zip file and download.
  3. Unzip the downloaded file.
  4. Go to Webex Connect, click on Services and select the service in which the Asset was created in Step 3.
  5. In the service, click View My Flows and Create Flow.
  6. Input your preferred name for the flow under Flow Name and select Upload a flow from the Method dropdown.
  7. Select the EmailInboundFlow.workflow file and click on Create.
  8. Create or Upload Email Flow

    Figure: Create/Upload Email Flow in Webex Connect

  9. Open the Queue Task node and select the Queue Name as the one you created in Step 5. Click Save.
  10. Queue Task Node Configuration

    Figure: Queue Task Node Configuration

  11. Click Settings on the top-right corner and switch to the Custom Variables tab. In the bizemailid row, update the default value with your Gmail account's email address. Click Save.
  12. Custom Variables Configuration

    Figure: Custom Variables Configuration

  13. Go to the Resolve Conversation node and fill in the Flow Id field with the flowId value copied from the browser's address bar. Then click Save.
  14. Resolve Conversation Node Flow ID

    Figure: Resolve Conversation Node - Enter Flow ID

  15. Finally, click on Make Live on the top-right corner → select the Application/Asset that we have created and click Make Live.
  16. Make Email Flow Live

    Figure: Make Email Flow Live

Step 7: Test Email Channel

  1. Go to one of your email accounts and send an email to the support email address that was initially configured in the Email Asset.
  2. Go to the Agent Desktop and make the agent Available.
  3. Verification: Send an email and accept the task

    Figure: Verification - Send an Email and Accept the Task (Step 1)

  4. The email will be offered to the agent. Click Accept to handle the email. Click "Reply" or Reply All to the email and hit the send button.
  5. Add wrap-up and close the task.

Things to Note

  • Please note that you'd need to mandatorily configure an auto-forwarding rule to forward the emails received on the email address configured in the EMAIL ID field to the email address available in the FORWARDING ADDRESS field. Webex Connect won't receive the inbound emails unless this step is completed.
  • Email via SMTP has a 25MB size limitation on the inbound email attachments. Due to this limitation, if an inbound email fails, the customer gets a delivery failure email and is expected to resend the email with a smaller attachment.
  • In the case of Gmail, you must verify the email forwarding address by either confirming through the URL provided or entering the OTP sent to the provided address as applicable. You can retrieve the URL or OTP as applicable by decrypting the Debug Logs for the Email Asset or the Email Workflow in the Email Workflow configuration. It is found in the full email body of the logs. Earlier, the OTP was found in the subject of the email in the downloaded Export Logs.
  • If an inbound email contains inline images, they will be received as attachments on the agent's desktop. If PCI scan is enabled, the images will be blocked.
  • A Shared Mailbox is simply a mailbox that doesn't have login credentials of its own and requires a user's (who can access the shared mailbox, mainly 'Send As' access) credentials to generate tokens. The user need not have Admin access. In a typical enterprise setup, a user ([email protected]) can have access to multiple shared mailboxes such as [email protected], [email protected], etc. They can access these mailboxes using their own credentials ([email protected]). Also, while sending or replying to emails, they can choose to 'Send As' any of these email addresses.
  • Avoid deleting Email Assets after registration — they can't be restored.
  • Use Google OAuth Playground to experiment and get tokens manually if needed: OAuth Playground.

Configuration Complete

This completes the Gmail email channel configuration for Webex Contact Center. Always test your setup by sending and replying to emails to confirm that forwarding, token authentication, and queue routing are working as expected.