To set up a delegate access to the mailbox for the Email Robot through the Google Workspace, complete the following steps:

  1. Configure Service Connection as mentioned in the Email settings: Gmail Configuration for Google Workspace Service Connection page
  2. Create a Service Account in the Google Cloud Console
    1. Go to the Google Cloud Console.
    2. Navigate to IAM & AdminService AccountsCreate Service Account.
    3. Assign a name and description.
    4. Grant roles (optional; for Gmail API, basic access is enough).
    5. Enable G Suite Domain-wide Delegation:
    6. Check Enable G Suite Domain-wide Delegation.
    7. Download the JSON key file.
  3. Create and Download JSON Key:
    1. In the service account details, go to the "Keys" tab
    2. Click Add Key Create new key
    3. Select JSON as the key type
    4. Click Create
      The JSON key file will download automatically
      Keep this file secure, as it provides full access to your service account
  4. Configure Domain-Wide Delegation
    1. Go to Google Workspace Admin Console → Security → API Controls → Domain-wide Delegation.
    2. Click Add new:
  5. Store JSON Key as System Environment Variable
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your-service-account-key.json"
  6. Proceed with the E-Mail Robot configuration in the Service Desk.