Google Drive
Kompass can browse and download files from Google Drive using the built-in rclone integration. A File Server record is created through a guided setup wizard in the Django Admin. The wizard handles the Google OAuth authorisation — no manual token copying is required. This is a one-off setup task for a Kompass Admin with Django Admin access.
Prerequisites
- Your Kompass user must have access to the Django Admin site (
/admin/). - Your Kompass user must have permissions on the Files models (File server). If the Files section does not appear in the Django 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 Django Admin, go to Files → File servers.
- Click Rclone 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 — Authorise 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-authorise.
Step 3 — Select a drive
- After authorisation, you will see a drive selection page showing My Drive.
- Select My Drive and click Create File Server.
Kompass will create the File Server record and redirect you back to the admin. The new File Server will be enabled automatically. If another File Server was previously enabled for this organisation, it will be disabled — only one File Server can be active at a time.
Step 4 — Configure directory mappings
The File Server needs to know where your project and quote 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.
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 (must end with a trailing slash).
- regex — a pattern to extract the project or quote 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). Use0or omit for 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-authorise without creating a new File Server:
- Open the File Server record in the Django Admin.
- Click Re-authenticate (top-right).
- Follow the Google sign-in flow again. The existing File Server record will be updated with a fresh token.