Google Docs
Google Docs is a cloud-based collaborative word processing platform that allows multiple users to create, edit, and share documents in real-time.
Categories: File Storage
Type: googleDocs/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| clientId | Client Id | STRING | true | |
| clientSecret | Client Secret | STRING | true |
Connection Setup
Create OAuth 2.0 Application
Creation of OAuth 2.0 application is documented here.
Enable Google Docs API
- In the Google Cloud Console, select your project.
- Go to the APIs & Services.
- Click on ENABLE APIS AND SERVICES.
- Search for "google docs api" in the search bar.
- Click on Google Docs API.
- Click Enable.
Actions
Create Document
Name: createDocument
Create a document on Google Docs.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| title | Title | STRING | The title of the document. | true |
| body | Content | STRING | Content of the document. | true |
Example JSON Structure
{
"label" : "Create Document",
"name" : "createDocument",
"parameters" : {
"title" : "",
"body" : ""
},
"type" : "googleDocs/v1/createDocument"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| documentId | STRING | The ID of the document. |
| title | STRING | The title of the document. |
| tabs | ARRAY Items[{{STRING(tabId), STRING(title), STRING(parentTabId), INTEGER(index), INTEGER(nestingLevel), STRING(iconEmoji)}(tabProperties), [{}](childTabs)}] | Tabs that are part of a document. |
| revisionId | STRING | The revision ID of the document. |
| suggestionsViewMode | STRING | The suggestions view mode applied to the document. |
| body | OBJECT Properties{[{INTEGER(startIndex), INTEGER(endIndex)}](content)} | The main body of the document. |
Output Example
{
"documentId" : "",
"title" : "",
"tabs" : [ {
"tabProperties" : {
"tabId" : "",
"title" : "",
"parentTabId" : "",
"index" : 1,
"nestingLevel" : 1,
"iconEmoji" : ""
},
"childTabs" : [ { } ]
} ],
"revisionId" : "",
"suggestionsViewMode" : "",
"body" : {
"content" : [ {
"startIndex" : 1,
"endIndex" : 1
} ]
}
}Create Document From Template
Name: createDocumentFromTemplate
Creates a new document based on an existing one and can replace any placeholder variables found in your template document, like [[name]], [[email]], etc.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| fileId | Template Document ID | STRING | The ID of the template document from which the new document will be created. | true |
| placeholderFormat | Placeholder Format | STRING Options{{}}, [[]] | Choose the format of placeholders in your template. | true |
| fileName | Title of New Document | STRING | Name of the new document. | true |
| folderId | Folder ID | STRING | ID of the folder where the new document will be saved. If not provided, the new document will be saved in the same folder as the template document. | false |
| values | Variables | OBJECT Properties{} | Don't include the "[[]]", only the key name and its value. | false |
Example JSON Structure
{
"label" : "Create Document From Template",
"name" : "createDocumentFromTemplate",
"parameters" : {
"fileId" : "",
"placeholderFormat" : "",
"fileName" : "",
"folderId" : "",
"values" : { }
},
"type" : "googleDocs/v1/createDocumentFromTemplate"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| documentId | STRING | The ID of the document. |
| title | STRING | The title of the document. |
| tabs | ARRAY Items[{{STRING(tabId), STRING(title), STRING(parentTabId), INTEGER(index), INTEGER(nestingLevel), STRING(iconEmoji)}(tabProperties), [{}](childTabs)}] | Tabs that are part of a document. |
| revisionId | STRING | The revision ID of the document. |
| suggestionsViewMode | STRING | The suggestions view mode applied to the document. |
| body | OBJECT Properties{[{INTEGER(startIndex), INTEGER(endIndex)}](content)} | The main body of the document. |
Output Example
{
"documentId" : "",
"title" : "",
"tabs" : [ {
"tabProperties" : {
"tabId" : "",
"title" : "",
"parentTabId" : "",
"index" : 1,
"nestingLevel" : 1,
"iconEmoji" : ""
},
"childTabs" : [ { } ]
} ],
"revisionId" : "",
"suggestionsViewMode" : "",
"body" : {
"content" : [ {
"startIndex" : 1,
"endIndex" : 1
} ]
}
}Find Document ID
To find the Document ID, click here.
Find Folder ID
To find the Folder ID, click here.
Get Document
Name: getDocument
Gets the latest version of the specified document.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| documentId | Document Id | STRING | The ID of the document to read. | true |
Example JSON Structure
{
"label" : "Get Document",
"name" : "getDocument",
"parameters" : {
"documentId" : ""
},
"type" : "googleDocs/v1/getDocument"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| documentId | STRING | The ID of the document. |
| title | STRING | The title of the document. |
| tabs | ARRAY Items[{{STRING(tabId), STRING(title), STRING(parentTabId), INTEGER(index), INTEGER(nestingLevel), STRING(iconEmoji)}(tabProperties), [{}](childTabs)}] | Tabs that are part of a document. |
| revisionId | STRING | The revision ID of the document. |
| suggestionsViewMode | STRING | The suggestions view mode applied to the document. |
| body | OBJECT Properties{[{INTEGER(startIndex), INTEGER(endIndex)}](content)} | The main body of the document. |
Output Example
{
"documentId" : "",
"title" : "",
"tabs" : [ {
"tabProperties" : {
"tabId" : "",
"title" : "",
"parentTabId" : "",
"index" : 1,
"nestingLevel" : 1,
"iconEmoji" : ""
},
"childTabs" : [ { } ]
} ],
"revisionId" : "",
"suggestionsViewMode" : "",
"body" : {
"content" : [ {
"startIndex" : 1,
"endIndex" : 1
} ]
}
}Find Document ID
To find the Document ID, click here.
What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
Additional Instructions
How to find Document ID
To find a Document ID, open the document in your browser. The ID is the long string of letters and numbers in the URL between /d/ and the next / (usually /edit).
For example, in the URL https://docs.google.com/document/d/1234567890abcdefghijklmnopqrstuvwxyz/edit, the Document ID is 1234567890abcdefghijklmnopqrstuvwxyz.
The Document ID can also be found in the output of the following actions:
- Create Document
- Create Document from Template
- Get Document
How to find Folder ID
To find a Folder ID, open the Google Drive folder in your browser. The ID is the string of characters at the end of the URL after folders/.
For example, in the URL https://drive.google.com/drive/folders/abcjhadjh213102398890r4, the Folder ID is abcjhadjh213102398890r4.
The Folder ID can also be found in the output of the following Google Drive actions and triggers:
- Create New Folder
- Get File
- List Folders
- New Folder trigger
Troubleshooting
Access Blocked: Verification Process Not Completed
Documentation for how to add a test user can be found here
How is this guide?
Last updated on
Google Contacts
Google Contacts is a cloud-based address book service provided by Google, allowing users to store, manage, and synchronize their contact information across multiple devices and platforms.
Google Drive
Google Drive is a cloud storage service by Google that enables users to store, sync, share files, and collaborate online.