Your read_doc reads existing docs. Now the other side — creating one. What doc do you create manually every week that follows a fixed template?
After read_doc I can read existing docs. But every Monday I create a fresh 'Update #15 — week of 2026-04-14' doc for my investor notes. Same title pattern, empty body, same place in my Drive.
GOOGLEDOCS_CREATE_DOCUMENT creates a new doc with just the title. It returns the new doc's ID so you can immediately pass it to read_doc to confirm the shape, or use it in doc_to_post on Day 26:
result = toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": title}
)
print(result.get("documentId", "no id"))The function only takes a title? I can't add content in the same call?
Correct — GOOGLEDOCS_CREATE_DOCUMENT creates the document structure. Adding content requires a separate batchUpdate call, which is outside this track's scope. For the capstone we create the doc and use it as a container — content is added manually or via a future automation. Here's the full function:
def create_doc(title: str) -> dict:
result = toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": title}
)
print(f"Created doc: {result.get('documentId', 'no id')}")
return resultSo every Monday morning Python creates the week's investor update doc automatically — title, date, everything. I just open it and fill in the week's story.
Your Monday doc creation just became a function call. One less tab to open.
Create then read-back — read_doc confirms the shape. The full Docs read-write cycle matches Sheets exactly.
The returned documentId is your handle to the new doc. Always save it immediately — doc_id = result.get('documentId'). Once you lose the ID, you'd have to search for the doc by title to recover it.
GOOGLEDOCS_CREATE_DOCUMENT creates an empty document with a title. Auto-generating the weekly investor update doc means Monday starts with the container already in place and properly titled — you just add the week's story without creating a new file manually.
toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": "Update #15 — week of 2026-04-14"}
){"title": "Update #15", "documentId": "1abc...", "body": {...}}Save the documentId immediately from the result. It's your only handle to the new doc in subsequent calls.
Your read_doc reads existing docs. Now the other side — creating one. What doc do you create manually every week that follows a fixed template?
After read_doc I can read existing docs. But every Monday I create a fresh 'Update #15 — week of 2026-04-14' doc for my investor notes. Same title pattern, empty body, same place in my Drive.
GOOGLEDOCS_CREATE_DOCUMENT creates a new doc with just the title. It returns the new doc's ID so you can immediately pass it to read_doc to confirm the shape, or use it in doc_to_post on Day 26:
result = toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": title}
)
print(result.get("documentId", "no id"))The function only takes a title? I can't add content in the same call?
Correct — GOOGLEDOCS_CREATE_DOCUMENT creates the document structure. Adding content requires a separate batchUpdate call, which is outside this track's scope. For the capstone we create the doc and use it as a container — content is added manually or via a future automation. Here's the full function:
def create_doc(title: str) -> dict:
result = toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": title}
)
print(f"Created doc: {result.get('documentId', 'no id')}")
return resultSo every Monday morning Python creates the week's investor update doc automatically — title, date, everything. I just open it and fill in the week's story.
Your Monday doc creation just became a function call. One less tab to open.
Create then read-back — read_doc confirms the shape. The full Docs read-write cycle matches Sheets exactly.
The returned documentId is your handle to the new doc. Always save it immediately — doc_id = result.get('documentId'). Once you lose the ID, you'd have to search for the doc by title to recover it.
GOOGLEDOCS_CREATE_DOCUMENT creates an empty document with a title. Auto-generating the weekly investor update doc means Monday starts with the container already in place and properly titled — you just add the week's story without creating a new file manually.
toolset.execute_action(
Action.GOOGLEDOCS_CREATE_DOCUMENT,
{"title": "Update #15 — week of 2026-04-14"}
){"title": "Update #15", "documentId": "1abc...", "body": {...}}Save the documentId immediately from the result. It's your only handle to the new doc in subsequent calls.
Create a free account to get started. Paid plans unlock all tracks.