1. Navigate to Google Cloud Console2. Sign in with your organization’s Google account3. Click the project dropdown in the top navigation bar4. Either select an existing project or click New Project5. If creating a new project:– Enter a project name (e.g., “Horizon Email Integration”)– Select your organization if applicable– Click Create
1. In the Google Cloud Console, go to APIs & Services > Library2. Search for “Gmail API”3. Click on Gmail API in the results4. Click Enable
1. Go to APIs & Services > OAuth consent screen2. Select the user type:– Internal: If all users are within your Google Workspace organization (recommended)– External: If the app needs to be accessible outside your organization3. Click Create4. Fill in the required fields:– App name: Enter your application name (e.g., “Horizon”)– User support email: Select an appropriate email address– Developer contact information: Enter your email address5. Click Save and Continue6. On the Scopes page, click Add or Remove Scopes7. Find and select https://mail.google.com/ (full Gmail access)8. Click Update, then Save and Continue9. Complete the remaining steps and click Back to Dashboard
1. Go to APIs & Services > Credentials2. Click Create Credentials > OAuth client ID3. Select Web application as the application type4. Enter a name (e.g., “Horizon OAuth Client”)5. Under Authorized redirect URIs, click Add URI6. Enter your redirect URI in the following format:
Replace https://horizon.portside.co/ with your actual Horizon URL (in case of multi tenant).
7. Click Create8. A dialog will display your Client ID and Client Secret9. Copy both values and store them securely. You will need these in the next section.
1. Log in to Horizon with an administrator account2. Navigate to System Configuration > Gmail Configuration
Step 2: Enter OAuth Credentials1. In the Client ID field, paste the Client ID from Google Cloud Console2. In the Client Secret field, paste the Client Secret from Google Cloud Console3. Click Save Gmail Configuration
Step 3: Authorize the Gmail Account1. Click Authorize Gmail2. You will be redirected to Google’s sign-in page3. Sign in with the shared mailbox account you want to use for sending emails4. Review the permissions requested and click Allow5. You will be redirected back to Horizon6. A success message will confirm the authorization7. The Sender Email Address will be automatically populated with the authorized account’s email
Step 4: Test the Connection1. Click Test Connection2. A successful test will confirm:– Connection to Gmail is working– Required permissions are granted– The FMSApp label has been created in Gmail
1. The Gmail Configuration page shows a green “Gmail account authorized” message2. The authorized date is displayed3. The sender email address matches your shared mailbox4. The Test Connection button returns a success message
To disconnect the Gmail integration:1. Navigate to System Configuration > Gmail Configuration2. Click Disconnect3. The authorization tokens will be removed4. You can re-authorize at any time by following the authorization steps again
Re-authorization may be required if: - The refresh token expires (rare, but possible after extended periods of inactivity) - You revoke access from Google Account settings - The OAuth credentials are regenerated in Google Cloud ConsoleTo re-authorize, click Authorize Gmail and complete the sign-in process again.
|
Issue |
Possible Cause |
Solution |
|
“Invalid authorization request” |
Redirect URI mismatch |
Verify the redirect URI in Google Cloud Console matches your Horizon URL exactly |
|
“OAuth authorization denied” |
User declined permissions |
Click Authorize Gmail again and accept all requested permissions |
|
“Gmail configuration not found” |
Configuration not saved |
Save the Gmail Configuration before clicking Authorize |
|
“Permission denied” error |
Insufficient API scopes |
Ensure the Gmail API scope is added in OAuth consent screen |
|
Test Connection fails |
Token expired or revoked |
Click Disconnect, then re-authorize the Gmail account |
|
Emails not sending |
Account not fully authorized |
Verify authorization status shows green and test connection succeeds |
The redirect URI must match exactly, including: - Protocol (https:// vs http://) - Domain name - Path (/gmail-callback) - No trailing slashExample of correct format: https://app.yourcompany.com/gmail-callback
If you receive API-related errors, verify that the Gmail API is enabled in your Google Cloud project under APIs & Services > Enabled APIs & Services.
• Store OAuth credentials securely; do not share them publicly• Use a dedicated shared mailbox rather than a personal account• Regularly review authorized applications in Google Account settings• Consider restricting OAuth consent to internal users if using Google Workspace• The integration requests full Gmail access to support both sending and reading email conversations