Google Docs Action

Creates and edits Google Docs from a flow. Five operations, and the useful pattern behind them is the same one every time: keep a document with placeholders in it, copy it, and let the flow replace the placeholders with real values.

Setup

A Google credential connected for Google Docs. Choose the document with Choose from Google Drive — Google's own window, which gives HostWebhook that file and nothing else — or paste its URL or ID, or a {{…}} from an earlier step. To put new documents in a particular folder, pick it under Save location with Choose folder.


Mode — action or AI toolkit

The Mode selector decides who drives the node. In Action mode you pick one operation and fill its fields, and the node does that every time it runs. In AI toolkit mode the operations become tools an AI Node can call, and the model chooses which one and with what arguments.

ℹToolkit mode is opt-in per node, and it is what makes this node show up in an AI Node's tool picker. A node left in Action mode is invisible to agents.

Operations

The Operation dropdown decides what the node does and which fields appear under it. These are the exact values the API validates against:

ValueIn the dropdownWhat it does
readDocRead DocumentGet document content as plain text
createDocCreate DocumentCreate a new Google Doc
appendTextAppend TextAdd text to end of document
replaceTextReplace TextFind and replace text in document
insertTableInsert TableInsert a table at end of document

Content — write it in Markdown

Create Document and Append Text take a Content box. It is Markdown, the same syntax as a README or a chat message, with {{payload.field}} templates anywhere in it. A Preview tab shows how it will look.

textContent
# Weekly report — {{payload.week}}

Prepared for **{{payload.customer}}**.

## Highlights
- Revenue: {{payload.revenue}}
- New signups: {{payload.signups}}

1. Review the numbers
2. Send feedback by Friday

Full dashboard: [open it](https://app.example.com/reports)

Headings (#, ##, ###), **bold**, *italic*, - bullet and 1. numbered lists (indent two spaces to nest), [links](https://…), `code`, > quotes and tables all come through as real document formatting. A blank line starts a new paragraph; a single line break is kept as a line break.

OperationHow the Markdown lands
Create DocumentThe document is created by importing the content through Drive, so everything converts — tables included. It is born in the folder you picked.
Append TextThe Markdown is translated into Docs formatting requests: headings, bold, italic, lists, links, code and quotes. Tables are the one exception — the API cannot import them into an existing document, so they arrive as tab-separated lines. If the last paragraph of the document has text, a line break is added first so the new content does not glue to it.
ℹThe switch next to the box, Markdown | Plain text, is per node (contentFormat). Plain text inserts the content exactly as written, with no formatting. Nodes created before this existed are on Plain text — that is what they always did, so the documents they generate do not change — and new nodes start on Markdown. Flip the switch whenever you want.

In AI toolkit mode the content the model writes is treated as Markdown too, which is what models write by default. Models that answer in HTML instead (<h1>, <p>, <ul>, <table>…) are covered: content written as an HTML page — it starts with a block such as a heading, a paragraph, a list or a table — is converted to the same formatting when appended (Create imports HTML as it is). Markdown with an odd <b> inside stays Markdown.


Gotchas

  • Replacing text is literal. The placeholder has to match exactly, so a template that says {{name}} and a flow that writes {{Name}} silently changes nothing.
  • Appending adds at the end of the body, after any existing content — not at the cursor, because there is no cursor.
  • Markdown reads symbols as formatting. A payload value starting with # or - becomes a heading or a bullet. If a field must land verbatim, switch the node to Plain text.
  • Reading a document returns plain text. Formatting and images do not survive the trip. Tables come back one row per line, with the cells separated by |; if the flow needs more structure, keep it in the payload rather than in the document.
  • A missing document is a 404, with what to check: the ID, and that the document is shared with the Google account of the credential. It is not retried.
  • A document is not a spreadsheet. For tabular output the node you want is Google Sheets, not this one.