Actions10
- Document Actions
- Upload Actions
- Project Actions
- Generic Actions
Overview
This node provides integration with the ProjectWise Web Services Gateway (WSG) API, enabling users to perform various operations on ProjectWise data repositories. Specifically, for the Document resource and the Search Documents operation, it allows querying documents stored in a ProjectWise datasource using OData query parameters.
Typical use cases include:
- Searching for documents based on specific criteria such as metadata fields or relationships.
- Retrieving document details including related entities and environment attributes.
- Sorting and filtering large sets of documents efficiently via OData queries.
For example, a user might search for all documents created after a certain date, select only specific fields like Name and CreatedDate, and include related environment information automatically.
Properties
| Name | Meaning |
|---|---|
| Select | Fields and relationships to select from the Document resource. Examples: * (all fields), Name, or relationship paths like DocumentEnvironment-forward-Environment!poly.*. |
| Filter | OData filter expression to narrow down the documents returned. For example, filtering by creation date or status. |
| Relationships | Specific WSG relationships to include in the response. This is a multi-select option allowing inclusion of related entities beyond the default selection. |
| Additional Options | A collection of optional parameters: |
| - Order By | Field(s) to order the results by, supporting ascending (asc) or descending (desc) order. Example: Name, CreatedDate desc. |
| - Include Environment Attributes | Boolean flag to automatically include DocumentEnvironment relationships in the results. |
| - Include Full Path | Boolean flag to include the full absolute path (Path.AbsolutePath) of documents in the output. |
Output
The node outputs an array of JSON objects representing the documents matching the search criteria. Each object contains the selected fields and any included relationships or environment attributes as specified by the input properties.
If the "Include Full Path" option is enabled, the output will also contain the absolute path of each document.
No binary data output is produced by this operation.
Example output snippet (simplified):
[
{
"Name": "Project Plan",
"CreatedDate": "2023-01-15T12:34:56Z",
"DocumentEnvironment": {
"EnvironmentName": "Production"
},
"Path": {
"AbsolutePath": "/Projects/ProjectA/Documents"
}
},
...
]
Dependencies
- Requires connection to a ProjectWise WSG API endpoint.
- Needs an API key credential or authentication token configured in n8n for accessing the ProjectWise WSG service.
- The node internally resolves the datasource ID by querying the
/repositoriesendpoint before making document search requests. - Uses OData query syntax for filtering, selecting, and ordering data.
Troubleshooting
- Datasource Not Found Error: If the specified datasource name cannot be resolved, ensure the datasource exists and the name matches exactly one of the available datasources in the ProjectWise server.
- Authentication Errors: Verify that the API credentials are correct and have sufficient permissions to access the datasource and perform searches.
- Invalid OData Query: Malformed
$filter,$select, or$orderbyexpressions can cause request failures. Validate OData syntax carefully. - Empty Results: If no documents are returned, check the filter criteria and ensure documents exist matching those conditions.
- Generic WSG Request Endpoint Missing: When using generic requests, the endpoint parameter must be provided; otherwise, the node throws an error.