Configure an incoming email account for Gmail

If you use Google Gmail for your incoming e-mail, you can create a new incoming e-mail account in WHD and link this account to your Gmail account.

This configuration requires a unique client ID and secret password that you generate in the Google Developers Console and enter into the incoming mail account screen. After you complete and test the configuration, WHD can access the Gmail account using Open Authentication (OAuth) 2.0, retrieve the incoming email, and generate a new ticket using the data in the email.

To configure an incoming email account:

  1. Set up a new project in the Google Developers Console.
  2. Create a new WHD incoming email account.
  3. Generate the client ID and client secret credentials.
  4. Enter the Gmail login credentials into the incoming mail account.
  5. Test the email connection.
  6. Verify that WHD creates an email ticket.

Set up a new project in the Google Developers Console

  1. Locate the email address of the Gmail account you will use for your incoming email account.
  2. Log in to the Google Developers website at:

    console.developers.google.com

  3. Log in using your Gmail credentials.
  4. If you agree to the Terms of Service, select the checkbox and then click Agree and Continue.
  5. Configure the OAuth consent.
    1. Click the OAuth Consent tab, and then click Create Project.
    2. Add a name for your project, and then click Create.
    3. For the user type, select Internal or External based on your project needs.

      Internal is only available to G Suite users, while External can be selected by any user.
    4. Click Create.
    5. Add the project details (such as app name, e-mail, and so on).
    6. Click Save and Continue.

Create a new WHD incoming mail account

  1. Locate the Gmail address you will use for your incoming mail account.

    You can create a new Gmail account at gmail.com.
  2. Open a new window in your web browser.
  3. Log in to Web Help Desk as an administrator.

  4. Click Setup > General > Options.
  5. In the Force HTTPS field, select Always and then click Save.

  6. Click Setup > E-mail > Incoming Mail Accounts.
  7. Click New.
  8. Select the Enable E-mail Tickets checkbox.

  9. In the Default row, click Make Default.

  10. In the E-Mail Address field, enter your Gmail email address.

  11. In the Authentication Mode field, select QAuth.

    Two new fields display:

    • Client ID
    • Client Secret

    These fields will store the credentials you obtain from the Gmail Developers Console.

Generate the client ID and client secret credentials

  1. Return to the Google Developers Console.
  2. Click Create Credentials and select OAuth client ID.
  3. Click the Application type drop-down menu and select Web application.
  4. In the Name field, enter the name of the OAuth 2.0 client. For example:

    WHD

  5. Click ADD URI.
  6. Enter the URI that connects your Gmail account to WHD using the following format:

    https://localhost:8443/helpdesk/oauth-google-redirect

    where:

    • localhost is the IP address or hostname of your WHD server
    • 8443 is the secure HTTPS port to your WHD server
  7. Press Return and then click Create.

    The OAuth client created window displays with the client ID and client secret.

Enter the Gmail login credentials into the incoming mail account

  1. Return to the Google Developers Console.
  2. Locate the OAuth client created window.
  3. In the Your Client ID field, click the Copy icon in the right corner of the field to capture the client ID credentials.
  4. Return to the new WHD incoming email account page.
  5. Paste the credentials into the Client ID field.

  6. Return to the OAuth client created window.
  7. In the Your Client Secret field, click the Copy icon in the right corner of the field to capture the client secret credentials.
  8. Return to the new WHD incoming email account page.
  9. Paste the credentials into the Client Secret field.

  10. Click Authorize.

    You are redirected to the Google Authentication page. This page indicates that the app is not verified by Google.

  11. Click Advanced, and then click Go To WebHelpDesk.
  12. In the Grant WebHelpDesk permission pop-up screen, click Allow.
  13. In the Confirm your choices screen, click Allow.

    The new incoming mail account page displays. In the Client Secret field, Authorized displays with a green indicator.

  14. Click the Request Type drop-down menu, select Email/Outlook, and then click Save.

    The new incoming email account is linked with your Gmail account.

    Your Gmail email address displays in the top right corner of the screen.

Test the email connection

  1. Open Microsoft Outlook and create a new email message.
  2. In the To field, enter your Gmail email address.
  3. In the Subject field, enter:

    Google OAuth Test e-mail

  4. Click Send.
  5. Return to the Google APIs and Services screen.
  6. In the top right corner of the screen, click the Google Apps icon and select Gmail.
  7. Verify that you received the Test email.
  8. Sign out of your Gmail account.

Verify that WHD creates an email ticket

  1. Return to the WHD incoming mail account screen.
  2. In the toolbar, click Tickets.

  3. Click the Search Tickets tab.

  4. In the Basic Search tab, click Search.

  5. Locate and click the ticket that includes Test in the Request Detail field.

  6. Verify that the ticket details section contains the correct information.