Source: factory.service/package.core/ObjServiceGoogle.py
Google Workspace API service for the Axion
platform.
Wraps Gmail, Sheets, Drive, and Calendar APIs
using OAuth2 service account credentials with
...
| Method | Signature | Description |
|---|---|---|
| send_email | send_email(to: str, subject: str, body_html: str, from_alias: str = '') -> dict |
Send an email via the Gmail API. |
| list_messages | list_messages(query: str = '', max_results: int = 10) -> list |
Search the inbox via Gmail API. |
| get_message | get_message(message_id: str) -> dict |
Retrieve full message detail by ID. |
| create_draft | create_draft(to: str, subject: str, body_html: str) -> dict |
Save an email as a draft. |
| create_spreadsheet | create_spreadsheet(title: str) -> dict |
Create a new Google Spreadsheet. |
| read_range | read_range(spreadsheet_id: str, range_notation: str) -> list |
Read cell values from a spreadsheet. |
| write_range | write_range(spreadsheet_id: str, range_notation: str, values: list) -> dict |
Write cell values to a spreadsheet. |
| append_rows | append_rows(spreadsheet_id: str, range_notation: str, rows: list) -> dict |
Append rows to the end of a sheet. |
| export_to_sheet | export_to_sheet(spreadsheet_id: str, table_name: str, sql: str) -> dict |
Query the Axion database and write the |
| list_files | list_files(folder_id: str = '', query: str = '') -> list |
List files in Drive, optionally |
| upload_file | upload_file(file_path: str, folder_id: str = '', mime_type: str = '') -> dict |
Upload a file to Google Drive. |
| create_folder | create_folder(name: str, parent_id: str = '') -> dict |
Create a folder in Google Drive. |
| share_file | share_file(file_id: str, email: str, role: str = 'reader') -> dict |
Share a Drive file with a user. |
| get_or_create_package_folder | get_or_create_package_folder(package: str) -> str |
Get or create a package-specific folder |
| create_event | create_event(summary: str, start: datetime, end: datetime, attendees: list | None = None, description: str = '') -> dict |
Create a calendar event. |
| list_events | list_events(days_ahead: int = 7) -> list |
List upcoming events within the given |
| create_reminder | create_reminder(summary: str, due_datetime: datetime, attendees: list | None = None) -> dict |
Create a 15-minute reminder event. |
| link_record | link_record(source_table: str, source_key: str, external_id: str, external_type: str = 'file') -> None |
Link a local DB record to a Google |
| get_external_id | get_external_id(source_table: str, source_key: str) -> str |
Look up Google external ID for a local |
| get_local_key | get_local_key(external_id: str) -> str |
Look up local record key for a Google |
| list_tasklists | list_tasklists() -> list |
List all task lists for the delegated |
| get_tasklist | get_tasklist(tasklist_id: str) -> dict |
Get a task list by ID. |
| create_tasklist | create_tasklist(title: str) -> dict |
Create a new task list. |
| list_tasks | list_tasks(tasklist_id: str = '@default', show_completed: bool = False) -> list |
List tasks in a task list. |
| get_task | get_task(task_id: str, tasklist_id: str = '@default') -> dict |
Get a single task by ID. |
| create_task | create_task(title: str, notes: str = '', due: str = '', tasklist_id: str = '@default') -> dict |
Create a task in a task list. |
| update_task | update_task(task_id: str, tasklist_id: str = '@default', **fields) -> dict |
Update task fields (title, notes, due, |
| complete_task | complete_task(task_id: str, tasklist_id: str = '@default') -> dict |
Mark a task as completed. |
| delete_task | delete_task(task_id: str, tasklist_id: str = '@default') -> None |
Delete a task. |
| Connect | Connect() |
Legacy Connect interface. |
| Send | Send() |
Legacy Send interface. |
Verify service account credentials.
List files in Google Drive.
Send a test email via Gmail API.
Create a new Google Spreadsheet.
List Google Task lists.
List tasks in a Google Task list.
Create a task in a Google Task list.