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:
Service Account
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
In the Google Cloud Console, select or create a project, and enable the Google Drive API under APIs & Services → Library.
Go to IAM & Admin → Service Accounts and click Create service account. Enter a name and click Done.
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.
Go to the Keys tab → Add key → Create new key, choose JSON and click Create. The downloaded file holds the
client_emailandprivate_key. Store it securely.
Step 2: Give the service account domain-wide access
A Google Workspace super administrator opens the Admin console → Security → Access and data control → API controls.
Click Manage Domain Wide Delegation → Add new.
Enter the service account's client ID, add the scopes
https://www.googleapis.com/auth/driveandhttps://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
Open Connections → New Connection → Google Sites and enter a Connection name.
Select Service Account as the Authentication type.
Enter the Service account email (the
client_emailfrom the JSON key file).Paste the Private key (the
private_keyfrom the JSON key file).Enter the User email of the Workspace user the service account acts as.
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.
Enter a Connection name.
Select OAUTH as the Authentication type.
Click Authorize. You are redirected to the Google sign-in page.
Sign in with the Google account whose sites the connection should use.
Review the permissions on the consent screen, for example See, edit, create, and delete all of your Google Drive files, and click Allow.
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 |
|---|---|---|
| Exports a site from Google Sites as plain text. | drive.readonly (or drive) |
| Gets the details of a site from Google Sites. | drive.metadata.readonly (or drive) |
| Lists the permissions for a site in Google Sites. | drive.metadata.readonly (or drive) |
| Lists the sites in Google Sites. | drive.metadata.readonly (or drive) |