All integrations

Run agents with Google Drive

Connect Google Drive once, and every run that names it works in Google Drive on the account you connected.

Connect Google DriveOpens Settings → Connections in the console.

What an agent can do in Google Drive

Read files and Sheets, and edit the ones Rush creates.

Jobs on Rush that use Google Drive

Agents that use Google Drive

How Google Drive connects

Google Drive is a built-in app: you sign in with your Google account on its own page, through Rush's own app, so you register no OAuth app. The sign-in asks only for the scopes listed below, and the run's token reaches www.googleapis.com and sheets.googleapis.com, the Google Drive and Sheets REST APIs.

Connect it once in the console under Settings → Connections, or from your server with POST /me/connections. The sign-in finishes in a browser signed in to the console as the same person, and a link not finished within 10 minutes expires.

After that, a run that names google-drive in connections, or runs a saved agent that names it, gets it; your connections reach no run that does not name them.

Scopes the sign-in asks for:

  • https://www.googleapis.com/auth/userinfo.email
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/spreadsheets
POST https://api.phoenix.so/me/connections

{
  "type": "app",
  "name": "google-drive"
}

Whose Google Drive account the agent uses

Your Google Drive connection is personal: it belongs to the person who signed in. A run started in the console uses that person's Google Drive, and a run started with an API key uses the Google Drive of the member who created the key.

To act for your own app's users, make each user an agent from your template and show them, signed in to your app, the sign-in link POST /o/{org}/agents/{agent}/connections returns. They sign in to their own Google Drive, and that agent's runs use their account and nothing else: never yours, never another user's.

More Productivity integrations

Frequently asked questions

How do I connect Google Drive to Rush?

Open Settings → Connections in the console and connect Google Drive, or send POST /me/connections with {"type":"app","name":"google-drive"} and open the authorize_url it returns while signed in to the console. The connection reads pending until the sign-in finishes, then connected.

Does every run get my Google Drive account?

No. A run gets your Google Drive connection only when it names it in connections ("connections": ["google-drive"]), or runs a saved agent that names it. A saved agent names its connections once, and every run of it gets them.

What can an agent do in Google Drive?

Read files and Sheets, and edit the ones Rush creates. 4 published jobs use it; this page lists them.

Can my app's users connect their own Google Drive?

Yes. Make each user an agent from your template, and they sign in to their own Google Drive through the link POST /o/{org}/agents/{agent}/connections returns. That agent's runs use their account alone.

Keep reading