Overview
This node integrates with the Splitwise API to manage expenses within groups. Specifically, the "Expense - Create" operation allows users to add a new expense record to a specified group in Splitwise. This is useful for automating expense tracking and sharing costs among friends, roommates, or colleagues.
Common scenarios include:
- Automatically logging shared bills or purchases into Splitwise from other apps.
- Creating expenses programmatically based on triggers like form submissions or chat commands.
- Managing group expenses without manual entry in the Splitwise app.
For example, after a team lunch, you could use this node to create an expense with the total cost, description, currency, category, and assign it to the relevant group so everyone’s balances update accordingly.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with Splitwise API: either "API Key" or "OAuth2". |
| Cost | The amount of the expense as a decimal number with up to 2 decimal places (minimum 0). |
| Description | A short text describing the expense. |
| Group Name or ID | The target group where the expense will be added. Can be selected from a list or specified by ID. |
| Currency Code Name or ID | The currency code for the expense (e.g., USD, EUR). Selectable from a list or specified by ID. |
| Category Name or ID | The category of the expense (e.g., Food, Travel). Selectable from a list or specified by ID. |
| Split Equally | Whether the expense should be split equally among group members (always true and hidden here). |
| Additional Fields | Optional extra fields including: |
| - Details: Additional notes about the expense. | |
| - Date: Date and time when the expense occurred. | |
| - Repeats: How often the expense repeats (Never, Weekly, Fortnightly, Monthly, Yearly). |
Output
The output JSON contains the created expense object(s) returned by the Splitwise API under the json field. This includes all details of the newly created expense such as its ID, cost, description, currency, category, group association, and any additional metadata provided by Splitwise.
No binary data output is produced by this node.
Dependencies
- Requires access to the Splitwise API.
- User must provide valid authentication credentials via either an API key or OAuth2 token.
- The node uses internal helper methods to load options dynamically for groups, currencies, and categories.
- Network connectivity to
https://secure.splitwise.com/api/v3.0is required.
Troubleshooting
Error: Expense creation failed due to validation errors
The API may return error messages if required fields are missing or invalid (e.g., negative cost, invalid group ID). Check that all required properties are correctly set and that IDs correspond to existing entities.Authentication errors
Ensure the provided API key or OAuth2 token is valid and has sufficient permissions.Network issues
Verify internet connectivity and that the Splitwise API endpoint is reachable.Handling API error responses
If the API returns errors in the response (e.g.,errors.base), these are surfaced as node errors with descriptive messages. Review the error message to correct input parameters.