Chrome extension and Google Workspace add-on

Gmail integration

5 min readUpdated August 2026

Most of a practice's work arrives by email. The Gmail integration turns a message into an Xedul task linked to the right client and case, with attachments imported, without leaving the inbox.

Two routes

Xedul offers two distinct Gmail integrations. They aren't alternatives to deliberate over for long: the choice follows how the practice uses Gmail.

Chrome extensionWorkspace add-on
Where it livesIn the browser, inside the Gmail pageIn the Gmail side panel
InstallationPer browserDistributed across the Workspace domain
SuitsPeople working in Gmail on the web from a fixed machinePractices on Google Workspace wanting central distribution
Attachment accessWhatever Gmail exposes in the pageThrough the Gmail API, more complete

If the practice runs Google Workspace, the add-on is generally the better choice: it's distributed once for everyone and imports attachments more reliably.

Chrome extension

Installation

  1. Open Chrome and go to chrome://extensions.
  2. Enable Developer mode, top right.
  3. Choose Load unpacked and select the Xedul extension folder.
  4. Click the extension icon and check the Xedul URL: https://xedul.com for production, or a local address during development.
  5. Enter your Xedul email and password and confirm sign-in.

The session is saved in the browser and refreshed automatically where possible: you don't sign in on every use.

Using it

  1. Open Gmail on the web and open the message you want to work.
  2. Click the Xedul button that appears in the page.
  3. Xedul opens the tasks page with a pre-filled draft built from the message.
  4. Check the fields, link client and case, set priority and due date.
  5. Save.

What gets imported

  • The message subject
  • The sender
  • The date
  • The visible body of the message
  • Attachments, when Gmail exposes them as downloadable in the page

In the Chrome extension, attachment import is best effort: if Gmail doesn't expose a downloadable URL inside the page, the attachment is skipped. The rest of the message imports normally. For more reliable import, use the Workspace add-on.

How the session is handled

The Xedul token is stored in the extension's local storage together with the refresh token, separately from the application's cookies. The script running inside the Gmail page neither reads nor stores tokens: authentication and API calls are handled by the extension's service worker.

Google Workspace add-on

The add-on shows Xedul in the Gmail side panel as a Google Workspace add-on, independently of the Chrome extension.

What it does

  • Authenticates the user against Xedul with email and password.
  • Stores access and refresh tokens in the script's user properties.
  • Refreshes the Xedul session silently.
  • Reads the selected Gmail message.
  • Saves a temporary draft server-side, avoiding excessively long URLs.
  • Opens Xedul on the tasks page, reusing the same window the Chrome extension uses.
  • Shows the task form beside the message preview.
  • Imports attachments after Xedul has opened.

Deferred attachment import

The add-on initially saves only the message metadata, the preview and an authorisation block used server-side only, which is never returned to the browser.

When the Xedul window opens, the backend uses that authorisation to read the attachments from Gmail, uploads them into document storage, and updates the draft with references to the imported files. The authorisation is then removed.

This design has two practical consequences: the panel opens immediately, without waiting for attachments to load, and the Gmail token never passes through the browser.

Installation and testing

  1. Create an Apps Script project.
  2. Copy the add-on manifest and code into the project.
  3. Configure the OAuth consent screen in Google Cloud for the scopes the manifest requires.
  4. Deploy as a test Google Workspace add-on.
  5. Open Gmail, install the add-on and sign in to Xedul from the side panel.

Changing OAuth scopes requires a fresh authorisation from the test user. It isn't a step you can skip.

The Xedul address during testing

Apps Script cannot call localhost. To test the add-on against a local instance you need to expose the application over a public HTTPS tunnel and use that origin.

The Xedul address is resolved in this order:

  1. The script property XEDUL_BASE_URL.
  2. The address saved in the test user's sign-in session.
  3. The default value in the add-on code.

To change it:

  1. Open the Apps Script project.
  2. Go to Project SettingsScript Properties.
  3. Add or update XEDUL_BASE_URL with the public HTTPS origin, without a trailing slash.
  4. Save.
  5. In Gmail, reload the add-on or reopen the side panel.

If the user already signed in against a different address, sign out and back in after the change: the sign-in flow stores the resolved address.

The complete flow

  1. The message arrives in the practice's inbox.
  2. Xedul opens from the extension or the side panel, already signed in.
  3. The draft is pre-filled: subject, sender, body and attachments.
  4. You complete the context: client, case, assignee, priority, due date.
  5. You save, and the task is created already linked in the right place.

The task is created only when the user confirms. The draft stays a draft until you decide: nothing enters Xedul without an explicit action.

Troubleshooting

SymptomLikely causeWhat to do
The Xedul button doesn't appear in GmailExtension inactive, or the page loaded before installationCheck the extension in `chrome://extensions` and reload Gmail
Sign-in is requested every timeSession can't be refreshedSign out and back in from the extension; check the configured Xedul URL
Attachments don't arriveChrome extension, attachments not exposed by the pageUse the Workspace add-on
The add-on can't reach Xedul`localhost` address, or an expired tunnelSet `XEDUL_BASE_URL` to a valid public HTTPS origin
Authorisation error after an updateOAuth scopes changedRe-authorise the add-on with the test user
The draft opens emptyNo message selected when the panel openedOpen the message and reopen the panel
Gmail integration — Xedul