Actions10
- Document Actions
- Upload Actions
- Project Actions
- Generic Actions
Overview
This node integrates with the ProjectWise WSG API, specifically enabling retrieval of detailed information about documents stored in a ProjectWise datasource. The "Get Document" operation fetches a single document by its unique identifier (GUID), optionally allowing users to specify which fields and related entities to include in the response.
Common scenarios for this node include:
- Retrieving metadata or properties of a specific document within a ProjectWise repository.
- Fetching related data linked to the document, such as associated projects or other relationships.
- Using selective queries to optimize data transfer by requesting only needed fields or relationships.
Practical example:
- A user wants to get detailed information about a document identified by its GUID, including custom metadata fields and linked project details, to display in an external dashboard or trigger further automation based on document attributes.
Properties
| Name | Meaning |
|---|---|
| Document ID | The unique identifier (GUID) of the document to retrieve. |
| Select | Comma-separated list of specific fields and relationships to include in the response. |
| Relationships | Specific WSG relationships to include in the response; multiple can be selected from options. |
Output
The node outputs JSON data representing the requested document's details. The structure includes the document's properties and any selected related entities as specified by the input parameters.
- The
jsonoutput contains the document data fetched from the ProjectWise WSG API. - If relationships are selected, these appear nested within the main document object.
- No binary data output is indicated for this operation.
Example output snippet (simplified):
{
"DocumentId": "1234-5678-90ab-cdef",
"Name": "Project Plan",
"CreatedDate": "2023-01-15T12:34:56Z",
"Relationships": {
"Project": {
"ProjectId": "proj-001",
"Name": "New Building"
}
}
}
Dependencies
- Requires an API key credential for authenticating with the ProjectWise WSG API.
- Needs configuration of the ProjectWise server URL and datasource name in credentials.
- Uses OData query parameters (
$select,$filter, etc.) to customize requests. - Relies on internal helper methods to resolve datasource IDs and make authenticated HTTP requests.
Troubleshooting
Common issues:
- Incorrect or missing Document ID will cause the request to fail.
- Invalid or expired API credentials will result in authentication errors.
- Specifying invalid field names or relationships in the
SelectorRelationshipsproperties may lead to incomplete or error responses. - Network connectivity problems to the ProjectWise server can cause timeouts or failures.
Error messages:
"Datasource ... not found": Indicates the configured datasource name does not match any available datasource on the server. Verify datasource configuration."Generic WSG Request requires an endpoint parameter": Occurs if a generic request is attempted without specifying an endpoint.- Authentication errors typically mention failure to authorize; check API keys and tokens.
"ProjectWise WSG execution failed: ...": General catch-all for other errors; review the message for specifics.
Resolution tips:
- Double-check the Document ID format and existence.
- Ensure API credentials are valid and have necessary permissions.
- Use the
SelectandRelationshipsfields carefully, matching available schema fields. - Confirm network access to the ProjectWise server URL.
Links and References
- ProjectWise WSG API Documentation
- OData Protocol Overview: https://www.odata.org/getting-started/basic-tutorial/
- n8n Documentation on Credentials and HTTP Requests: https://docs.n8n.io/credentials/ and https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.http-request/