1. Overview
The Documents tool is a built-in GoInsight integration for the workspace document repository: paths are relative to the current workspace, not arbitrary URLs or external cloud drives. Use it to list folders, read file text in full, and create or update text documents from your workflows.
With the GoInsight Documents node, you can:
- List folder contents in a CLI-style listing (one entry per line; folders end with /).
- Read a file’s full text into the output (no truncation), or treat a folder path as a directory listing.
- Write text to a path with overwrite, append, or create_only modes.
2. Prerequisites
You need a GoInsight workspace with access to its internal document store. Paths must be workspace-relative (for example /docs/guide.md). No third-party account or OAuth app is required for this tool.
You may use the placeholder $PersonalDataPath in paths to refer to the current user’s personal data directory (for example $PersonalDataPath/notes.md).
3. Credentials
For detailed guidance on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide. The Documents node itself does not use external API credentials.
4. Supported Operations
This section summarizes the actions available for the Documents tool, followed by detailed parameter and output descriptions.
Summary
The Documents node operates on workspace documents and folders in the GoInsight document repository.
| Resource | Operation | Description |
|---|---|---|
| Workspace document / folder | Document List | Lists entries under a folder path; returns a CLI-style Listing string. |
| Workspace document | Document Read | Reads a file’s full content, or returns a directory-style listing when the path is a folder. |
| Workspace document | Document Write | Creates or updates a document at Path with the given Content and Mode. |
Operation Details
Document List
Lists the contents of a specified folder in the GoInsight workspace’s document repository. The input is a single folder path, and the tool returns a CLI-style listing in the Listing field with one entry per line; folders end with /.
Input Parameters:
- Path: Workspace-relative path to a folder (for example /docs). You can also use $PersonalDataPath to reference the user’s personal data directory (for example $PersonalDataPath/docs).
Output:
- Path (string): The document path.
- Listing (string): CLI-style directory listing, one entry per line; folder entries end with /.
- ErrorMessage (string): Empty string on success; otherwise a readable error message.
- Success (bool): Whether the list operation completed successfully.
Document Read
Reads a document from the GoInsight workspace’s document repository. The input is a single file path, and the tool returns the full file text in the Content field (no truncation). This tool is intended for internal workspace documents only (not web content).
Input Parameters:
- Path: Workspace-relative path to a file (for example /docs/guide.md) or folder (for example /docs/, must end with /). You can also use $PersonalDataPath (for example $PersonalDataPath/guide.md).
Output:
- Path (string): The document path.
- Content (string): If the path is a file: the full file content. If the path is a folder: a newline-delimited listing (one entry per line; folders end with /).
- ErrorMessage (string): Empty string on success; otherwise a readable error message.
- Success (bool): Whether the document was successfully read.
Document Write
Creates or updates a GoInsight workspace document at Path with the given Content. Use Mode to control write behavior: overwrite (replace), append (add to end), or create_only (fail if the file already exists).
Input Parameters:
- Path: Workspace-relative path to write (for example /docs/notes.md). You can also use $PersonalDataPath (for example $PersonalDataPath/notes.md).
- Content: The text to write.
Optional Parameters:
- Mode: Allowed values: overwrite | append | create_only. Default is overwrite.
Output:
- Success (bool): Whether the document write operation completed successfully.
- Path (string): The written document path.
- UpdatedAt (string): Last updated timestamp (ISO 8601). Empty string on failure.
- ErrorMessage (string): Empty string on success; otherwise a readable error message.
5. Example Usage
This example builds a small flow: list a folder, then read one file you care about.
The workflow can be structured as: Start → Document List → (optional) Document Read → Answer.
- Add the Documents node
- On the workflow canvas, click + to add a node.
- Open the Tools tab.
- Select Documents, then choose Document List.
- Configure Document List
- Open the node panel.
- Set Path to a workspace folder, for example /docs or $PersonalDataPath/reports.
- Run and inspect
- Run the workflow and open execution logs.
- Confirm Success is true and review Listing to pick a file path.
- Read a file
- Add a Document Read node (or a second run) with Path set to a concrete file path from the listing, for example /docs/readme.md.
- Write or append (optional)
- Add Document Write with Path, Content, and Mode (for example append to log lines to an existing note).
After configuration, downstream nodes can use Content or Listing as structured text for LLM prompts, templating, or further automation.
6. FAQs
Q: Why does Document Read return a listing instead of file text?
A: When Path points to a folder (typically with a trailing /), the node treats it as a directory read and returns a newline-separated listing in Content, similar to a CLI directory listing.
Q: What does create_only do?
A: create_only creates the file only if it does not already exist. If the path exists, the operation fails and ErrorMessage explains the conflict (for example an “already exists” style message).
Q: Can I use this tool to fetch arbitrary web pages or public URLs?
A: No. This tool is for the GoInsight workspace document repository only. It does not download arbitrary web content.
Q: How should I format paths?
A: Use workspace-relative paths starting from the workspace root convention (examples in the UI use forms like /docs/...). Use $PersonalDataPath when data should live under the user’s personal area.
7. Official Documentation
For tutorials on GoInsight AI workspace and automation, see: Welcome to GoInsight AI.
Leave a Reply.