Google Docs
App · Documents · 7 actions · 1 trigger
Create and edit documents in Google Docs.
Triggers
Start a workflow when something happens in Google Docs. See how triggers work.
Google Docs Document Modified
Triggers when a Google Docs document is modified
Filters
Narrow which events start a run.
document_idRequired
Event fields
What a run starts with. Later steps read each field with an @ reference.
document_idtexttitletextrevision_idtext
Actions
| Action | What it does |
|---|---|
| Add bulleted list | Add a bulleted list at the end of a Google Docs document. |
| Append text | Append text to the end of a Google Docs document. |
| Clear document | Clear all content from a Google Docs document. |
| Create document | Create a new Google Docs document with a given title. |
| Get document text | Retrieve the plain text content of a Google Docs document. |
| Insert heading | Insert a heading at the end of a Google Docs document. |
| Replace text | Replace all occurrences of a word or phrase in a Google Docs document. |
Add bulleted list
Add a bulleted list at the end of a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document
- Items
itemslistRequired - The lines of text to add as bullet points
Outputs
Bulleted-list insertion result
rangeobject- Start and end indexes of the inserted list
Example output
{
"range": {
"end": 120,
"start": 70
}
}Append text
Append text to the end of a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document
- Text
texttextRequired - Text to append to the document
Outputs
Append result
inserted_atnumber- Index where the text was inserted
Example output
{
"inserted_at": 42
}Clear document
Clear all content from a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document to clear
Outputs
No return value
Create document
Create a new Google Docs document with a given title.
Inputs
- Title
titletextRequired - Title of the new document
Outputs
Created Google Docs document
document_idtext- Document ID of the created document
Example output
{
"document_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
}Get document text
Retrieve the plain text content of a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document
Outputs
Plain text content of the document
texttext- Plain text content of the document
Example output
{
"text": "This is the document content.\n\nIt has multiple paragraphs."
}Insert heading
Insert a heading at the end of a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document
- Heading text
heading_texttextRequired - Text for the heading
- Level
leveltext - Heading size, from largest to smallest: HEADING_1, HEADING_2, HEADING_3, or HEADING_4
Outputs
Heading insertion result
rangeobject- Start and end indexes of the inserted heading
Example output
{
"range": {
"end": 65,
"start": 50
}
}Replace text
Replace all occurrences of a word or phrase in a Google Docs document.
Inputs
- Document ID
document_idtextRequired - The ID of the document
- Find text
find_texttextRequired - Text to find in the document
- Replace text
replace_texttextRequired - Text to replace with
Outputs
Replacement result
occurrences_changednumber- Number of occurrences replaced
Example output
{
"occurrences_changed": 3
}