Yesterday read_doc fetched an existing document — you passed an ID, you got back a dict of the doc's body and title. What would happen if that doc didn't exist yet?
I'd get an error, probably. Or an empty dict. Either way, I'd need to create the doc first before I could read it.
Exactly the right instinct. Creation comes before retrieval. GOOGLEDOCS_CREATE_DOCUMENT takes a single argument — title — and hands back a metadata dict for the new, empty doc. Here's the whole thing:
result = toolset.execute_action(Action.GOOGLEDOCS_CREATE_DOCUMENT, {"title": title})That's it? One key? No content, no template, no folder path? It just... appears in my Drive?
It just appears. Blank doc, your title, your Drive. Composio handles the OAuth handshake and the API call — you get back a dict with the document ID, title, and revision info. What you do with that blank doc is the interesting part.
So I could generate a strategy memo title from a meeting name, create the doc, then — wait, can I write to it too?
Writing content to a doc is a separate action — out of scope for today. But the doc ID in the response is what unlocks that. You create, capture the ID, then any downstream step that needs to populate the doc has its target. Creation is the foundation:
def create_doc(title: str) -> dict:
result = toolset.execute_action(Action.GOOGLEDOCS_CREATE_DOCUMENT, {"title": title})
return resultEvery call creates a brand-new doc? So if I run this twice with the same title I get two identically-named docs sitting in Drive?
Exactly — no deduplication. Two calls, two docs. Run this in a loop with a typo in the title and you have fifty near-identical docs to clean up by hand. In real workflows, pair creation with a naming convention — date-stamped, project-tagged, or both. "Q2 Strategy Memo 2026-04-19" is findable in six months. "Untitled" is a liability from minute one.
GOOGLEDOCS_CREATE_DOCUMENT creates a new, empty Google Doc and returns its metadata.
| Argument | Type | Notes |
|---|---|---|
title | str | The document title in Google Drive |
A dict with at minimum documentId, title, and revisionId. Pass documentId to any downstream action that needs to read from or write to this doc.
Every call creates a new doc — there is no deduplication. Use date-stamped or project-tagged titles in production automations to keep Drive navigable.
Yesterday read_doc fetched an existing document — you passed an ID, you got back a dict of the doc's body and title. What would happen if that doc didn't exist yet?
I'd get an error, probably. Or an empty dict. Either way, I'd need to create the doc first before I could read it.
Exactly the right instinct. Creation comes before retrieval. GOOGLEDOCS_CREATE_DOCUMENT takes a single argument — title — and hands back a metadata dict for the new, empty doc. Here's the whole thing:
result = toolset.execute_action(Action.GOOGLEDOCS_CREATE_DOCUMENT, {"title": title})That's it? One key? No content, no template, no folder path? It just... appears in my Drive?
It just appears. Blank doc, your title, your Drive. Composio handles the OAuth handshake and the API call — you get back a dict with the document ID, title, and revision info. What you do with that blank doc is the interesting part.
So I could generate a strategy memo title from a meeting name, create the doc, then — wait, can I write to it too?
Writing content to a doc is a separate action — out of scope for today. But the doc ID in the response is what unlocks that. You create, capture the ID, then any downstream step that needs to populate the doc has its target. Creation is the foundation:
def create_doc(title: str) -> dict:
result = toolset.execute_action(Action.GOOGLEDOCS_CREATE_DOCUMENT, {"title": title})
return resultEvery call creates a brand-new doc? So if I run this twice with the same title I get two identically-named docs sitting in Drive?
Exactly — no deduplication. Two calls, two docs. Run this in a loop with a typo in the title and you have fifty near-identical docs to clean up by hand. In real workflows, pair creation with a naming convention — date-stamped, project-tagged, or both. "Q2 Strategy Memo 2026-04-19" is findable in six months. "Untitled" is a liability from minute one.
GOOGLEDOCS_CREATE_DOCUMENT creates a new, empty Google Doc and returns its metadata.
| Argument | Type | Notes |
|---|---|---|
title | str | The document title in Google Drive |
A dict with at minimum documentId, title, and revisionId. Pass documentId to any downstream action that needs to read from or write to this doc.
Every call creates a new doc — there is no deduplication. Use date-stamped or project-tagged titles in production automations to keep Drive navigable.
Create a free account to get started. Paid plans unlock all tracks.