fix(google): validate Workspace integrations, return dropped fields and expose missing params

Merged
WA
2d ago
+5473-923

Summary

  • Gmail: read, search, get thread, get draft and the Gmail trigger now return cc, bcc, replyTo, rfcMessageId, inReplyTo, references, snippet and internalDate. Before, Cc was dropped from every read path.
    • Search gains pageToken, nextPageToken and resultSizeEstimate, and its message fetches now run in bounded batches.
    • Send, draft and edit-draft gain an optional replyTo, which is header-sanitized.
    • The V2 block exposes the 11 registered but unreachable tools: labels, drafts and threads, including gmail_list_labels_v2.
    • An empty folder no longer reports an unexpected-format error.
    • Get thread and get draft bodies now come from nested and HTML-only parts.
  • Calendar: event tools return hangoutLink, conferenceData, reminders, recurrence, visibility, transparency, iCalUID, created/updated, attachments and more.
    • Create and update gain visibility, show-as, color, reminders and optional attendees. List gains updatedMin and timeZone, and V2 returns nextSyncToken.
    • The trigger payload adds the same fields.
  • Meet: participants return the signed-in user, and spaces return the moderation and artifact config.
  • Drive:
    • Get Content reads are now byte-capped and abortable. They previously used unbounded .text().
    • List and search gain orderBy, driveId and incompleteSearch.
    • Share requests Permission fields and gains expirationTime and allowFileDiscovery.
  • Docs:
    • Read now includes person, rich-link and date chip text, nested tables, and every tab (includeTabsContent, tabs).
    • Read also gains suggestionsViewMode and revisionId.
    • Write, insert and replace gain tabId, and replace gains searchByRegex.
  • Forms: responses, and the trigger for newly copied scripts, return respondentEmail and totalScore.
  • Sheets:
    • Read and Batch Read gain value and date render options.
    • Write, update, append and batch update return updatedData, which was previously requested but dropped.
    • Append honors Value Input Option.
    • Delete spreadsheet now works on shared drives.
  • Slides: read returns per-slide text and speaker notes, plus revisionId and locale. Get Page returns the missing Page fields.
  • Contacts: the person-field mask and output gain birthdays, events, relations, nicknames, structured address parts, department and more. Create and update gain birthday.
  • Tasks: tasks return hidden, links and assignmentInfo. List gains showAssigned, and the block exposes the existing hidden and completed filters plus parent and previous.
  • Groups:
    • Settings now sends alt=json; the API defaults to Atom.
    • Settings uses the correct default_sender field.
    • Update Settings had no inputs and always sent an empty patch. The block now has its settings inputs, and the block's settings output is populated.
    • List groups gains userKey, orderBy and sortOrder, and list members gains includeDerivedMembership.
  • Vault: list matters gains view and state. Export and saved query gain shared-drive inclusion (sent as sharedDrivesOption), exportFormat and dataScope; UNPROCESSED_DATA is limited to Mail and Groups.
  • All services: path IDs go through safeUrlPathSegment.
  • Backwards compatibility:
    • No param, subBlock id, operation value, tool id or output was removed or renamed, and no default changed. The one retype is the Gmail V2 labels output, from string to json, so it can hold the List Labels array. The trigger's comma-separated value still fits.
    • Every new param is optional and unset by default, and every new output is optional.
    • Behaviour changes for the same input, all fixes:
      • Docs Read content now includes chip and nested-table text.
      • Gmail Get Draft and Get Thread bodies are filled from nested and HTML-only parts.
      • Gmail Read on an empty folder returns "No messages found".
      • Drive Get Content errors past the 100 MB download and 10 MB export caps instead of buffering unbounded.
      • Invalid path ids (empty, ./.., or containing /) now fail before the request.

Type of Change

  • Bug fix
  • New feature (additive params and outputs)

Testing

  • New regression tests, each red on the pre-fix code:
    • Gmail Cc on single and multi-message reads
    • Gmail Reply-To emitted and sanitized through send, draft and edit-draft
    • Drive Get Content size caps
  • vitest over blocks/blocks.test.ts, tools/gmail, tools/google_sheets, tools/google_calendar, tools/google_drive/get_content.test.ts, blocks/blocks/google_drive.test.ts, lib/internal/gmail, lib/internal/google-vault and lib/webhooks/polling/google-calendar.test.ts: 110 passed
  • check-block-registry.ts origin/staging, check:tool-metadata, check:docs, check:integration-catalog and biome on the changed files pass. Type-check and check:audits run in CI.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)