easy integration of google workspace/cli #119

Open
opened 2026-03-15 08:58:30 +00:00 by thabeta · 2 comments
Owner

https://github.com/googleworkspace/cli

we need libraries that can help to import your data from google (at least extract them)

https://github.com/googleworkspace/cli we need libraries that can help to import your data from google (at least extract them)
salmaelsoly added this to the ACTIVE project 2026-03-15 09:01:50 +00:00
Member

after investigation:

  • google workspace/ cli is not designed to have public module or to package used, so our approach it to wrap this cli, however to be able to able to get authenticated u should have OAUTH_TOKEN or credentials file so u should follow these steps google workspace authentication to be able to get authenticated
  • there is other approach which can be manually done using google takeout
### after investigation: - google workspace/ cli is not designed to have public module or to package used, so our approach it to wrap this cli, however to be able to able to get authenticated u should have OAUTH_TOKEN or credentials file so u should follow these steps [google workspace authentication ](https://github.com/googleworkspace/cli?tab=readme-ov-file#manual-oauth-setup-google-cloud-console) to be able to get authenticated - there is other approach which can be manually done using [google takeout](https://takeout.google.com/)
Member

Work completed. Here are the APIs added in crates/clients/src/google/:

Gmail

  • gmail_triage(builder) — quick summary of unread messages with optional query/label filters
  • gmail_list_messages(params) — list messages with pagination
  • gmail_get_message(message_id) — retrieve a single message
  • gmail_list_labels() — list all Gmail labels
  • gmail_download_message(msg_id, path, format) — download message as raw .eml, full JSON, or metadata
  • gmail_download_attachment(msg_id, attachment_id, path) — download a specific attachment
  • gmail_export_messages(query, output_dir) — bulk export with auto-pagination and concurrent downloads

Drive

  • drive_list_files(builder) — list files with query filters, pagination, and sorting
  • drive_get_file_metadata(file_id) — get file metadata without downloading content
  • drive_download_file(file_id, path) — download a binary file
  • drive_export(file_id, mime_type, path) — export Google Docs/Sheets/Slides to PDF, CSV, PNG, etc.
  • drive_export_all(output_dir, query) — bulk export with smart format conversion and concurrent downloads

Calendar

  • calendar_agenda(builder) — quick agenda view (today, tomorrow, week, or N days)
  • calendar_list_events(calendar_id, params) — list events with pagination
  • calendar_get_event(calendar_id, event_id) — get a single event
  • calendar_export_events(calendar_id, path) — bulk export all events to JSON

Contacts

  • contacts_get(resource_name) — get a single contact
  • contacts_search(query) — search contacts
  • contacts_list(page_size, page_token) — list all contacts with pagination
  • contacts_list_groups() — list contact groups
  • contacts_export(path) — bulk export all contacts to JSON

All APIs are read-only and include Rhai scripting bindings.

Work completed. Here are the APIs added in `crates/clients/src/google/`: **Gmail** - `gmail_triage(builder)` — quick summary of unread messages with optional query/label filters - `gmail_list_messages(params)` — list messages with pagination - `gmail_get_message(message_id)` — retrieve a single message - `gmail_list_labels()` — list all Gmail labels - `gmail_download_message(msg_id, path, format)` — download message as raw .eml, full JSON, or metadata - `gmail_download_attachment(msg_id, attachment_id, path)` — download a specific attachment - `gmail_export_messages(query, output_dir)` — bulk export with auto-pagination and concurrent downloads **Drive** - `drive_list_files(builder)` — list files with query filters, pagination, and sorting - `drive_get_file_metadata(file_id)` — get file metadata without downloading content - `drive_download_file(file_id, path)` — download a binary file - `drive_export(file_id, mime_type, path)` — export Google Docs/Sheets/Slides to PDF, CSV, PNG, etc. - `drive_export_all(output_dir, query)` — bulk export with smart format conversion and concurrent downloads **Calendar** - `calendar_agenda(builder)` — quick agenda view (today, tomorrow, week, or N days) - `calendar_list_events(calendar_id, params)` — list events with pagination - `calendar_get_event(calendar_id, event_id)` — get a single event - `calendar_export_events(calendar_id, path)` — bulk export all events to JSON **Contacts** - `contacts_get(resource_name)` — get a single contact - `contacts_search(query)` — search contacts - `contacts_list(page_size, page_token)` — list all contacts with pagination - `contacts_list_groups()` — list contact groups - `contacts_export(path)` — bulk export all contacts to JSON All APIs are read-only and include Rhai scripting bindings.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_lib#119
No description provided.