Connect Codex to Google Docs
Give your Codex agent access to Google Docs in Melso — 41 tools it can call while it works through a task.
Set it up in Melso
- 1In Melso, open Settings → Agent Apps and hit Connect on Google Docs.
- 2Finish the OAUTH2 sign-in in the window that opens. Melso stores the connection, not your credentials.
- 3Open your Codex agent, go to its Agent Apps tab, and allow Google Docs.
- 4Give the agent a task. It calls Google Docs itself when the work needs it.
What Google Docs gives your agent
The tools, permissions, and events Google Docs exposes — the same ones your agent can use once the app is authorized.
What you sign in with
Google Docs connects with OAUTH2.
- Client id
- Client secret
Permissions
Tools Google Docs exposes
Copy Google Document
Tool to create a copy of an existing Google Document. Use this to duplicate a document, for example, when using an existing document as a template. The copied document will have a default title (e.g., 'Copy of [original title]') if no new title is provided, and will be placed in the user's root Google Drive folder.
Create and Populate Table in Google Doc
Creates a new table in a Google Document and populates its cells with provided text data in a single operation. Use this action when you need to insert a structured table with predefined content into a document. The action handles both table creation and cell population automatically, eliminating the need for separate operations.
Create a document
Creates a new Google Docs document using the provided title as filename and inserts the initial text at the beginning if non-empty, returning the document's ID and metadata (excluding body content).
Create blank document (Deprecated)
DEPRECATED: Use GOOGLEDOCS_CREATE_DOCUMENT instead. Tool to create a blank Google Docs document with a specified title. Use when you need to create a new, empty document.
Create Document Markdown
Creates a new Google Docs document, optionally initializing it with a title and content provided as Markdown text.
Create Footer
Tool to create a new footer in a Google Document. Use when you need to add a footer, optionally specifying its type and the section it applies to.
Create Footnote
Tool to create a new footnote in a Google Document. Use this when you need to add a footnote at a specific location or at the end of the document body.
Create Header
Tool to create a new header in a Google Document, optionally with text content. Use this tool when you need to add a header to a document. You can provide: - document_id: The ID of the document (required) - type: The header type (DEFAULT is the standard header) - text: Optional text content to add to the header - section_break_location: Optional location for section-specific headers
Events your agent can react to
New Document Created
Triggers when a new Google Doc is created. This trigger monitors Google Docs and fires when new documents are detected. Uses timestamp filtering to efficiently poll for new documents.
Document Deleted
Triggers when an existing Google Doc is deleted (moved to trash). This trigger monitors Google Docs and fires when documents are trashed.
Document Placeholder Filled
Triggers when a Google Doc's plain text changes such that a configured placeholder token/pattern is no longer present (i.e., the document has been filled in). This trigger monitors a specific Google Doc and fires when a placeholder pattern that was previously present is no longer found in the document's plain text.
Document Search Update
Triggers when a Google Doc matching a user-defined search query is newly created or updated since the last poll. This trigger uses timestamp filtering to efficiently monitor documents.
Document Structure Changed
Triggers when a Google Doc's structure changes (headers/footers added/removed, tables/images count changes). This trigger monitors a specific document for structural changes like: - Headers added or removed - Footers added or removed - Tables added or removed - Images (inline objects) added or removed - Positioned objects added or removed - Footnotes added or removed
Document Updated
Triggers when an existing Google Doc is updated or modified. This trigger monitors Google Docs and fires when documents are updated.