Overview

Google Drive offers cloud-based storage for your policy and claim files, which can be automatically retrieved, uploaded, and stored in BriteCore.


Getting Started

Introduction

  1. Setup a generic google account for your company
  2. If you do not have a developer on staff, contact IWS to complete account setup
  3. See lib/vendors/google/README.md for full instructions

Enable Drive Access

  1. Start here
  2. Under Select a project, click Create a project
  3. In the list of Google Apps APIs, click Drive API
  4. Click Enable
  5. Click Credentials in the left-hand navigation bar
  6. Under Create credentials select Service account key
  7. Under Service account select New service account
  8. Name the account and setup an ID of your choosing. For example, BriteCore deliverable forwarding
  9. Notate the Service account ID
  10. For Key type select P12
  11. Save the key to your computer and record the password

Enable Drive Event Generation

  1. Click Credentials
  2. Click Domain verification
  3. Click Add domain
  4. Enter your BriteCore URL (e.g., mutual.britecorepro.com)
  5. Click Add domain
  6. In the Verify ownership popup, click Take me there. If the popup does not generate, go here
    • Popup generated
      • Login to your google account
      • Click Add a property
      • Again, enter your BriteCore URL
      • Click Continue
      • Click the Alternate methods tab
    • Popup did not generate
      • Enter your BriteCore URL
      • Click Add a property
      • Select HTML tag
  7. Copy the content
  8. Paste the data from the content section only into the below update statement and run the statement against your database (IWS assistance may be required)
    UPDATE settings  
    SET value = 'YIwP_Sz_gLkj6UTjWw-JABpaqz4gMHe5KNdT73DsFOk'  
    WHERE option = 'domain-verification-code'
  9. Click Verify. You should receive feedback that the site was verified
  10. Double-check that your domain has been verified
  11. Navigate to the developer console
  12. Click Credentials
  13. Click the Domain verification tab
    • If your BriteCore site domain (e.g., mutual.britecorepro.com) does not appear, click Add domain
    • Enter your BriteCore URL
    • Click Add domain

BriteCore Setup

Presently the setup should be completed using the Ordinary mode activation rather than the Privileged mode activation, the latter of which would require domain changes by IWS. Skip lines 69-92 of the aforementioned README.md file.

Ordinary Mode Activation

  1. Open terminal for the client site
  2. Open ipython PYTHONPATH=/srv/www/britecore/lib ipython
    • If you receive ImportError: No module named vendors.google then you did not run ipython in /lib
  3. Locate your p12 key from the above steps. Identify the path of the p12 key. You can use CyberDuck to move the file to a specific folder on the site
  4. Run the commands from lines 102-112. If you run each command individually, run settings.save() after each line
    • For the settings.auth.service_account command on line 105, replace the provided account with your service account
    • For the settings.auth.key_data command on line 106, replace the provided path with your p12 key path
    • For the settings.feature.webhooks_mountpoint command on line 108, replace the provided path with the client's BriteCore URL
    • If you receive IOError: [Errno 2] No such file or directory, then you have the incorrect path to the p12 key

Run the Provisioning Sequence

Continuing to use ipython, run the commands from lines 123-126. If you run each command individually, run settings.save() after each line.

  • If you receive HttpAccessTokenRefreshError: invalid_client: The OAuth client was not found when running indexer = GoogleDrivePolicyIndexerFactory().create() then there is an issue with credentials. Ensure the credentials and paths are correct. You may need to delete and generate a new service account key
  • If you receive GoogleDrivePolicyIndexerError: failed to share file with user account:... when running indexer.remote_setup(), this appears to be an intermittent, erroneous error. Wait a few minutes then rerun the command

BriteCore Processing

  1. Add files to Google Drive according to the accepted file structure
    • The files will pull into the correct policy or claim within an External Documents folder
  2. Remove any non-indexed files

FAQs

When does the sync run?
The sync runs when the drive detects a file.

What happens if a file does not sync?
The file remains in the Google Drive folder.

How often should I check the Google Drive folder for unsynced files?
Once every 1-2 weeks, depending upon volume.

I added a file to Google Drive, but it is not being synced to BriteCore. What could be wrong?

  • Double check the name of the file name matches that of the policy. See also 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?
Common file types should sync, including PDF, DOCX, XLSX, JPG, and PNG. Google documents, ironically, will not sync because it is not possible to download them blindly without choosing an arbitrary export format.

What are the current limitations of the integration?

  • Google Drive won't send notifications informing which file was added to it
  • The client path resolution is not optimized and could be improved to decrease the number of requests made and consequently the time it takes to perform its work

More Information

  • Integration
  • See lib/vendors/google/README.md for complete developer instructions

Feedback

Report unclear or missing documentation.