Unify Logo Footer.svg
Unify Integrations
Logo
Google Sites

Google Sites

Logo

4 mins READ

Google Sites is Google's tool for building internal or public websites without code, with each site stored as a file in Google Drive. The UnifyApps Google Sites connector uses the Google Drive API to list your sites, get a site's details and sharing permissions, and export a site's content as plain text from workflows.

This guide covers every authentication type available on the connection form, and the actions supported, along with the Google Drive scope each one needs.

Authentication

Before you begin, you should have the following information:

  • Connection name: a descriptive name such as MyAppGoogleSitesIntegration, so the connection is easy to identify later.

  • Authentication type: select the type of authentication for connecting to your Google Sites account:

    1. Service Account

    2. OAUTH

There is no Scopes field on the form. The OAUTH type requests https://www.googleapis.com/auth/drive, and the Service Account type requests https://www.googleapis.com/auth/drive and https://www.googleapis.com/auth/drive.file. The connection can reach only the sites that the signed-in or impersonated user can open.

1. Service Account

Use this for Google Workspace domains, where a service account acts on behalf of a user in the domain through domain-wide delegation. No user has to sign in.

Step 1: Create a service account in Google Cloud

  1. In the Google Cloud Console, select or create a project, and enable the Google Drive API under APIs & Services → Library.

  2. Go to IAM & Admin → Service Accounts and click Create service account. Enter a name and click Done.

  3. Open the service account and copy its Email. Click Show advanced settings and, under Domain-wide delegation, copy the Client ID used in the next step.

  4. Go to the Keys tab → Add key → Create new key, choose JSON and click Create. The downloaded file holds the client_email and private_key. Store it securely.

Step 2: Give the service account domain-wide access

  1. A Google Workspace super administrator opens the Admin console → Security → Access and data control → API controls.

  2. Click Manage Domain Wide Delegation → Add new.

  3. Enter the service account's client ID, add the scopes https://www.googleapis.com/auth/drive and https://www.googleapis.com/auth/drive.file, separated by commas, and click Authorize. See Control API access with domain-wide delegation for details.

Note: the connection acts as the user you enter in User email, so that user must belong to the Workspace domain where domain-wide delegation was granted. Both scopes must be authorized, because the connection requests them together. Google says changes can take up to 24 hours to apply.

Step 3: Create the connection in UnifyApps

  1. Open Connections → New Connection → Google Sites and enter a Connection name.

  2. Select Service Account as the Authentication type.

  3. Enter the Service account email (the client_email from the JSON key file).

  4. Paste the Private key (the private_key from the JSON key file).

  5. Enter the User email of the Workspace user the service account acts as.

  6. Click Test Connection to validate the credentials, then click Create.

2. OAUTH

Use this when you want to connect with your own Google account and do not need to create a Google Cloud app.

  1. Enter a Connection name.

  2. Select OAUTH as the Authentication type.

  3. Click Authorize. You are redirected to the Google sign-in page.

  4. Sign in with the Google account whose sites the connection should use.

  5. Review the permissions on the consent screen, for example See, edit, create, and delete all of your Google Drive files, and click Allow.

  6. You are redirected back to UnifyApps with a confirmation that the account is connected.

Actions

Scopes are shown in short form: drive.readonly means https://www.googleapis.com/auth/drive.readonly. The connection always requests drive, which covers every action.

Actions

Description

Scopes Required

Export site

Exports a site from Google Sites as plain text.

drive.readonly (or drive)

Get site details

Gets the details of a site from Google Sites.

drive.metadata.readonly (or drive)

List site permissions

Lists the permissions for a site in Google Sites.

drive.metadata.readonly (or drive)

List sites

Lists the sites in Google Sites.

drive.metadata.readonly (or drive)