Actions10
- Document Actions
- Upload Actions
- Project Actions
- Generic Actions
Overview
This node integrates with the ProjectWise WSG API to update documents within a specified datasource repository. It allows users to modify document data by specifying the document ID and providing an updated JSON instance payload. This is useful in scenarios where automated workflows need to programmatically update metadata or content of documents stored in ProjectWise repositories.
Practical examples include:
- Automatically updating document properties after a review process.
- Syncing document metadata from external systems.
- Bulk updating document attributes based on external triggers.
Properties
| Name | Meaning |
|---|---|
| Document ID | The unique identifier of the document to update. |
| Instance | A JSON object representing the new state or data of the document to be updated. |
| Options | Additional optional settings: |
| Custom Payload | Allows overriding the request body with a custom JSON payload instead of the standard instance data. |
Output
The node outputs JSON data representing the response from the ProjectWise WSG API after attempting to update the document. This typically includes confirmation of the update or details of the updated document.
If the "Custom Payload" option is enabled, the output corresponds to the API's response to that custom JSON payload.
No binary data output is indicated.
Dependencies
- Requires access to the ProjectWise WSG API endpoint.
- Needs an API authentication token or credentials configured in n8n for authorization.
- The node expects the user to provide the correct datasource instance name or ID as part of the credentials or configuration.
- Uses internal helper methods to resolve datasource IDs and make authenticated HTTP requests.
Troubleshooting
Common issues:
- Incorrect or missing Document ID will cause the update to fail.
- Invalid JSON in the Instance property or Custom Payload may result in request errors.
- Failure to resolve the datasource instance can occur if the provided datasource name does not match any available repositories.
- Authentication failures if API credentials are invalid or expired.
Error messages:
"Datasource ... not found"indicates the datasource name or ID could not be matched; verify the datasource configuration."Failed to resolve datasource ... to ID"suggests network or permission issues accessing the repositories endpoint.- Generic API errors returned from ProjectWise WSG will be included in the node output under an error field if "Continue On Fail" is enabled.
Resolutions:
- Double-check the Document ID and ensure it exists.
- Validate JSON syntax for the Instance or Custom Payload fields.
- Confirm API credentials and datasource names are correctly set up.
- Enable detailed logging to trace request and response details.
Links and References
- ProjectWise WSG API Documentation
- n8n documentation on HTTP Request Node (for understanding underlying request mechanics)