Automate Google Docs with TypeScript
Create Google documents, read their tabs and text, and make focused text, paragraph, image, table, and page-break edits.
import { automation, onHttpRequest } from "automate.ax"
import { googleDocs } from "automate.ax/google-docs"
import { z } from "zod"
export default automation("Create a Google document", () => {
const request = onHttpRequest({
body: z.object({ title: z.string(), text: z.string() }),
})
const document = googleDocs.createDocument({ title: request.body.title })
googleDocs.appendText({ document: document.documentId, text: request.body.text })
})What you can do
Actions
- Create and inspect documents
- Append, insert, replace, and delete text
- Format text and paragraphs
- Insert images, tables, and page breaks
Triggers
No provider trigger is published for Google Docs yet. Use another trigger, then call its actions.