Google Drive
Kompass can browse and download files from Google Drive using the built-in file server integration. A File Server record is created through a guided setup wizard in the Kompass Admin. The wizard handles the Google OAuth authorization, so no manual token copying is required. This is a one-off setup task for a Kompass Admin with access to the Admin site.
Prerequisites
- Your Kompass user must have access to the Kompass Admin site (
/admin/). - Your Kompass user must have permissions on the Files models (File server). If the Files section does not appear in the Kompass Admin sidebar, contact Kompass support to have the permissions added to your group.
- You must have a Google account with access to the Google Drive you want to connect.
Step 1: Start the config helper
- In the Kompass Admin, go to Files → File servers.
- Click Config Helper (top-right, next to “Add File server”).
- Under Backend, select Google Drive from the Tested Providers group.
- Enter a File Server Name: something descriptive like “Company Google Drive”.
- Click Continue to Authorization.
Step 2: Authorize with Google
- You will be redirected to Google’s sign-in page. Sign in with the Google account that has access to the target Drive.
- Google will ask you to grant Kompass read-only access to your Drive files. Review the permissions and click Allow.
- Google redirects you back to Kompass automatically.
If the redirect fails, the most common cause is signing in with the wrong Google account. Start the config helper again and re-authorize.
Step 3: Select a drive
- After authorization, you will see a drive selection page showing My Drive.
- Select My Drive and click Create File Server.
Kompass creates the File Server record and redirects you back to the admin. The new File Server is created disabled: open it, complete the Categories and Identifier template fields, then tick Enable and save. Only one File Server can be enabled per organization, so enabling this one disables any other enabled server for the organization.
Step 4: Configure directory mappings
The File Server needs to know where your project and proposal folders live on Google Drive. Open the newly created File Server record and set the Categories field. This is a JSON configuration that maps Kompass categories to Drive folder paths. The Identifier template field controls the value compared with what the regex captures; it defaults to {{ project.reference }}, so set it to {{ project.id }} if your folder names use the numeric project ID.
A typical configuration looks like this:
{
"projects": [
{"path": "Projects/", "depth": 1, "regex": "^(\\d+).*$"}
],
"quotes": [
{"path": "Quotes/", "depth": 1, "regex": "^(\\d+).*$"}
],
"general": [{"path": "General/"}]
}
Adjust the values to match your folder structure:
- path: the folder path on Google Drive (a trailing slash is added if it is missing).
- regex: a pattern to extract the project or proposal number from folder names. The example above matches folders that start with a number (e.g. “12345 - Office Refurbishment”). The regex must have exactly one capturing group.
- depth: how many levels of subfolders to search. Use
1to search one level deep (children and grandchildren). Use0for immediate children only. Projects and quotes default to1when depth is omitted; general defaults to immediate children only.
The general category does not need a regex: it shows a simple folder listing.
Step 5: Test the connection
- From the File Servers list, tick the File Server you just created.
- In the Action dropdown, select Test connection and click Go.
- A success message will show the first items found in the root of the connected Drive, confirming that the connection is working.
Re-authentication
If the Google Drive connection stops working (for example, if the token expires or access is revoked from the Google side), you can re-authorize without creating a new File Server:
- From the File Servers list, tick the File Server.
- In the Action dropdown, select Re-authenticate and click Go.
- Follow the Google sign-in flow again. The existing File Server record is updated with a fresh token.