Google Drive FAQs

If you have questions about the Google Drive integration, check out the Google Drive FAQs:

When does the sync run?

The sync runs when the drive detects a file.

What happens if a file doesn’t sync?

The file remains in the Google Drive folder.

How often should I check the Google Drive folder for unsynced files?

Once every one to two weeks, depending upon volume.

What should I do if a file I added to Google Drive isn’t syncing to BriteCore? 

Double-check to ensure the name of the file name matches that of the policy (see lib/vendors/google/drive_indexer.py).

  • PP1234.pdf (policy_number: PP1234, custom: null)
  • PP33344_14__CUSTOM999.doc (policy_number: PP33344, custom: CUSTOM999)

What file types can be synced?

You can sync the following file types:

  • .pdf
  • .docx
  • .xlsx
  • .jpg
  • .png

Note: Google documents won’t sync because it isn’t possible to download them without choosing an export format.

What are the current limitations of the integration?

  • Google Drive won’t send notifications informing you which file was added.
  • The client path resolution isn’t optimized.
  • The client path resolution could be improved to decrease the number of requests and lessen the time it takes to perform its tasks.

Why is the exception HttpAccessTokenRefreshError: invalid_grant: Invalid email or User ID launched when I try to perform an action related to run GoogleDrivePolicyIndexerFactory().create() or some other indexer-related action?

  • Check the vendor settings, especially the service account email.
  • Ensure the .p12 key you loaded into the vendor settings is still valid on Google Console, and if it is not, regenerate and reload it.
  • Ensure you have the required privileges if you used settings.auth.delegate_auth = True.

Where is the indexer output redirected to?

Check under log/google_drive_indexer.log and log/celery_worker_background.log.

What are the entry points for the indexer code?

The indexer is executed from the following:

  • Cron jobs (periodic provisioning and auto-clean)
  • Web requests (webhook)
  • A background worker (actual indexing)

Why won’t a file sync even after reconfiguring the indexer from scratch?

There is a control memory that gets filled for a given file when its indexing begins, so repeated notifications won’t cause duplication on the local database. This memory might not have had a chance to be cleaned due to the nature of the error. This is a common issue during development but should be less common in production.

You have three options:

  • Wait until the mark time to live expires (defaults to 30 minutes).
  • Wait until the memory is wiped (i.e. Redis is rebooted).
  • Remove the syncing marks manually using either indexer.control.flush_file_sync_grants() or indexer.control.free_file_sync_grant(file_id).

Why am I getting the error message “Sorry, you have exceeded your sharing quota.””>: Rate limit exceeded even though I’m not frequently running indexer.remote_setup()?

For some unknown reason, Google randomly sends back this throttling error during setup time. If you wait a few minutes before trying again, it should work normally.