Create Document
Creates a new Google Docs document.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Title - The title for the new Google Docs document.
Output
- Document Id - The ID of the newly created Google Docs document.
Options
- Credentials - Google Docs credentials used to authenticate with the service.
- Share With - An array of objects specifying users to share the document with. Each object must contain:
- Role - The role to assign (e.g., "writer", "reader")
- Type - The type of user (e.g., "user", "group")
- EmailAddress - The email address of the user or group
- Send Notification Mail - Whether to send notification emails to users the document is shared with. Default is false.
How It Works
The Create Document node integrates with Google Docs to create a new document. When executed, the node:
- Validates the provided inputs (Title)
- Authenticates with Google Docs using the provided credentials
- Creates a new Google Docs document with the specified title
- Optionally shares the document with specified users
- Optionally sends notification emails to shared users
- Returns the document ID of the newly created document
Requirements
- Valid Google Docs credentials
- A title for the new document
- Valid email addresses for users to share with (if specified)
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Title
- Empty or invalid Google Docs credentials
- Invalid share with parameters (missing Role, Type, or EmailAddress)
- Google Docs service errors
Usage Notes
- The Title input is required and will be used as the document's title
- The Document Id output can be used in subsequent nodes to modify the document
- The Share With option allows you to specify multiple users or groups to share the document with
- When sharing with users, make sure to specify the correct Role (writer, reader, etc.) and Type (user, group, etc.)
- If Send Notification Mail is enabled, users will receive email notifications about the shared document
- The created document will be owned by the account associated with the provided credentials