1. Support & information
  2. Integrations & Automations

🔌️ Quick start: connect Harbour webhooks to Google Drive

Send completed agreements to a destination Google Drive folder (via Harbour Webhooks and Google AppScript)

Note: you must be a Harbour organization-wide ⭐️ Super Admin for this action to work (Settings > Users)

Step 1: 📁️ Create App Script for automating Google Drive

  1. In Google, create a new Apps Script project (technical reference)
  2. Add the sample code to receive webhooks and add completed agreements to Drive:
    doPost(e){ ... }
  3. Deploy as a webapp:
    1. Deploy > New deployment > Select type > Web app
    2. Set these values:  Description: "V1", Execute as self, Give access to anyone
    3. Hit "Deploy" button and copy the resulting destination URL, it will look like this: https://script.google.com/macros/s/<DEPLOYMENT ID>/exec

Step 2: ⚡ Send Harbour webhooks to App Script/Google Drive

  1. In Harbour, go to Automations > Webhooks
  2. Click "Create new webhook"
  3. Set the destination URL to your webapp url from above (https://script.google.com/macros/s/<DEPLOYMENT ID>/exec)
  4. Unselect all triggers except "Completed agreement" (*we will just need this one for our use)

Step 3: ✨️ Glory!

That is it: complete an agreement and watch it now appear in Google Drive 😃️ And of course you can further modify the script as desired.


(Optional) Alternative approaches

Google Drive API
While Apps Script is easy to get set up and get going here, you could alternatively create your own web service for catching the webhook and then creating a file in Drive (via the Google Drive API).

Harbour API

You also create your own new web service that polls our API and then delivers new agreements into the desired destination.