Actions22
- Kanban Actions
- Meeting Actions
- Project Actions
- Team Actions
- User Actions
Overview
The node interacts with a Workspace API to manage project cost data. It supports operations to retrieve, create, update, and delete cost entries associated with projects and their containers. This node is useful for project managers or financial controllers who need to track and manipulate cost information within projects programmatically.
Common scenarios include:
- Fetching all costs related to a specific project or container for reporting or auditing.
- Adding new cost entries when new expenses are incurred.
- Updating existing cost entries to reflect changes or corrections.
- Deleting obsolete or incorrect cost entries.
Practical example:
- A user wants to generate a report of all planned and actual costs for a project container to analyze budget adherence.
- Another user needs to add a new cost entry for materials purchased for a container within a project.
Properties
| Name | Meaning |
|---|---|
| Action | The operation to perform on project costs. Options: Get Many (retrieve multiple costs), Get All Costs for a Container, Create Container Costs Entry, Update Container Costs Entry, Delete Container Costs Entry. |
| Cost Entry ID | The unique identifier of a specific cost entry. Required for updating or deleting a cost entry. |
| Project ID | The unique identifier of the project to which the cost entries belong. |
| Container ID | The unique identifier of the container within the project. Required for most actions except "Get Many". |
| Page | The page number to fetch when retrieving paginated results (used in "Get Many" and "Get All Costs for a Container"). |
| Results Per Page | Number of cost entries to fetch per page when retrieving paginated results. |
| Create Cost | Collection of fields used when creating or updating a cost entry: |
| - Description | Text description of the cost (required). |
| - Notes | Additional notes about the cost. |
| - Planned Costs | Numeric value representing the planned cost amount (required). |
| - Actual Costs | Numeric value representing the actual cost amount. |
| - Distribution | Numeric code indicating cost distribution type: 0 = Equal, 1 = Start, 2 = End (required). |
| - Cost Type ID | Reference ID to the cost type classification (required). |
Output
The node outputs JSON data representing the cost entries retrieved or the result of create/update/delete operations. The structure typically includes details such as cost descriptions, planned and actual amounts, distribution types, and identifiers.
If binary data were involved (not indicated here), it would represent attachments or files related to cost entries, but this node focuses solely on JSON data.
Dependencies
- Requires an API key credential and tenant identification configured in n8n credentials to authenticate requests to the Workspace API.
- The base URL for the API must be set in the node's credential configuration.
- The node uses HTTP methods GET, POST, PATCH, and DELETE to interact with the API endpoints under
/api/v2/costs/.
Troubleshooting
- Missing or invalid Project ID or Container ID: Ensure these IDs are correctly provided; otherwise, API calls will fail.
- Pagination parameters out of range: Providing invalid page numbers or results per page may cause empty responses or errors.
- Required fields missing in create/update: Fields like Description, Planned Costs, Distribution, and Cost Type ID are mandatory; omitting them can lead to validation errors.
- API authentication errors: Verify that the API key and tenant credentials are correctly configured and have sufficient permissions.
- Network or API endpoint issues: Confirm the base URL is correct and the API service is reachable.
Common error messages might include:
- "Unauthorized" or "Authentication failed": Check API credentials.
- "Not Found": Verify project, container, or cost entry IDs.
- "Validation Error": Review required fields and data formats.
Links and References
- Refer to the Workspace API documentation for detailed information on cost management endpoints and data models.
- n8n documentation on setting up API credentials and using HTTP request nodes for custom integrations.