The Google Workspace connector tools in Optimizely Opal let you read and interact with your Google Docs, Sheets, Slides, and Calendar data directly from Opal Chat, agents, and workflows. This article explains how administrators install and configure the tools in Optimizely Connect Platform (OCP), and how users authenticate to start using them.
Add the Google Workspace Tool for Opal in OCP
Install the Google Workspace Tool for Opal in OCP
In the OCP App Directory, complete the following:
-
Click Google Workspace Tool for Opal.
-
Click Install App.
Configure the Google Workspace settings
After installing the Google Workspace app, you must configure it in OCP.
Google Workspace settings
This section is to manage your own OAuth provider and is not common. See Instance level Opal OAuth for instructions.
Tool configuration
- Expand the Tool Configuration section.
- Toggle individual Google Workspace services on or off.
-
Click Save.
- Expand the corresponding permissions sections and toggle individual tools on or off for the services you toggled on. See the Google Workspace connector tools section for a list of tools that each permission enables.
-
Click Save for each section.
Add to Opal
- Expand the Add to Opal section.
-
Click Add to Opal to register the Google Workspace tools in the corresponding Opal instance.
Authenticate with Google Workspace
After an administrator adds the Google Workspace Tool for Opal in OCP, log in from Opal to access your information. The Google Workspace connector tools use user-level authorization. Each user can only access data they are permitted to view in Google.
To authenticate, complete the following steps in Opal:
- Go to Tools > Connectors.
-
Click Connect for the Google Workspace tools.
- Log in to Google.
After you connect to Google, the Google Workspace connector tools become available in Opal Chat, agents, and workflows.
Google Workspace connector tools
After an administrator adds the Google Workspace Tool in OCP and you log in to Google, the following tools are available in Opal.
Expand a tool to see when to use it, required and optional parameters, and example prompts. If you do not provide a required parameter, Opal prompts you for it.
Google Calendar
The Google Calendar tools let you create, retrieve, update, and delete calendar events directly from Opal. Use them to schedule meetings, manage your calendar, and coordinate availability without leaving your current workflow.
Read
google_calendar_get_event – Retrieves a specific event from a Google Calendar.
-
When to use
- Read complete details and descriptions of a specific event.
- View the attendee list, emails, and their RSVP response statuses.
- Check event configurations like visibility, status, or time zone information.
-
Parameters
-
eventId– Unique event identifier. Opaque string between 5-1024 characters, obtained from event creation or list operations. - (Optional)
calendarId– Calendar identifier.
-
-
Example prompts
- Get the details for the "Monthly Review" meeting.
- Who has accepted the invite for my 10 AM event?
- Retrieve the event details for event ID xyz789abc.
google_calendar_list_calendars – Lists all calendars on the user's calendar list.
-
When to use
- Find all available calendars a user has access to (for example, shared or primary).
- Obtain calendar IDs needed to perform operations on specific calendars.
- Check calendar access permissions and roles.
-
Parameters
- (Optional)
maxResults– Maximum number of calendars to return per page. Default: 50. - (Optional)
pageToken– Token for retrieving the next page of results. Use thenextPageTokenfrom the previous response.
- (Optional)
-
Example prompts
- List all the calendars I have access to.
- What is the calendar ID for my "Marketing Team" shared calendar?
- Show me the first 10 calendars in my Google account.
google_calendar_list_events – Lists events from a specified Google Calendar.
-
When to use
- Retrieve a list of upcoming events for the day or week.
- Search for specific meetings across all calendars using keywords.
- Find events within a specific date and time range.
- Identify open time slots for scheduling.
-
Parameters
- (Optional)
calendarId– Calendar identifier. - (Optional)
maxResults– Maximum number of events to return per page. Default: 10. - (Optional)
pageToken– Token for retrieving the next page of results. Use thenextPageTokenfrom the previous response. - (Optional)
q– Free text search query. Searches event summary, description, location, attendee names and emails. Case-insensitive. - (Optional)
searchAllCalendars– Search events across all user calendars (primary, subscribed, shared, and so on). Whenfalseor omitted, only the specified calendar (orprimary) is searched. SetsearchAllCalendarstotrueto find events regardless of which calendar is specified. - (Optional)
timeMax– Upper bound (exclusive) for event start time in RFC3339 format. Example: "2023-12-31T23:59:59-05:00" - (Optional)
timeMin– Lower bound (inclusive) for event start time in RFC3339 format. Example: "2023-12-01T00:00:00-05:00"
- (Optional)
-
Example prompts
- What is on my calendar for today?
- List my events for next week between Monday and Wednesday.
- Search all my calendars for any meetings mentioning "Budget".
- Show me my next 5 upcoming meetings.
Write
google_calendar_create_event – Creates a new event in a Google Calendar.
-
When to use
- Schedule new meetings, appointments, or events.
- Create all-day or multi-day out-of-office entries.
- Create an event and immediately add attendees to send invitations.
- Create recurring events with specific recurrence rules.
-
Parameters
-
startDateTime– Event start date and time. For timed events: RFC3339 format like "2023-12-15T14:00:00-05:00" or "2023-12-15T19:00:00Z". For all-day events: Date-only format like "2026-02-26" (YYYY-MM-DD, no time component). -
endDateTime– Event end date and time. For all-day events: Date-only format. End date is exclusive. For a three-day event from the 26th through the 28th, usestart="2026-02-26", end="2026-03-01". -
summary– Event title or name. Displays as the main event heading in calendar views. Can contain HTML. - (Optional)
attendees– Valid email addresses of invitees as a comma-separated string, JSON array string, or single email. Examples: "user@example.com" or "user1@example.com,user2@example.com" or ["user1@example.com","user2@example.com"] - (Optional)
calendarId– Calendar identifier. - (Optional)
colorId– Color ID for the event (1-11). Sets the color of the event in calendar views. -
(Optional)
conferenceData– Conference data for video meetings (for example, Google Meet). Example:{ "createRequest": { "requestId": "unique-id-123", "conferenceSolutionKey": { "type": "hangoutsMeet" } } } - (Optional)
description– Event description or details. Can contain HTML formatting for rich text, links, and styling. - (Optional)
eventType– Specifies special event categories. Event type:default,outOfOffice,focusTime, orworkingLocation. - (Optional)
guestsCanInviteOthers– Whether attendees other than the organizer can invite others to the event. Default:true. - (Optional)
guestsCanModify– Whether attendees other than the organizer can modify the event. Default:false. - (Optional)
guestsCanSeeOtherGuests– Whether attendees other than the organizer can see who the event's attendees are. Default:true. - (Optional)
location– Geographic location as free-form text. Can be address, room name, or virtual meeting link. - (Optional)
recurrence–RRULE,EXRULE,RDATE, andEXDATElines for recurring events as a comma-separated string or JSON array string. Examples: "RRULE:FREQ=WEEKLY;COUNT=10" or ["RRULE:FREQ=WEEKLY;COUNT=10","EXDATE:20240101T120000Z"] -
(Optional)
reminders– Reminder settings withuseDefault(boolean) and optional overrides array. IfuseDefaultistrue, calendar default reminders apply. IfuseDefaultisfalse, specify custom reminders in overrides array. Example:{ "useDefault": false, "overrides": [ { "method": "email", "minutes": 60 }, { "method": "popup", "minutes": 10 } ] }-
Valid methods –
email,popup, andsms. - Minutes range – 0–40320 (four weeks).
-
Valid methods –
- (Optional)
status– Indicates the event state. Event status:confirmed,tentative, orcancelled. - (Optional)
timeZone– Internet Assigned Numbers Authority (IANA) Time Zone Database name (for example, "America/New_York" or "Europe/London"). Applied to both start and end times. - (Optional)
visibility– Controls who can see event details. Event visibility:default,public,private, orconfidential.
-
-
Example prompts
- Create a project kickoff meeting tomorrow from 10 AM to 11 AM called "Q3 Planning".
- Schedule an all-day out-of-office event for next Friday.
- Create a sync with marketing@example.com on Monday at 3 PM for 30 minutes.
- Draft a weekly recurring meeting starting next Tuesday at 9 AM called "Team Sync".
google_calendar_delete_event – Deletes an event from a Google Calendar.
-
When to use
- Cancel existing events or appointments.
- Remove outdated, canceled, or duplicate calendar entries.
- Delete specific instances of a recurring event series.
-
Parameters
-
eventId– Unique event identifier to delete. Opaque string between 5-1024 characters, obtained from event creation or list operations. - (Optional)
calendarId– Calendar identifier.
-
-
Example prompts
- Cancel my 4 PM meeting today.
- Delete the team sync event from my calendar.
- Remove the event with ID abc123def456 from my calendar.
google_calendar_update_event – Updates an existing event in a Google Calendar.
-
When to use
- Reschedule an event to a new date or time.
- Add or remove attendees from an existing meeting.
- Update the description, location, or title of an existing calendar event.
- Convert an all-day event to a timed event (or vice versa).
-
Parameters
-
eventId– Unique event identifier. Opaque string between 5-1024 characters, generated by Google Calendar API. - (Optional)
attendees– Valid email addresses of invitees as a comma-separated string, JSON array string, or single email. Examples: "user@example.com" or "user1@example.com,user2@example.com" or ["user1@example.com","user2@example.com"] - (Optional)
calendarId– Calendar identifier. - (Optional)
description– Event description or details. Can contain HTML formatting for rich text, links, and basic styling. - (Optional)
endDateTime– Event end time. Must be afterstartDateTime. For timed events: RFC3339 format. For all-day events: Date-only format (end date is EXCLUSIVE). Must match startDateTime format (both all-day or both timed). - (Optional)
location– Geographic location as free-form text. Can be address, room name, or virtual meeting link. - (Optional)
sendUpdates– Notification policy:all(notify all attendees),externalOnly(external attendees only), ornone(no notifications). - (Optional)
startDateTime– Event start time. For timed events: RFC3339 format like "2023-12-15T14:00:00-05:00" or "2023-12-15T19:00:00Z". For all-day events: Date-only format like "2026-03-04" (YYYY-MM-DD). Can convert between formats (all-day to timed or vice versa). - (Optional)
status– Event status:confirmed(default and final),tentative(provisional),cancelled(deleted but visible in incremental sync). - (Optional)
summary– Event title and name. Can contain HTML formatting. This is the main event heading shown in calendar views. - (Optional)
timeZone– IANA Time Zone Database name (for example, "America/New_York", "Europe/London", "Asia/Tokyo"). Applied to start and end times. - (Optional)
visibility– Event visibility:default(calendar default),public(visible to all),private(attendees only), orconfidential(legacy private).
-
-
Example prompts
- Move my 3 PM meeting today to 4 PM instead.
- Add emily@example.com to the "Q3 Review" event tomorrow.
- Rename the "Sync" meeting to "Weekly Project Sync".
- Update the location of my 10 AM meeting to "Conference Room B".
Google Docs
The Google Docs tools let you create, read, edit, and format documents directly from Opal. Use them to insert and style content, manage tables, find and replace text, and work with images without leaving your current workflow.
Read
google_docs_find_document_by_name – Search for Google Docs documents by name. Supports both exact and fuzzy matching.
-
When to use
- Locate the internal ID of a Google Doc using its human-readable title.
- Fuzzy search your Google Drive to find documents related to a certain topic or keyword.
- Get the shareable view link and metadata for a specific document file.
-
Parameters
-
name– The name or partial name of the document to search for - (Optional)
exactMatch– Whether to match the exact name (case-sensitive) or use fuzzy matching. Default isfalsefor fuzzy matching. - (Optional)
maxResults– Maximum number of documents to return. Default is 10.
-
-
Example prompts
- Find the Google Doc named "2024 Strategy Review".
- Search for any documents matching the title "Invoice Template".
- Look up exactly the document titled "Q3 Analytics Report" and return its ID.
google_docs_get_document – Get a Google Docs document by its ID. Returns the full document structure.
-
When to use
- Fetch the entire structural JSON tree of a document for deep analysis.
- Find the exact insertion indices (like paragraph start indices) before editing text or modifying table cells.
- Retrieve metadata like titles, headers, and footers from a specific document.
-
Parameters
-
documentId– The ID of the document to retrieve - (Optional)
includeTabsContent– Whether to populate the Document.tabs field instead of the text content fields - (Optional)
suggestionsViewMode– The suggestions view mode to apply to the document (DEFAULT_FOR_CURRENT_ACCESS, SUGGESTIONS_INLINE, PREVIEW_SUGGESTIONS_ACCEPTED, PREVIEW_WITHOUT_SUGGESTIONS)
-
-
Example prompts
- Retrieve the complete structure of document abc123 so I can see its contents.
- Get the Google Doc with ID xyz456 to find paragraph index locations.
- Fetch document info including tabs content for document def789.
google_docs_list_documents – Get a list of Google Docs documents from your Google Drive. Supports pagination and sorting options.
-
When to use
- View recently modified Google Docs in your Drive.
- Fetch the IDs and metadata for a batch of documents all at once.
- Look up a paginated list of shared or trashed files.
-
Parameters
- (Optional)
includeShared– Whether to include documents shared with you (not just owned by you). Default is true. - (Optional)
includeTrashed– Whether to include trashed/deleted documents in results. Default is false. - (Optional)
maxResults– Maximum number of documents to return (1-100). Default is 20. - (Optional)
orderBy– How to order the results. Options: name, createdTime, modifiedTime, recency. Default is modifiedTime. - (Optional)
pageToken– Token for pagination to get the next page of results
- (Optional)
-
Example prompts
- List my last 10 modified Google Docs.
- Show me all documents shared with me, sorted by name.
- Fetch the next page of documents in my Google Drive.
Write
google_docs_create_document – Create a new Google Docs document with the specified title.
-
When to use
- Create a brand new Google Docs document from scratch.
- Start a new document to begin taking notes or drafting content.
- Generate a new working document to share with a team.
-
Parameters
-
title– The title of the new document.
-
-
Example prompts
- Create a new Google Doc named "Project Alpha Requirements".
- Start a new document titled "Q4 Meeting Agenda".
- Make a blank document called "Draft Proposal".
google_docs_delete_content_range – Delete content from the specified range in the document.
-
When to use
- Remove a specific paragraph or section of text from a document.
- Delete content between known start and end coordinates.
- Erase unwanted data programmatically from an existing template.
-
Parameters
-
documentId– The ID of the document to update -
range– The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a 400 bad request error is returned. The range of content to affect (object with segmentId, startIndex, endIndex, tabId properties). Object structure: {"segmentId": string, "startIndex": number, "endIndex": number, "tabId": string} *segmentId* - The ID of the header, footer or footnote the range is in. An empty segment ID signifies the document's body. *startIndex* - REQUIRED. The zero-based start index of this range, in UTF-16 code units. In all current uses, a start index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. *endIndex* - REQUIRED. The zero-based end index of this range, exclusive, in UTF-16 code units. In all current uses, an end index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. *tabId* - The tab that contains this range. When omitted, the request applies to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "startIndex": 1, "endIndex": 10, "tabId": "tab1"}'
-
-
Example prompts
- Delete the text from index 15 to 35 in my document.
- Remove the content range from document xyz123 between indices 100 and 150.
- Clear the text spanning from character 0 to 50 in document abc456.
google_docs_insert_text – Insert text at the specified location in the document.
-
When to use
- Inject new text or paragraph content at a precise location.
- Populate table cells sequentially using their parsed paragraph start instructions.
- Add a new sentence to the end of a specific section in the document structure.
-
Parameters
-
documentId– The ID of the document to update -
text– The text to insert - (Optional)
endOfSegmentLocation– Insert at the end of a segment (object with segmentId, tabId properties). Object structure: {"segmentId": string, "tabId": string}. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "tabId": "tab1"}' - (Optional)
location– The specific location in the document (object with segmentId, index, tabId properties). CRITICAL: DO NOT use index 0. Determine paragraph start indices from google_docs_get_document first. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "index": 1, "tabId": "tab1"}'
-
-
Example prompts
- Insert the text "Overview of Strategy" at index 50 in document xyz123.
- Append the sentence "Conclusion reached." at the end of the document segment.
- Write "Q4 Revenue" into the targeted cell's paragraph index for doc abc456.
google_docs_replace_all_text – Replace all instances of specified text in the document.
-
When to use
- Perform a massive find-and-replace command like renaming a project title.
- Alter placeholder bracket variables systematically (for example, replace {{Name}} with John).
- Clean up a document by swapping outdated terms with fresh equivalents entirely.
-
Parameters
-
containsText– Finds text in the document matching this substring. A criteria that matches a specific string of text in the document. JSON representation: {"text": string, "matchCase": boolean,"searchByRegex": boolean}. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"text": "search term", "matchCase": false, "searchByRegex": false}' -
documentId– The ID of the document to update -
replaceText– The text that will replace the matched text - (Optional)
tabsCriteria– Optional. The criteria used to specify which tab(s) the range deletion should occur in. Object structure: {"tabIds": string[]}. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"tabIds": ["tab1", "tab2"]}'
-
-
Example prompts
- Find and replace all instances of "Acme Corp" with "Initech" in document xyz123.
- Search for the regex string for dates and replace them globally with "TBD".
- Change every case-insensitive mention of "Project Red" to "Project Blue".
Advanced
google_docs_create_paragraph_bullets – Create bullets for paragraphs in the specified range.
-
When to use
- Convert standard paragraphs into a bulleted list.
- Format a range of text into an ordered or unordered list.
- Apply specific bullet numbering schemas to selected text.
-
Parameters
-
bulletPreset– The bullet glyph preset (for example,BULLET_DISC_CIRCLE_SQUAREorNUMBERED_DECIMAL_ALPHA_ROMAN). -
documentId– The ID of the document to update. -
range– The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a400 bad requesterror is returned.
-
-
Example prompts
- Add bullet points to the text in document xyz123 between index 50 and 100.
- Convert the paragraphs from index 10 to 30 into a numbered list in document abc456.
- Apply the BULLET_DISC_CIRCLE_SQUARE format to the chosen range in my project doc.
google_docs_delete_paragraph_bullets – Delete bullets from paragraphs in the specified range.
-
When to use
- Remove list formatting from a specific set of paragraphs.
- Convert a bulleted or numbered list back into plain text paragraphs.
- Clear list styling from copied and pasted content without deleting the text.
-
Parameters
-
documentId– The ID of the document to update. -
range– The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a400 bad requesterror is returned.
-
google_docs_delete_positioned_object – Delete a positioned object from the document.
-
When to use
- Remove a floating image or positioned graphic from a document.
- Delete an incorrectly placed diagram or chart overlay.
- Programmatically clear positional layout objects for document cleanup.
-
Parameters
-
documentId– The ID of the document to update. -
objectId– The ID of the positioned object to delete. - (Optional)
tabId– The tab containing the object to delete.
-
-
Example prompts
- Delete the positioned object with ID "obj-234" from my document.
- Remove the floating image "image1" from document xyz123.
- Clear the positioned object located on tab "tab1" with ID "headerLogo".
google_docs_delete_table_column – Delete a column from a table.
-
When to use
- Remove an unnecessary column from an existing table.
- Adjust a table's structure after data has been deleted or consolidated.
- Programmatically slim down a table format in a shared document.
-
Parameters
-
documentId– The ID of the document to update. -
tableCellLocation– The table cell location reference (JSON string withtableStartLocation,rowIndex, andcolumnIndex). This parameter must be provided as a JSON string. Example: '{"tableStartLocation": {"index": 1}, "rowIndex": 0, "columnIndex": 0}'.
-
-
Example prompts
- Delete the second column from the table starting at index 15 in document xyz123.
- Remove the table column at column index 2 in my pricing table.
- Delete column 0 from the referenced table in the report document.
google_docs_delete_table_row – Delete a row from a table.
-
When to use
- Remove a specific row of data from a Google Docs table.
- Delete an outdated entry or empty row within a structured grid.
- Shorten table height by deleting trailing rows.
-
Parameters
-
documentId– The ID of the document to update -
tableCellLocation– The table cell location reference (object withtableStartLocation,rowIndex, andcolumnIndex).
-
-
Example prompts
- Delete the first row from the table starting at index 15 in document xyz123.
- Remove row 3 from the specified table in my shared document.
- Delete the top table row located at rowIndex 0 on the project report page.
google_docs_find_and_update_text_style – Find all occurrences of specific text and update their style.
-
When to use
- Mass update the formatting of a specific word or phrase throughout a document.
- Turn all instances of a brand name to bold text.
- Highlight or color-code specific key terms within notes.
-
Parameters
-
documentId– The ID of the document to update -
fields– Comma-separated list of fields to update (for example,bold,foregroundColor). This must match the properties you set intextStyle. Examples:-
For bold only –
bold. -
For bold and red –
bold,foregroundColor. -
For italic and underline –
italic,underline. -
For font size –
fontSize.
-
For bold only –
-
findText– The exact text to search for and update -
textStyle– The text style to apply to all found occurrences (JSON string). This parameter must be provided as a JSON string. Example for bold red text:{ "bold": true, "foregroundColor": { "color": { "rgbColor": { "red": 1.0, "green": 0.0, "blue": 0.0 } } } }- Common styles:
-
Bold –
{"bold": true} -
Italic –
{"italic": true} -
Underline –
{"underline": true} - Red text –
{ "foregroundColor": { "color": { "rgbColor": { "red": 1.0, "green": 0.0, "blue": 0.0 } } } }-
Font size 14pt –
{"fontSize": {"magnitude": 14, "unit": "PT"}}
-
Bold –
- (Optional)
matchCase– Whether the search should be case-sensitive (default:false)
-
-
Example prompts
- Find all instances of the word "TODO" and make them bold and red in document abc123.
- Make the phrase "Important Note" italicized everywhere it appears in the text.
- Change the font size of "Google Docs" to 14pt throughout my proposal document.
google_docs_insert_inline_image – Insert an inline image at the specified location.
-
When to use
- Add a logo or graphic into the flow of text in a document.
- Attach an image directly to the end of a section automatically.
- Insert a diagram into a report using a known image URI.
-
Parameters
-
documentId– The ID of the document to update -
uri– The URI of the image to insert - (Optional)
endOfSegmentLocation– Insert at the end of a segment (object with segmentId, tabId properties). Object structure: {"segmentId": string, "tabId": string} *segmentId* - The ID of the header, footer or footnote. An empty segment ID signifies the document's body. *tabId* - The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. (Union field: provide either location OR endOfSegmentLocation, not both) IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "tabId": "tab1"}' - (Optional)
location– The specific location in the document (object with segmentId, index, tabId properties) IMPORTANT: Text must be inserted inside the bounds of an existing Paragraph. For instance, text cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). The text must be inserted in the preceding paragraph. CRITICAL: If you want to insert at the beginning of the document, DO NOT use index 0. Instead: 1. First call the 'google_docs_get_document' tool to retrieve the document structure 2. Find the first paragraph element in the document body 3. Use that paragraph's startIndex as your insertion point. Object structure: {"segmentId": string, "index": number, "tabId": string} *segmentId* - The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body. *index* - REQUIRED. The zero-based index, in UTF-16 code units. The index is relative to the beginning of the segment specified by segmentId. WARNING: Index 0 is typically invalid for insertion - use document retrieval to find valid positions. *tabId* - The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. (Union field: provide either location OR endOfSegmentLocation, not both) IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "index": 1, "tabId": "tab1"}' - (Optional)
objectSize– The size of an object in the document (object with width/height dimensions). Object structure: { "height": object (Dimension), "width": object (Dimension) } *height* - The height of the object *width* - The width of the object Each Dimension object has the structure: { "magnitude": number, "unit": enum (Unit) } Where Unit can be: UNIT_UNSPECIFIED, PT (points), INCH, MM (millimeters) IMPORTANT: This parameter must be provided as a JSON string. Example: '{"height": {"magnitude": 100, "unit": "PT"}, "width": {"magnitude": 100, "unit": "PT"}}'
-
-
Example prompts
- Insert the image from url "https://example.com/logo.png" at the end of document abc123.
- Place an inline image at index 50 in document xyz789.
- Add an image sized 100pt by 100pt to the current document at the specified index.
google_docs_insert_table – Insert a table at the specified location.
-
When to use
- Programmatically insert a grid to organize data rows and columns.
- Append a predefined 3x3 table at the end of a report structure.
- Embed an empty matrix table for planning purposes in a collaborative doc.
-
Parameters
-
columns– The number of columns in the table -
documentId– The ID of the document to update -
rows– The number of rows in the table - (Optional)
endOfSegmentLocation– Insert at the end of a segment (object with segmentId, tabId properties). Object structure: {"segmentId": string, "tabId": string}. (See inline image tool for more JSON string format detail). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "tabId": "tab1"}' - (Optional)
location– The specific location in the document (object with segmentId, index, tabId properties). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "index": 1, "tabId": "tab1"}'
-
-
Example prompts
- Insert a table with 4 columns and 3 rows at index 50 in document abc123.
- Add a new 2x2 table to the end of the text in my project document.
- Place an empty table containing 5 rows and 2 columns at location index 100.
google_docs_insert_table_column – Insert a column into a table.
-
When to use
- Add a new data column to the right or left of an existing table cell.
- Expand a table to accommodate a new metric in an ongoing report.
- Expand document grids automatically as part of a formatting pass.
-
Parameters
-
documentId– The ID of the document to update -
insertRight– Whether to insert the column to the right of the reference cell (true) or left (false) -
tableCellLocation– The table cell location reference (JSON string with tableStartLocation, rowIndex, columnIndex). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"tableStartLocation": {"index": 1}, "rowIndex": 0, "columnIndex": 0}'
-
-
Example prompts
- Insert a new column to the right of cell 0,0 in the table starting at index 20.
- Add a column to the left of the specified table location reference in doc abc123.
- Expand the existing table in document xyz789 by appending a column to the right side.
google_docs_insert_table_row – Insert a row into a table.
-
When to use
- Append an additional row to an existing table.
- Place a new line of data directly below or above a specific record in a grid.
- Extend the capacity of a template table in a working Google Doc.
-
Parameters
-
documentId– The ID of the document to update -
insertBelow– Whether to insert the row below the reference cell (true) or above (false) -
tableCellLocation– The table cell location reference (object with tableStartLocation, rowIndex, columnIndex). Object structure: {"tableStartLocation": Location, "rowIndex": number, "columnIndex": number} *tableStartLocation* - REQUIRED. The specific location in the document (object with segmentId, index, tabId properties). CRITICAL: Use correct indices obtained from google_docs_get_document. *rowIndex* - REQUIRED. The zero-based row index. *columnIndex* - REQUIRED. The zero-based column index. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"tableStartLocation": {"index": 1}, "rowIndex": 0, "columnIndex": 0}'
-
-
Example prompts
- Insert a new row below the 2nd row in the table starting at index 15.
- Add an empty row above the target table cell location in my report document.
- Create a new table entry row below index row 5.
google_docs_merge_table_cells – Merge cells in a table.
-
When to use
- Group a top row of table cells into a single header cell.
- Merge specific coordinate regions physically crossing multiple columns.
- Adjust standard tables into specialized reporting templates.
-
Parameters
-
documentId– The ID of the document to update -
tableRange– The table range to affect (object with tableCellLocation, rowSpan, columnSpan properties). Object structure: {"tableCellLocation": TableCellLocation, "rowSpan": number, "columnSpan": number}. *rowSpan* - The number of rows to span. *columnSpan* - The number of columns to span. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"tableCellLocation": {"tableStartLocation": {"index": 1}, "rowIndex": 0, "columnIndex": 0}, "rowSpan": 2, "columnSpan": 2}'
-
-
Example prompts
- Merge the top two columns of the first row into one cell in document abc123.
- Combine the cells spanning 2 rows and 2 columns at location index 15.
- Merge the selected table range to act as a broad title header.
google_docs_replace_image – Replace an existing image with a new image.
-
When to use
- Swap out a placeholder graphic with a finalized asset without affecting document formatting.
- Replace an incorrect branding logo with the updated URI reference.
- Automatically update report visuals preserving the exact image aspect bounds.
-
Parameters
-
documentId– The ID of the document to update -
imageObjectId– The ID of the existing image to replace -
uri– The URI of the new image - (Optional)
imageReplaceMethod– The replacement method (CENTER_CROP) - (Optional)
tabId– The tab containing the image to replace
-
-
Example prompts
- Replace the image "img-xyz" with the new URL "https://example.com/new_logo.png" in doc abc123.
- Swap the outdated chart graphic object ID "chart01" with the live update URI.
- Replace the target graphic using the CENTER_CROP replacement method.
google_docs_unmerge_table_cells – Unmerge previously merged cells in a table.
-
When to use
- Restore a customized table header mapping back to independent grid cells.
- Disconnect elements accidentally spanning additional rows incorrectly.
- Reformat previously condensed template grids to accept individual granular values.
-
Parameters
-
documentId– The ID of the document to update -
tableRange– The table range to affect (object with tableCellLocation, rowSpan, columnSpan properties). Object structure: {"tableCellLocation": TableCellLocation, "rowSpan": number, "columnSpan": number}. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"tableCellLocation": {"tableStartLocation": {"index": 1}, "rowIndex": 0, "columnIndex": 0}, "rowSpan": 2, "columnSpan": 2}'
-
-
Example prompts
- Unmerge the previously combined 3-column cell starting at index 20.
- Disconnect the spanned cell structure encompassing row 1 and 2 in document abc123.
- Restore the individual cell columns of the designated table location back to default format.
google_docs_update_paragraph_style – Update paragraph style in the specified range.
-
When to use
- Alter line spacing, borders, or text direction rules for a selected paragraph.
- Convert specific text fragments accurately spanning exact indices to header formats.
- Align document text (for example, center standard paragraphs or right-align footers).
-
Parameters
-
documentId– The ID of the document to update -
fields– The fields to update (comma-separated list or "*" for all fields). Uses Google Protobuf FieldMask format - specify nested object fields with dot notation (for example, "bold,fontSize.magnitude,backgroundColor.color.rgbColor"). Use "*" to update all fields, or specify individual fields to update only those properties. -
paragraphStyle– Paragraph styling properties that apply to a whole paragraph (object with style properties). Object structure includes headingId, namedStyleType, alignment, lineSpacing, direction, spaceAbove, indentFirstLine, etc. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"alignment": "CENTER", "lineSpacing": 150}' -
range– The range of content to affect (object with segmentId, startIndex, endIndex, tabId properties). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "startIndex": 1, "endIndex": 10, "tabId": "tab1"}'
-
-
Example prompts
- Center align the paragraph stretching from index 50 to 100 in document xyz123.
- Increase the lineSpacing format property for the chosen paragraph range.
- Assign the "HEADING_1" namedStyleType style to the target selection block.
google_docs_update_table_column_properties – Update properties of columns in a table such as width.
-
When to use
- Hardcode specific point widths (PT) to specific column indices in report tables.
- Evenly distribute column width distributions seamlessly.
- Restructure visual aesthetics when table columns look disproportionate.
-
Parameters
-
documentId– The ID of the document to update -
fields– The fields to update (comma-separated list or "*" for all fields). Uses Google Protobuf FieldMask format. -
tableColumnProperties– Table column properties that control the width and other characteristics of a table column (object with properties). Object structure: { "width": object (Dimension), "widthType": enum (WidthType) }. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"widthType": "FIXED_WIDTH", "width": {"magnitude": 100, "unit": "PT"}}' -
tableStartLocation– The specific location in the document (object with segmentId, index, tabId properties). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "index": 1, "tabId": "tab1"}' - (Optional)
columnIndices– Optional column indices to update as a comma-separated string or JSON array string. Examples: "0,1,2" or "[0,1,2]" or single value "0"
-
-
Example prompts
- Set the width of column 1 in the target table to 150 PT using document abc123.
- Distribute columns roughly adjusting the width property for referenced indices.
- Update table column properties to evenly distribute width spacing.
google_docs_update_text_style – Update the text style in the specified range.
-
When to use
- Bold, italicize, or highlight particular sentences inside exact boundary coordinates.
- Apply specific font size magnitudes to text ranges directly.
- Overwrite default document colors to RGB hex configurations on specific characters.
-
Parameters
-
documentId– The ID of the document to update -
fields– The fields to update (comma-separated list or "*" for all fields). Uses Google Protobuf FieldMask format - specify nested object fields with dot notation (for example, "bold,fontSize.magnitude,backgroundColor.color.rgbColor"). Use "*" to update all fields, or specify individual fields to update only those properties. -
range– The range of content to affect (object with segmentId, startIndex, endIndex, tabId properties). IMPORTANT: This parameter must be provided as a JSON string. Example: '{"segmentId": "", "startIndex": 1, "endIndex": 10, "tabId": "tab1"}' -
textStyle– Text styling properties that can be applied to text content (object with style properties). Object structure supports bold, italic, underline, strikethrough, smallCaps, backgroundColor, foregroundColor, fontSize, weightedFontFamily, baselineOffset, link. IMPORTANT: This parameter must be provided as a JSON string. Example: '{"bold": true, "fontSize": {"magnitude": 12, "unit": "PT"}}'
-
-
Example prompts
- Make the text spanning index 20 to 45 bold and italicized in document xyz123.
- Apply a font size of 16pt and red foregroundColor to the chosen range string.
- Strip all formatting fields across paragraph parameters updating the raw textStyle.
Google Sheets
The Google Sheets tools let you create, read, update, and format spreadsheet data directly from Opal. Use them to log data, analyze ranges, manage sheets, and automate spreadsheet tasks without leaving your current workflow.
Read
google_sheets_get_spreadsheet – Retrieves detailed information about a specific Google Sheets spreadsheet.
-
When to use
- Get the URL or link to a spreadsheet.
- View spreadsheet structure and sheets.
- Retrieve spreadsheet metadata.
-
Parameters
-
spreadsheetId– The ID of the spreadsheet to retrieve.
-
-
Example prompts
- Get the details and URL for spreadsheet xyz.
- Find out how many sheets are in this spreadsheet.
- Check the metadata and locale of my spreadsheet.
google_sheets_list_spreadsheets – Lists the Google Sheets spreadsheets in your Google Drive.
-
When to use
- Find spreadsheets by name or title.
- Browse available spreadsheets.
- Find recently modified spreadsheets.
-
Parameters
- (Optional)
includeTrashed– Whether to include trashed and deleted spreadsheets in results. Default:false(excludes trashed spreadsheets). Set totrueto include spreadsheets in trash. - (Optional)
maxResults– Maximum number of spreadsheets to return per page. Default: 10. Examples:- 10 – Default.
- 50 – For larger lists.
- 100 – Maximum recommended.
- (Optional)
pageToken– Token for retrieving the next page of results. - (Optional)
query– Search query to filter spreadsheets by name. Matching is case-insensitive and partial.
- (Optional)
-
Example prompts
- List all spreadsheets modified recently.
- Search for spreadsheets named "Budget".
- Show me my latest 10 Google Sheets.
google_sheets_read_values – Reads values from a specified range in a Google Sheets spreadsheet.
-
When to use
- Read data from specific cells or ranges.
- Extract table data for analysis.
- Get lookup tables or reference lists.
-
Parameters
-
range– The A1 notation of the range to read. Common patterns:-
Single cell –
Sheet1!A1 -
Rectangular range –
Sheet1!A1:D10 -
Entire row –
Sheet1!5:5 -
Entire column –
Sheet1!A:A -
Multiple columns –
Sheet1!A:C -
Named range –
MyNamedRange -
Default sheet –
A1:D10(uses first sheet)
-
Single cell –
-
spreadsheetId– The ID of the spreadsheet to read from. - (Optional)
dateTimeRenderOption– How dates should be represented. Options:-
FORMATTED_STRING– (Default) Returns formatted date text (for example, "11/15/2024"). -
SERIAL_NUMBER– Returns numeric date value (for example, 45249).
-
- (Optional)
valueRenderOption– How values should be represented. Options:-
FORMATTED_VALUE– (Default) Returns formatted text as displayed in the UI. -
UNFORMATTED_VALUE– Returns underlying values (for example, numbers without currency formatting). -
FORMULA– Returns formulas as text (for example,=SUM(A1:A10)).
-
-
-
Example prompts
- Read the values from Sheet1!A1:C10.
- Extract the data from the first 5 rows.
- Get the contents of the D column.
Write
google_sheets_append_values – Appends new rows of data to the end of a table in a Google Sheets spreadsheet.
-
When to use
- Add new records to a table or list.
- Log new entries such as events and transactions.
- Append form responses or survey data.
-
Parameters
-
range– The A1 notation range to append to. Use column range for best results. Common patterns:-
All columns –
Sheet1!A:D(appends to columns A through D). -
Full sheet –
Sheet1!A:Z(appends across many columns). -
Specific columns –
Sheet1!B:E(appends to columns B through E). -
Named range –
DataTable(appends to named range).
Use column ranges (A:D) instead of cell ranges (A1:D100).
-
All columns –
-
spreadsheetId– The ID of the spreadsheet to append to. -
values– Pipe-delimited values where rows are separated by newlines (\n) and columns by pipes (|). Each row should have the same number of columns as your table. Use empty value between pipes for empty cells.-
Single row –
John [Doe|john@example.com](mailto:Doe|john@example.com)|Active. -
Two rows –
John [Doe|john@example.com](mailto:Doe|john@example.com)|Active\nJane [Smith|jane@example.com](mailto:Smith|jane@example.com)|Pending. -
With date and status (three rows) –
[John|john@example.com](mailto:John|john@example.com)|[2024-11-12|Active\nJane|jane@example.com](mailto:2024-11-12|Active\nJane|jane@example.com)|[2024-11-12|Pending\nBob|bob@example.com](mailto:2024-11-12|Pending\nBob|bob@example.com)|2024-11-13|Active. -
With empty cells –
[Alice||alice@example.com](mailto:Alice||alice@example.com)\[nBob|Smith|bob@example.com](mailto:nBob|Smith|bob@example.com)(Alice has no last name).
-
Single row –
- (Optional)
insertDataOption– How data should be inserted. Options:-
INSERT_ROWS(default) – Adds new rows after existing data. -
OVERWRITE– Overwrites cells starting at append position.
-
- (Optional)
valueInputOption– How input data should be interpreted. Options:-
USER_ENTERED(default) – Parses input, such as formulas, numbers, and dates.- "2024-11-12" becomes a date, "100" becomes number 100.
-
RAW– Stores as-is. Everything becomes text.- "2024-11-12" stays as text, "100" becomes text "100".
-
-
-
Example prompts
- Append the row "John [Doe|john@example.com](mailto:Doe|john@example.com)" to Sheet1!A:B.
- Log a new transaction at the end of the ledger table.
- Add these three new customer records to the end of my sheet.
google_sheets_clear_values – Clears all values from a specified range in a Google Sheets spreadsheet.
-
When to use
- Reset a data range to empty.
- Clear old entries before adding new data.
- Remove temporary calculation results.
-
Parameters
-
range– The A1 notation of the range to clear. Common patterns:-
Specific range –
Sheet1!A1:D10 -
Entire row –
Sheet1!5:5 -
Multiple rows –
Sheet1!2:5 -
Entire column –
Sheet1!A:A -
Multiple columns –
Sheet1!A:C -
Entire sheet –
Sheet1!A:Z(adjust Z based on sheet width).
-
Specific range –
-
spreadsheetId– The ID of the spreadsheet containing the range to clear.
-
-
Example prompts
- Clear all data in range A2:D10.
- Erase the contents of row 5.
- Empty the values from column B.
google_sheets_create_spreadsheet – Creates a new Google Sheets spreadsheet with optional initial data.
-
When to use
- Create new spreadsheets for tracking data.
- Configure data collection sheets.
- Initialize spreadsheets with template data.
-
Parameters
-
title– Title for the new spreadsheet. - (Optional)
initialData– Initial data to populate the first sheet. Pipe-delimited format. First row typically contains headers. Use\nfor row breaks and|for column breaks. Examples:-
Simple table (3x3) –
[Name|Email|Status\nJohn|john@example.com](mailto:Name|Email|Status\nJohn|john@example.com)|[Active\nJane|jane@example.com](mailto:Active\nJane|jane@example.com)|Inactive. -
With headers only –
Product|Price|Quantity. -
Coupon codes table –
Code|Discount|Valid Until\nSAVE10|10%|2024-12-31\nWELCOME20|20%|2024-11-30. -
With empty cells –
[Name|Phone|Email\nJohn||john@example.com](mailto:Name|Phone|Email\nJohn||john@example.com)\nJane|555-1234(John has no phone, Jane has no email).
-
Simple table (3x3) –
- (Optional)
sheetTitle– Title for the first sheet tab.
-
-
Example prompts
- Create a new spreadsheet called "2024 Q4 Budget".
- Make a new Google Sheet named "Customer Contact List" with some initial header rows.
- Start a new project timeline spreadsheet.
google_sheets_batch_update_values – Updates multiple ranges in a Google Sheets spreadsheet in a single batch request.
-
When to use
- Update multiple tables or sections at once.
- Modify data across different sheets in a single operation.
- Bulk update scattered cells efficiently.
-
Parameters
-
data– Multiple range updates separated by double newlines. Format:range::valueswhere values are pipe-delimited (|).-
Single range update –
Sheet1!A1:B2::[Name|Email\nJohn|john@example.com](mailto:Name|Email\nJohn|john@example.com) -
Two range updates (different sheets) –
Sheet1!A1:B2::[Name|Email\nJohn|john@example.com](mailto:Name|Email\nJohn|john@example.com)\n\nSheet2!A1:C1::Q1|Q2|Q3 -
Three range updates –
Sheet1!A1::Status\n\nSheet1!B1:C1::100|200\n\nSheet2!A1:A3::Red\nGreen\nBlue -
Update header and data rows –
Sheet1!A1:C1::Name|Email|Status\n\nSheet1!A2:C3::[John|john@example.com](mailto:John|john@example.com)|[Active\nJane|jane@example.com](mailto:Active\nJane|jane@example.com)|Pending -
Different sheets, different sizes –
Summary!A1::Total Sales\n\nData!A1:D2::Q1|Q2|Q3|Q4\n100|200|300|400
-
Single range update –
-
spreadsheetId– The ID of the spreadsheet to update. - (Optional)
valueInputOption– How input data should be interpreted. Options:-
USER_ENTERED(default) – Parses input, such as formulas, numbers, and dates.- "2024-11-12" becomes a date, "100" becomes number 100.
-
RAW– Stores as-is. Everything becomes text.- "2024-11-12" stays as text, "100" becomes text "100".
-
-
-
Example prompts
- Update Sheet1 A1 with "Status" and Sheet2 B1 with "Active".
- Batch update the header row and the totals column at once.
- Modify Q1 and Q2 data across different tabs simultaneously.
Advanced
google_sheets_add_sheet – Adds a new sheet (tab) to an existing Google Sheets spreadsheet.
-
When to use
- Add monthly or quarterly tabs (for example, "Q4 2024").
- Create separate sheets for different categories or projects.
- Add summary or report sheets.
-
Parameters
-
spreadsheetId– The ID of the spreadsheet to add a sheet to. -
title– The title for the new sheet. Must be unique within the spreadsheet. - (Optional)
columnCount– Number of columns in the new sheet (default: 26). - (Optional)
rowCount– Number of rows in the new sheet (default: 1000).
-
-
Example prompts
- Add a new sheet named "Q4 2024" to my spreadsheet.
- Create a "Summary" tab with 50 rows in my Google Sheet.
- Add another sheet to the current spreadsheet.
google_sheets_append_columns – Appends blank columns to the end of a Google Sheets sheet.
-
When to use
- Expand a sheet to accommodate more data fields.
- Add space at the end for future columns.
- Increase sheet width capacity.
-
Parameters
-
count– The number of columns to append. Must be a positive integer. -
sheetId– The numeric ID of the sheet where rows are appended. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet.
-
-
Example prompts
- Append five blank columns to the end of the sheet.
- Add three columns to sheet ID 0 in my spreadsheet.
- Give me 10 more columns at the end of the document.
google_sheets_append_rows – Appends blank rows to the end of a Google Sheets sheet.
-
When to use
- Expand a sheet to accommodate more data.
- Add space at the end for future entries.
- Prepare a sheet for data import.
-
Parameters
-
count– The number of rows to append. Must be a positive integer. -
sheetId– The numeric ID of the sheet where rows are appended. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet.
-
-
Example prompts
- Append 10 rows to the bottom of the sheet.
- Add 100 blank rows to spreadsheet xyz.
- Give me 50 more rows at the end of the document.
google_sheets_format_cells – Format cells in a Google Sheets spreadsheet by applying background colors, text colors, or both.
-
When to use
- Highlight header rows with distinct background colors.
- Color-code data by status.
- Format entire rows or columns with consistent colors.
-
Parameters
-
endColumnIndex– The ending column index (0-based, exclusive). Examples:-
To format only column A –
endColumnIndex = 1 -
To format columns A–E –
endColumnIndex = 5 -
To format columns A–Z –
endColumnIndex = 26
-
To format only column A –
-
endRowIndex– The ending row index (0-based, exclusive). Examples:-
To format only row 0 –
endRowIndex = 1 -
To format rows 0–4 (first 5 rows) –
endRowIndex = 5 -
To format rows 0–9 (first 10 rows) –
endRowIndex = 10
-
To format only row 0 –
-
sheetId– The numeric sheet ID (not the sheet name). -
spreadsheetId– The ID of the spreadsheet containing the cells to format. -
startColumnIndex– The starting column index (0-based, inclusive). Column Index Reference:- Column A – 0
- Column B – 1
- Column C – 2
- Column D – 3, and so on.
-
startRowIndex– The starting row index (0-based, inclusive). Examples:- First row – 0
- Second row – 1
- Tenth row – 9
- (Optional)
backgroundColor– Background color in RGB format:red,green,bluewhere each value is 0.0–1.0. SpecifybackgroundColor,textColor, or both. Example:0.0,0.0,0.55. Common colors:-
Red –
1.0,0.0,0.0 -
Green –
0.0,1.0,0.0 -
Blue –
0.0,0.0,1.0 -
Yellow –
1.0,1.0,0.0 -
Orange –
1.0,0.65,0.0 -
Light Blue –
0.68,0.85,0.90 -
Light Gray –
0.85,0.85,0.85 -
Dark Blue –
0.0,0.0,0.55 -
White –
1.0,1.0,1.0 -
Black –
0.0,0.0,0.0
-
Red –
- (Optional)
textColor– Text and foreground color in RGB format:red,green,bluewhere each value is 0.0–1.0. SpecifybackgroundColor,textColor, or both. Example:1.0,1.0,1.0. Common colors:-
Black text –
0.0,0.0,0.0 -
White text –
1.0,1.0,1.0 - Red text –
1.0,0.0,0.0 - Blue text –
0.0,0.0,1.0 - Gray text –
0.5,0.5,0.5
-
Black text –
-
-
Example prompts
- Make the background of the first row dark blue.
- Change the text color in column A to white.
- Format the cells in B2:C5 with a green background.
google_sheets_insert_columns – Inserts blank columns at a specific position in a Google Sheets sheet.
-
When to use
- Add space for new data in the middle of a sheet.
- Insert columns between existing data sections.
- Prepare space for importing data.
-
Parameters
-
count– The number of columns to insert. Must be a positive integer. -
sheetId– The numeric ID of the sheet where columns will be inserted. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet. -
startIndex– The 0-based column index where columns will be inserted. Columns are inserted before this index. Example:startIndex=3inserts columns before column D (A=0, B=1, C=2, D=3).
-
-
Example prompts
- Insert two columns before column D.
- Add a blank column before index 3.
- Insert five new columns in the middle of my table.
google_sheets_insert_rows – Inserts blank rows at a specific position in a Google Sheets sheet.
-
When to use
- Add space for new data in the middle of a sheet.
- Insert rows between existing data sections.
- Add blank rows for manual data entry.
-
Parameters
-
count– The number of rows to insert. Must be a positive integer. -
sheetId– The numeric ID of the sheet where rows will be inserted. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet. -
startIndex– The 0-based index where rows will be inserted. Rows are inserted before this index. Example:startIndex=5inserts rows before row 6 (row indices start at 0).
-
-
Example prompts
- Insert three rows before row 6.
- Add a blank row at index 5.
- Insert empty rows above the totals line.
google_sheets_update_values – Updates values in a specified range of a Google Sheets spreadsheet.
Delete
google_sheets_delete_columns – Deletes columns from a Google Sheets sheet.
-
When to use
- Remove obsolete or incorrect data columns.
- Delete empty columns.
- Reorganize sheet structure.
-
Parameters
-
endIndex– The 0-based index of the last column to delete (exclusive). Example:endIndex=4deletes up to but not including column E. To delete columns C–D (indices 2–3), usestartIndex=2, endIndex=4. -
sheetId– The numeric ID of the sheet where columns will be deleted. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet. -
startIndex– The 0-based index of the first column to delete (inclusive). Example:startIndex=2starts deleting from column C (A=0, B=1, C=2).
-
-
Example prompts
- Delete columns C and D from the sheet.
- Remove the first two columns from sheet ID 0.
- Delete column index 4 entirely.
google_sheets_delete_rows – Deletes rows from a Google Sheets sheet.
-
When to use
- Remove obsolete or incorrect data rows.
- Delete empty rows.
- Remove duplicate entries.
-
Parameters
-
endIndex– The 0-based index of the last row to delete (exclusive). Example:endIndex=8deletes up to but not including row 9. To delete rows 6–8 (indices 5–7), usestartIndex=5, endIndex=8. -
sheetId– The numeric ID of the sheet where rows will be deleted. Use thegoogle_sheets_get_spreadsheettool to find the sheet ID. This is not the sheet name or title. -
spreadsheetId– The ID of the spreadsheet. -
startIndex– The 0-based index of the first row to delete (inclusive). Example:startIndex=5starts deleting from row 6 (row indices start at 0).
-
-
Example prompts
- Delete row 5 from the spreadsheet.
- Remove the first 10 rows of test data.
- Delete rows index 5 through 8.
google_sheets_delete_spreadsheet – Deletes a Google Sheets spreadsheet permanently.
Google Slides
The following tools let you create, read, and modify Google Slides presentations programmatically. Use them to automate presentation tasks such as building slide decks from data, updating content across slides, or managing presentation structure. You need a Google account with access to Google Drive to use these tools.
Read
google_slides_find_presentation_by_name – Search for Google Slides presentations by name in the user's Google Drive.
-
When to use
- Find a presentation when you know the name but not the ID.
- Locate presentations matching a keyword or partial name.
- Get presentation ID for use in other operations.
-
Parameters
-
name– The name or partial name of the presentation to search for. For fuzzy matching, this can be any part of the title. - (Optional)
exactMatch– Whether to match the exact name (case-sensitive) or use fuzzy matching.-
true– Exact case-sensitive match only -
false(default) – Fuzzy search that finds presentations containing the search term
-
- (Optional)
maxResults– Maximum number of presentations to return. Default is 10. Increase if you expect many matches.
-
-
Example prompts
- Search for the "Q4 Marketing Plan" presentation.
- Find presentation IDs matching "Weekly Sync".
- Look up the presentation exactly called "Client Pitch Template".
google_slides_get_presentation – Gets the latest version and complete details of the specified Google Slides presentation.
-
When to use
- Inspect presentation structure and content.
- Get list of all slides and their IDs.
- Retrieve slide layouts and masters.
-
Parameters
-
presentationId– The ID of the presentation to retrieve.
-
-
Example prompts
- Get the details of presentation abc123.
- Fetch the metadata and slides list for my deck.
- Retrieve the presentation structure for the Q1 review file.
google_slides_list_presentations – Get a list of Google Slides presentations from your Google Drive with pagination and sorting options.
-
When to use
- List all presentations in your Drive for selection or management.
- Find recent work by sorting by
modifiedTime. - Search by name or order alphabetically to find presentations by title.
-
Parameters
- (Optional)
includeShared– Whether to include presentations shared with you (not just owned by you). Default is true. - (Optional)
includeTrashed– Whether to include trashed or deleted presentations in results. Default is false. - (Optional)
maxResults– Maximum number of presentations to return (1-100). Default is 20. - (Optional)
orderBy– How to order the results. Options:name,createdTime,modifiedTime, andrecency. Default ismodifiedTime. - (Optional)
pageToken– Token for pagination to get the next page of results.
- (Optional)
-
Example prompts
- List my most recently edited presentations.
- Show my top 10 presentations.
- Find all presentations in my Drive sorted by name.
Write
google_slides_add_text_box – Creates a text box with specified text on a slide in a Google Slides presentation.
-
When to use
- Add labels and annotations to slides.
- Create text elements at specific positions.
- Add headers, footers, or captions.
- Build custom slide layouts with text.
-
Parameters
-
presentationId– The ID of the presentation to add the text box to. -
slideId– The ID of the slide to add the text box to. -
text– The text content for the text box. - (Optional)
height– The height of the text box in points (one point equals 1/72 of an inch; a standard slide is 720 × 405 points). Defaults to 100. - (Optional)
width– The width of the text box in points. Defaults to 200. - (Optional)
x– The x-coordinate position of the text box in points. Defaults to 100. - (Optional)
y– The y-coordinate position of the text box in points. Defaults to 100.
-
-
Example prompts
- Create a text box with the text "Q4 Results" on slide_003.
- Add an annotation "Draft" at coordinates x=50, y=50 in my presentation.
- Insert a caption below the image on the first slide with a width of 300.
google_slides_create_image – Creates an image on a slide from a provided URL.
-
When to use
- Add logos, photos, or diagrams to slides.
- Insert charts or graphs from external sources.
- Include visual content from web resources.
-
Parameters
-
presentationId– The ID of the presentation to add the image to. -
slideId– The ID of the slide to add the image to. -
url– The URL of the image to insert. Must be publicly accessible and under 50MB. - (Optional)
height– The height of the image in points. Defaults to 300. - (Optional)
objectId– A user-supplied object ID for the image. If specified, must be unique among all pages and page elements in the presentation. Must start with an alphanumeric character or underscore, followed by alphanumeric characters, underscore, hyphen or colon. Length must be 5-50 characters. If not provided, a unique ID is generated. - (Optional)
width– The width of the image in points. Defaults to 400. - (Optional)
x– The x-coordinate position of the image in points. Defaults to 100. - (Optional)
y– The y-coordinate position of the image in points. Defaults to 100.
-
-
Example prompts
- Add the logo from https://example.com/logo.png to slide 2.
- Insert this image URL at position x=50, y=100.
- Put a new image on the title slide with a width of 400.
google_slides_create_presentation – Creates a blank Google Slides presentation with the specified title.
-
When to use
- Create a new presentation from scratch.
- Start a presentation for reports, proposals, or documentation.
- Automate presentation creation for recurring tasks.
-
Parameters
-
title– The title of the presentation. This is displayed in Google Drive and at the top of the presentation.
-
-
Example prompts
- Create a new blank presentation named "Q3 Marketing Review".
- Start a new Google Slide deck titled "Client Pitch".
- Generate a new presentation for the weekly sync.
google_slides_create_slide – Creates a new slide in a Google Slides presentation.
-
When to use
- Add new slides to an existing presentation.
- Insert slides at specific positions.
- Create slides with specific layouts (title, title+body, blank, and so on).
-
Parameters
-
presentationId– The ID of the presentation to add the slide to. - (Optional)
insertionIndex– The position where the slide will be inserted, counted from zero (0 = first position, 1 = second position, and so on). If not provided, the slide is added at the end. - (Optional)
layoutId– The layout ID – the object ID of one of the layouts in the presentation. Alternative to predefinedLayout. Cannot be used together with predefinedLayout. - (Optional)
objectId– A user-supplied object ID for the slide. If specified, must be unique among all pages and page elements in the presentation. Must start with an alphanumeric character or underscore, followed by alphanumeric characters, underscore, hyphen or colon. Length must be 5-50 characters. If not provided, a unique ID is generated. - (Optional)
predefinedLayout– The predefined layout for the slide (BLANK,CAPTION_ONLY,TITLE,TITLE_AND_BODY,TITLE_AND_TWO_COLUMNS,TITLE_ONLY,SECTION_HEADER,SECTION_TITLE_AND_DESCRIPTION,ONE_COLUMN_TEXT,MAIN_POINT,BIG_NUMBER). Defaults toBLANK.
-
-
Example prompts
- Add a new TITLE_AND_BODY slide at the end of the presentation.
- Insert a new slide at index 2.
- Create a BLANK slide in presentation abc123.
google_slides_delete_slide – Deletes the specified slide from a presentation.
-
When to use
- Remove unnecessary or outdated slides from presentations.
- Clean up draft slides before finalizing presentations.
- Delete placeholder or template slides after customization.
-
Parameters
-
presentationId– The ID of the presentation containing the slide to delete. -
slideId– The ID of the slide to delete.
-
-
Example prompts
- Delete slide xyz123 from my presentation.
- Remove the 4th slide in the deck.
- Erase the slide with ID slide_004.
google_slides_duplicate_slide – Duplicates the specified slide within the presentation.
-
When to use
- Create slide templates by duplicating and modifying existing slides.
- Replicate slide designs for consistent formatting.
- Build presentations faster by copying similar slide layouts.
-
Parameters
-
presentationId– The ID of the presentation containing the slide to duplicate. -
slideId– The ID of the slide to duplicate. - (Optional)
insertionIndex– The zero-based index where the duplicated slide should be inserted. If not provided, the slide is added after the original.
-
-
Example prompts
- Duplicate the title slide and place it at the end.
- Make a copy of slide xyz and insert it at index 3.
- Duplicate the second slide in presentation abc.
google_slides_insert_text – Inserts text into a shape or table cell at a specified position.
-
When to use
- Insert text at a specific position within existing content.
- Add text to the beginning or end of a text box.
- Insert text into table cells.
-
Parameters
-
insertionIndex– The zero-based index where the text will be inserted. -
objectId– The ID of the shape or table where the text will be inserted. -
presentationId– The ID of the presentation containing the object. -
text– The text to be inserted. - (Optional)
cellColumn– The column index if inserting into a table cell (0-based). - (Optional)
cellRow– The row index if inserting into a table cell (0-based).
-
-
Example prompts
- Insert "CONFIDENTIAL" at the start of textbox xyz.
- Add "$5,000" to row 2 column 1 of table abc.
- Append the word "Draft" to the shape 123 content.
google_slides_replace_all_text – Replaces all instances of text matching search criteria throughout a presentation with support for regex.
-
When to use
- Replace text using regular expression patterns for flexible, pattern-based matching.
- Limit replacements to specific slides rather than the full presentation.
- Perform complex text transformations that exact string matching cannot handle.
-
Parameters
-
presentationId– The ID of the presentation where text should be replaced. -
replaceText– The text to replace the search text with. -
searchText– The text to search for and replace. - (Optional)
matchCase– Whether to match case when searching for text. Defaults to false. - (Optional)
pageObjectIds– Array of page object IDs to limit the search to (JSON string). If not provided, searches entire presentation. - (Optional)
searchByRegex– Whether to treat the search text as a regular expression. Defaults to false.
-
-
Example prompts
- Replace all instances of "Acme" with "Initech" on slides 1 and 2.
- Use regex to update all 2023 dates to 2024 dates.
- Swap out the placeholder {{name}} with "John" using case-sensitive matching.
google_slides_replace_text – Replaces all instances of text matching search criteria throughout a presentation.
-
When to use
- Replace an exact word or phrase across every slide in a presentation.
- Update placeholder text, company names, or product names using simple text matching.
- Perform bulk text updates across an entire presentation without regex or slide-level scoping.
-
Parameters
-
presentationId– The ID of the presentation where text should be replaced. -
replaceText– The text to replace the search text with. -
searchText– The text to search for and replace. - (Optional)
matchCase– Whether to match case when searching for text. Defaults to false.
-
-
Example prompts
- Replace every instance of "Draft" with "Final".
- Case-sensitively substitute "TBD" with "Q4 2024".
- Find "Client Name" and change it to "Acme Corp" in the whole deck.
Advanced
google_slides_create_image – Creates an image on a slide from a provided URL.
-
When to use
- Add logos, photos, or diagrams to slides.
- Insert charts or graphs from external sources.
- Include visual content from web resources.
-
Parameters
-
presentationId– The ID of the presentation to add the image to. -
slideId– The ID of the slide to add the image to. -
url– The URL of the image to insert. Must be publicly accessible and under 50MB. - (Optional)
height– The height of the image in points. Defaults to 300. - (Optional)
objectId– A user-supplied object ID for the image. If specified, must be unique among all pages and page elements in the presentation. Must start with an alphanumeric character or underscore, followed by alphanumeric characters, underscore, hyphen or colon. Length must be 5-50 characters. If not provided, a unique ID is generated. - (Optional)
width– The width of the image in points. Defaults to 400. - (Optional)
x– The x-coordinate position of the image in points. Defaults to 100. - (Optional)
y– The y-coordinate position of the image in points. Defaults to 100.
-
-
Example prompts
- Add the logo from https://example.com/logo.png to slide 2.
- Insert this image URL at position x=50, y=100.
- Put a new image on the title slide with a width of 400.
google_slides_create_table – Creates a new table on a slide with specified rows and columns.
-
When to use
- Display data in tabular format.
- Create comparison matrices.
- Show schedules or timelines.
-
Parameters
-
columns– Number of columns in the table. -
presentationId– The ID of the presentation to add the table to. -
rows– Number of rows in the table. -
slideId– The ID of the slide to add the table to. - (Optional)
height– The height of the table in points. Defaults to 300. - (Optional)
objectId– A user-supplied object ID for the table. If specified, must be unique among all pages and page elements in the presentation. Must start with an alphanumeric character or underscore, followed by alphanumeric characters, underscore, hyphen or colon. Length must be 5-50 characters. If not provided, a unique ID is generated. - (Optional)
width– The width of the table in points. Defaults to 400. - (Optional)
x– The x-coordinate position of the table in points. Defaults to 100. - (Optional)
y– The y-coordinate position of the table in points. Defaults to 100.
-
-
Example prompts
- Add a 3x3 table to the second slide.
- Create a table with 5 rows and 4 columns on slide xyz.
- Insert a new table at x: 50, y: 150 coordinates.
google_slides_delete_text – Deletes text from a shape or table cell in a Google Slides presentation.
-
When to use
- Remove specific text sections from elements.
- Clear content from text boxes or shapes.
- Delete text from table cells.
-
Parameters
-
objectId– The object ID of the shape or table from which the text will be deleted. -
presentationId– The ID of the presentation containing the text. -
textRange– The range of text to delete (JSON string withtype,startIndex,endIndex). Valid types –FIXED_RANGE,FROM_START_INDEX,ALL. - (Optional)
cellLocation– The optional table cell location if the text is to be deleted from a table cell (JSON string with rowIndex and columnIndex).
-
-
Example prompts
- Delete all text inside text box xyz.
- Clear the text from cell row 1 column 2 in table abc.
- Remove the first 10 characters from shape 123.
google_slides_replace_image – Replaces an existing image with a new image from a URL.
-
When to use
- Update outdated images with new versions.
- Swap placeholder images with final versions.
- Replace logos or branding elements.
-
Parameters
-
imageObjectId– The ID of the existing image that will be replaced. -
presentationId– The ID of the presentation containing the image to replace. -
url– The URL of the new image. Must be publicly accessible and under 50MB. - (Optional)
imageReplaceMethod– The replacement method. Defaults toCENTER_INSIDE. Options:-
CENTER_INSIDE– Fit within bounds. -
CENTER_CROP– Fill bounds.
-
-
-
Example prompts
- Replace image xyz123 with logo.png url and use CENTER_INSIDE method.
- Swap the old screenshot with this new URL.
- Update the logo image without changing its position.
google_slides_update_slides_position – Updates the position of slides in the presentation by moving them to a new index.
-
When to use
- Reorganize content flow to improve narrative or logical sequence.
- Move intro/outro slides to the beginning or end.
- Group related slides thematically together.
-
Parameters
-
insertionIndex– The position where the slides will be inserted, counted from zero (0 = first position; an index equal to the total slide count moves slides to the end). Slides are inserted before the slide currently at that index. Examples:-
0– Move to beginning. -
1– Move to second position. -
10– Move to 11th position. -
20– Move to end of a 20-slide presentation.
-
-
presentationId– The ID of the presentation containing the slides to move. -
slideObjectIds– Comma-separated string of slide IDs to move, listed in their current presentation order with no duplicates. Use thegoogle_slides_get_presentationtool to retrieve slide IDs and their current order. Example:slide_3,slide_4,slide_5
-
-
Example prompts
- Move slide 5 and slide 6 to the beginning of the presentation.
- Send the title slide to index 0.
- Rearrange slides by moving slide ids "slide_4,slide_5" to index 2.
Instance level Opal OAuth
- Click the Settings tab.
- Expand the Google Workspace Settings section.
- Toggle Instance level Opal OAuth on if you want to use a custom Google Workspace authentication provider connection.
- Enter your Google Workspace Auth Provider ID.
-
Click Save.
If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See Turn generative AI off across Optimizely applications.
Article is closed for comments.