Actions40
- Job Actions
- Account Hierarchy Actions
- Cryptography Actions
- Customer Hierarchy Actions
- File Explorer Actions
- Generic API Actions
- Invoice Actions
- Mediation Actions
- Order Actions
- Quote Actions
- Subscription Actions
Overview
The Opencell - Invoice: Cancel Invoice operation allows users to cancel one or more invoices associated with a specific billing run in the Opencell system. Optionally, it can also delete the canceled invoices as part of the cancellation process. This node is useful for automating financial workflows where invoices need to be invalidated and possibly removed, such as handling customer cancellations, correcting billing errors, or managing failed payment scenarios.
Practical examples:
- Automatically canceling all invoices from a failed billing run.
- Removing erroneous invoices after a data import issue.
- Integrating with customer support workflows to void and clean up invoices upon request.
Properties
| Name | Type | Meaning |
|---|---|---|
| Authentication | options | Selects the authentication method (Basic Authentication or OAuth2) for API access. |
| Billing Run ID | number | The unique identifier of the billing run whose invoices are to be canceled. |
| Invoices | fixedCollection | A list of invoice IDs to be canceled within the specified billing run. |
| Delete Canceled Invoices | boolean | If true, the canceled invoices will also be deleted from the system. |
| Body Content Type | hidden | Internal property; always set to "multipart-form-data" (not user-facing). |
Output
- The output is a JSON object containing the response from the Opencell API after attempting to cancel (and optionally delete) the specified invoices.
- The structure of the output depends on the Opencell API's response for the cancel invoice endpoint. Typically, this may include:
- Status of the cancellation
- List of affected invoice IDs
- Any error messages or warnings returned by the API
Example output (structure may vary):
{
"status": "SUCCESS",
"canceledInvoices": [12345, 67890],
"deleted": true
}
Dependencies
- External Service: Requires access to an Opencell instance with API enabled.
- Authentication: Needs valid credentials for either Basic Authentication or OAuth2, configured in n8n credentials.
- n8n Configuration: The node must be properly configured with the correct Opencell API base URL and credentials.
Troubleshooting
Common Issues:
- Invalid Billing Run ID: If the provided Billing Run ID does not exist, the API will return an error.
- Invoice Not Found: If any invoice ID in the list does not belong to the specified billing run or does not exist, the operation may fail or partially succeed.
- Insufficient Permissions: The credentials used must have permission to cancel and delete invoices.
- API Connection Errors: Network issues or incorrect API URLs/credentials will result in connection failures.
Common Error Messages:
"Username/password error. Error code : XXX": Check your authentication credentials."Host error. Error code : XXX": Verify the Opencell API URL and network connectivity."Invalid credentials (unknown error)": Double-check your credential setup in n8n.- API-specific errors about missing or invalid invoice/billing run IDs: Ensure you are providing correct and existing values.