<!-- https://unlockos.io/manual/google-drive-integration -->

# Google Drive Integration Help

## Overview

This integration stores images received through forms (guest register passport and ID document photos, for example) in **your facility's Google Drive**.

- Once connected, newly received images are stored in your facility's Google Drive and are not kept in UnlockOS
- You can still view the images in the admin (reservation details, form responses). UnlockOS reads them from Drive and shows them; staff do not need their own Google accounts
- **Adding a new image field, or turning one on, requires this integration** (see "Image fields and Google Drive" in [Form Management](forms.md))

> This integration is available to facilities that show a **Google Drive** card under External Integrations.

---

## How to Access

Connection Settings → **External Integrations** → click the **Google Drive** card

You can also open it from the "Connect Google Drive" button or the "Stored in UnlockOS" badge in the form editor. In that case you are taken back to the form editor once the connection is done.

---

## States

| State | Meaning |
|-------|---------|
| **Not connected** | Not connected yet. Images are stored in UnlockOS |
| **Connected** | Newly received images are stored in your facility's Google Drive |
| **Reauthorization required** | UnlockOS's access was revoked on the Google account side (password change, permission removed, blocked by a Workspace administrator, etc.). Connect again |

---

## Connecting

Only facility **owners (and above)** can connect or disconnect. Other staff see "Please ask your facility owner".

1. Click **"Connect Google Drive"**
2. On Google's screen, choose the Google account to store images in
3. Allow access with the "Google Drive" permission left checked
4. You return to UnlockOS automatically and the status shows "✓ Connected"

### Permission requested

UnlockOS asks only for **drive.file**. It can read and write only the files UnlockOS created, and cannot see any other files in your Drive.

- If you uncheck "Google Drive" before allowing, the connection does not complete ("Google Drive access was not granted")
- If more than Google Drive is granted, UnlockOS does not connect either. Start again and allow only the Google Drive permission

### Where images go

Images are stored in the **"UnlockOS フォーム画像"** (UnlockOS form images) folder in Drive, split by year and month. No sharing links are created for the folder or the files.

### Which account to use

**We recommend connecting with your company's Google Workspace account and storing images in a shared drive.** If you connect with a personal Gmail account, or the account of someone who is leaving, the photos cannot be handed over when the person in charge changes.

- If you reconnect with another account, earlier photos stay in the previous account's Drive and new photos go to the new account
- When the person in charge changes, do not disconnect — connect again with the new account

---

## Images that could not reach Drive (temporary storage)

When images cannot be sent to Google Drive (reauthorization required, Google temporarily not responding, etc.), guest check-in does not stop. Images received in the meantime are **encrypted and kept temporarily** by UnlockOS.

- This page shows how many images are being kept temporarily
- Temporarily kept images are not deleted after a deadline (copies of the guest register are subject to retention requirements)
- While reauthorization is needed, the form list also shows a notice that cannot be closed. Please reauthorize soon

---

## Disconnecting

"Disconnect" deletes the authorization UnlockOS holds for this facility's Google Drive (including earlier accounts).

- **Files in Drive are not deleted.** However, images stored in Drive can no longer be viewed from UnlockOS after disconnecting (they can still be viewed in Drive)
- Temporarily kept images stay encrypted in UnlockOS after disconnecting, but are not moved to Drive until you connect again
- To also remove the permission on the Google account side, remove UnlockOS under "Third-party apps & services" in your Google account (if the same account is connected to Google Calendar, that connection is cut too)

---

## How this relates to form image fields

| | Connected | Not connected / reauthorization required |
|---|---|---|
| Add a new image field | Yes | No (connect from "Connect Google Drive") |
| Turn on a disabled photo field | Yes | No |
| Image fields that are already enabled | Stored in Drive | Keep working (stored in UnlockOS, shown as "Stored in UnlockOS") |

When a form uses an image field and Google Drive is not connected, the form list shows a notice. "Later" hides it on that device for 30 days. The notice shown while reauthorization is needed cannot be closed.

---

## Frequently Asked Questions

### Q: If I do not connect, will the photo fields of the default stay form stop working?

A: No. Image fields that are already enabled keep receiving photos and storing them in UnlockOS without a connection. The connection is needed only to add a new image field or to turn one on.

### Q: Staff cannot press "Connect Google Drive"

A: Facility owners (and above) connect and disconnect. Please ask your owner.

### Q: I came back to the form editor after connecting, but the field name I was typing is gone

A: If the field name is very long it cannot be carried along, so you return to the same page with the inputs empty. Please enter it again.

---

## Related Pages

- [External Integrations](external-integrations.md)
- [Form Management (image fields and Google Drive)](forms.md)
- [Google Calendar Integration](google-calendar-integration.md)
