Google Sheets & Docs automation

Flowdrome’s Google nodes — Sheets, Docs, Drive, Gmail — authenticate with an OAuth2 credential you connect once in the vault. The nodes then reference ${credential.google-oauth2.accessToken}, and the Nucleus refreshes the token automatically. The fiddly part is Google’s side; here is the exact path.

1. Create the OAuth client (Google Cloud Console)

  1. In Google Cloud Console, create (or pick) a project.

  2. APIs & Services → Enabled APIs → Enable APIs and Services: enable each API you’ll use — Google Sheets API, Google Docs API, Google Drive API, Gmail API. A node call against a disabled API fails with a clear accessNotConfigured error naming the API.

  3. APIs & Services → OAuth consent screen: configure the consent screen (External is fine for personal use). Add yourself under Test usersonly listed test users can complete consent while the app is in Testing status.

  4. APIs & Services → Credentials → Create credentials → OAuth client ID, application type Web application. Add the authorized redirect URI:

    http://localhost:48170/api/oauth/callback

    If your Nucleus runs elsewhere, use its public URL instead — {FLOWDROME_NUCLEUS_PUBLIC_URL}/api/oauth/callback — and it must match exactly.

  5. Copy the Client ID and Client secret.

The 7-day caveat: while the consent screen is in Testing status, Google expires refresh tokens after 7 days — your credential will flip to an error state and need reconnecting weekly. For anything long-lived, publish the consent screen (move it to In production); refresh tokens then live until revoked.

2. Connect the credential

Admin → Credentials → New, template Google (OAuth2). Paste the client id + secret, save, click Connect. The Google consent tab opens; approve, and the tab closes with the credential showing connected (with token expiry). Scopes default to the Google nodes’ needs; override them on the credential if you need more or less.

The Google consent screen opened by Connect
The consent tab Connect opens — sign in, approve, and the credentials page flips the badge to Connected on its own. The whole flow, with screenshots of each step, is in the credentials guide.

The masked-secrets edit view, the status badge states, and the full Connect walkthrough live in the Credentials guide.

The Nucleus requests offline access with forced consent, so a refresh token is always issued — token refresh happens automatically whenever a run resolves the credential.

3. Append rows to a sheet

The shipped Google Sheets Append demo is two nodes — sample order data feeding a Google Sheets node. Configure the Sheets node from its properties panel:

  1. Pick the google-oauth2 credential in the picker — the token field becomes a vault reference.
  2. Operation append, Spreadsheet id from your sheet’s URL (the long path segment of docs.google.com/spreadsheets/d/<THIS>/edit), Range Orders!A:D.
  3. Values path orders — it points at a list on the input ({ "orders": [ { "id": 1, "customer": "Smith, John", "total": 149.95 }, … ] }), and each object’s values become one row. Alternatively type a literal 2-D array into the Values field.
  4. Keep USER_ENTERED so Sheets parses numbers and dates the way typing would; RAW stores exactly the strings you send.

The Sheets node reference shows the wired workflow and a real run’s input/output captures.

The Sheets node also reads (read), updates (update) and clears (clear) ranges — see the node reference. Docs (create/insert/replace text), Drive (upload/download/list/delete) and Gmail (send, with attachments from binary input) ride the same credential.

Troubleshooting

SymptomCause
redirect_uri_mismatch at consentThe redirect URI in Google doesn’t exactly match the Nucleus URL — scheme, host, port, path.
access_denied for a known userThe account isn’t in Test users while the app is in Testing.
accessNotConfigured on a node callThat specific API isn’t enabled in the Cloud project.
Credential turns to error:refresh_failed after a weekTesting-status refresh-token expiry — publish the consent screen.