Overview
This node integrates with the Splitwise API to manage expenses and groups. Specifically, for the Expense - Delete operation, it allows users to delete an existing expense by its ID. This is useful in scenarios where an expense was entered incorrectly or is no longer relevant and needs to be removed from the Splitwise account.
Practical examples:
- Automatically removing an expense after a refund is processed.
- Cleaning up test or duplicate expenses during data synchronization workflows.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with Splitwise API. Options: "API Key" or "OAuth2". |
| Expense ID | The unique numeric identifier of the expense to delete. Must be a non-negative integer. |
Output
The output JSON contains a single field indicating success:
{
"success": true
}
- If the deletion is successful,
successwill betrue. - If the deletion fails, an error is thrown (or returned if "Continue On Fail" is enabled).
No binary data is output by this operation.
Dependencies
- Requires access to the Splitwise API.
- Requires either an API key credential or OAuth2 authentication configured in n8n.
- The base URL used for API requests is
https://secure.splitwise.com/api/v3.0.
Troubleshooting
Common issues:
- Providing an invalid or non-existent Expense ID will cause the API to return an error.
- Authentication failures due to missing or incorrect API keys or OAuth tokens.
- Network connectivity issues preventing communication with the Splitwise API.
Error messages:
"Could not delete expense": Indicates the API rejected the deletion request, possibly because the expense does not exist or user lacks permission.- Errors related to authentication will typically come from the underlying HTTP request and should be resolved by verifying credentials.
Resolution tips:
- Verify that the Expense ID is correct and exists in the Splitwise account.
- Ensure the selected authentication method is properly configured and valid.
- Check network connectivity and API availability.