Connect Google Drive
Last updated
Connecting Google Drive lets your Modules find a file, read what is in it, and save new notes or summaries as a Google Doc. Everything runs through an app you create in your own Google Cloud account, so your credentials stay yours.
What your Modules can do
- Search your Drive by file name or by the words inside a file.
- Read a Google Doc, a Google Slides deck (as text), a Google Sheet (the first
tab) or a plain-text file such as
.txt,.md,.csvor.json. - Save a new Google Doc, for example meeting notes or a summary. Raileon holds each new Doc for your approval first.
Your Modules cannot edit, move, share or delete a file you already have. They cannot read PDFs, Word files or images, and very long files are cut short.
Before you start
You need access to the Google Cloud Console and the Google account whose Drive you want your Modules to use.
Reading your whole Drive uses a permission Google calls restricted
(drive.readonly). That matters for how you set up the app:
- Google Workspace (recommended). Choose Internal on the consent screen. An Internal app is only for people in your own organization, so Google asks for no verification or security review, and sign-in does not expire.
- A personal Google account. Internal is not available, so you must choose External. While the app is in Testing, Google asks you to sign in again about every 7 days. Publishing it for everyone requires Google's verification and security review, which is meant for apps with many outside users. For your own use, stay in Testing and add yourself as a test user.
If you want, you can reuse the same Google Cloud project you made for Gmail or Google Calendar. Create a separate OAuth client for Drive.
Connect Google Drive
Open Apps
In your dashboard, go to Apps in the left sidebar and select Connect on the Google Drive card.
Enable the Google Drive API
In Google Cloud, go to APIs & Services → Library, search for Google Drive API, and select Enable.
Set up the consent screen
Go to APIs & Services → OAuth consent screen and choose Internal (Workspace) or External (personal account, then add your Google address under Test users). Fill in an app name and your email.
Add the two permissions
On the consent screen's Data Access page, add
https://www.googleapis.com/auth/drive.readonlyandhttps://www.googleapis.com/auth/drive.file, then save. The first lets your Modules search and read. The second lets them create a new Doc.Create the OAuth client
Go to APIs & Services → Credentials, select Create credentials → OAuth client ID, and choose Web application. Copy the redirect URI Raileon shows into Authorized redirect URIs, then create the client.
Paste the client ID and secret
Copy the Client ID and Client secret into Raileon and select Save & connect. They are stored encrypted and used only to connect your account.
Approve in Google
Choose your Google account. On the screen that lists the permissions, leave every box ticked. If you untick one, Raileon tells you what is missing and you can connect again. Then the card shows Connected.
Good to know
- Raileon can read every file your Google account can see, including shared drives. It cannot be limited to one folder.
- A new Doc is saved in My Drive. You can ask a Module to save it in a folder, but Google only allows that for folders Raileon is already allowed to write to. If Google refuses, the Module is told and can save it in My Drive.
- Because a new Doc waits for your approval, you see its title and text, and the folder, before it is created.
Disconnect Google Drive
Open Apps, find the Google Drive card, and select Disconnect. Raileon also revokes its access with Google. You can check or remove it any time under your Google account's Security → Third-party apps with account access.