Opencell icon

Opencell

Consume Opencell API

Overview

The Move Invoice operation for the Invoice resource in this custom n8n node is designed to move one or more invoices from a specific billing run within the Opencell system. This is typically used in billing workflows where invoices need to be reassigned, reorganized, or processed further after an initial billing run.

Common scenarios:

  • Reallocating invoices to a different status or batch after review.
  • Automating post-billing processes that require moving selected invoices.
  • Integrating with other systems that trigger invoice movement based on business logic.

Practical example:
After generating invoices in a billing run, you may want to move certain invoices (e.g., those requiring manual approval) to a different state or process them separately. This node operation allows you to automate that step by specifying which invoices to move.


Properties

Name Type Meaning
Authentication options Selects the authentication method for connecting to Opencell (Basic Authentication or OAuth2).
Billing Run ID number The unique identifier of the billing run containing the invoices to be moved.
Invoices fixedCollection A collection where you specify one or more Invoice IDs to be moved.
Body Content Type hidden Internal property; always set to "multipart-form-data". Not user-configurable.

Output

  • The output will be a JSON object containing the response from the Opencell API after attempting to move the specified invoices.
  • The structure of the output depends on the Opencell API's response for the move operation, but it typically includes:
    • Status of the operation (success/failure)
    • Details about the invoices that were moved
    • Any error messages if the operation failed

Example output:

{
  "status": "SUCCESS",
  "movedInvoices": [12345, 67890],
  "message": "Invoices moved successfully."
}

Note: The actual fields may vary depending on the Opencell API implementation.


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 set up with the required credentials under the names opencellApi (for Basic Auth) or opencellOAuth2Api (for OAuth2).

Troubleshooting

Common issues:

  • Invalid Billing Run ID: If the provided Billing Run ID does not exist, the API will return an error.
  • Missing or Invalid Invoice IDs: If no invoices are specified or invalid IDs are provided, the operation will fail.
  • Authentication errors: Incorrect credentials will result in authentication failures.
  • API connectivity issues: Network problems or incorrect API endpoint configuration can cause connection errors.

Error messages and resolutions:

  • "Username/password error. Error code : XXX": Check your credentials and try again.
  • "Host error. Error code : XXX": Verify the Opencell API URL and network connectivity.
  • "Invalid credentials (unknown error)": Double-check the authentication method and credentials in n8n.
  • "Unable to get custom fields. Server response: ...": This should not occur for this operation, but indicates a misconfiguration if seen.

Links and References


Discussion