Actions99
- Group Accounts Actions
- Group Account Codes Actions
- Accounts Actions
- Expenses Actions
- Purchase Orders Actions
- Get A List Of Purchase Orders
- Create A New Purchase Order
- Get A Purchase Order
- Update A Purchase Order
- Open A Purchase Order
- Get A List Of Purchase Orders Items For A Specific Purchase Order
- Create A Purchase Order Item
- Get A Purchase Order Item
- Update A Purchase Order Item
- Delete A Purchase Order Item
- Get A List Of Goods Received Notes For A Specific Purchase Order
- Create A Goods Received Note
- Attach A File To A Goods Received Note
- Delete A Goods Received Note
- Suppliers Actions
- Fund Accounts Actions
- Cards Actions
- Expense Categories Actions
- Tax Rates Actions
- Amortizations Actions
- Account Teams Actions
- Account Codes Actions
- External Teams Actions
- Custom Fields Actions
- Get Custom Fields
- Create A New Custom Field
- Get Custom Field
- Update Custom Field
- Delete A Custom Field And All Its Values
- Get Custom Field Values
- Create A Custom Field Value
- Delete Custom Field Values
- Get A Custom Field Value
- Update A Custom Field Value
- Delete A Custom Field Value
- Get Managers For A Specific Custom Field Value
- Adds Managers For A Specific Custom Field Value
- Replaces Managers For A Specific Custom Field Value
- Removes Managers For A Specific Custom Field Value
- Webhook Subscriptions Actions
- Group Teams Actions
Overview
This node operation retrieves a list of expenses from an external service associated with an account. It is useful for scenarios where you need to fetch and process expense data programmatically, such as generating reports, auditing transactions, or integrating expense data into other workflows.
For example, you might use this node to:
- Get all expenses for a specific account within a date range.
- Filter expenses by status or category.
- Paginate through large sets of expenses using skip and take parameters.
- Sort expenses by creation date or amount.
Properties
| Name | Meaning |
|---|---|
| Account Id | Identifier of the account whose expenses you want to retrieve. This is a required string input. |
| Filter | A JSON-stringified and URL-encoded filter expression object that conforms to the IExpenseFilter schema. It allows filtering expenses by various fields such as id, status, dates (createdAt, settledAt, reviewedAt), title, type, category, creator, document details, reconciliation amounts, supplier name, card id, and supports logical operators $and and $or. Date filters ignore time and compare only by date part. |
| Order By | A JSON-stringified and URL-encoded sort expression object conforming to the IExpenseOrderBy schema. It defines how the returned expenses should be ordered. |
| Skip | Number of expense objects to skip from the beginning of the result set. Useful for pagination. Default is 0. |
| Take | Maximum number of expense objects to return. The maximum allowed is 1000. Default is 0 (which may mean no limit or default server behavior). |
Output
The node outputs JSON data representing the retrieved expenses. Each item in the output corresponds to an expense object containing fields such as identifiers, status, dates, titles, types, categories, creator information, document details, reconciliation amounts, supplier info, and card details.
If binary data were involved (e.g., attachments or documents), it would be summarized here, but based on the provided code and properties, the output is purely JSON structured expense data.
Dependencies
- Requires connection to an external API service that manages expenses.
- Needs an API key or authentication token configured in n8n credentials to authorize requests.
- The base URL for the API must be set in the node's credential configuration.
- Uses query parameters to send filters, sorting, pagination options.
Troubleshooting
- Invalid Filter Format: If the
$filterJSON is malformed or does not conform to the expected schema, the API may reject the request. Ensure the filter is properly JSON-stringified and URL-encoded. - Authentication Errors: Missing or invalid API credentials will cause authorization failures. Verify that the API key/token is correctly configured.
- Pagination Limits: Setting
$takeabove the maximum allowed (1000) may result in errors or truncated results. - Empty Results: If filters are too restrictive or incorrect, the node may return no expenses. Review filter criteria carefully.
- API Connectivity Issues: Network problems or incorrect base URL settings can prevent successful API calls.
Links and References
- Refer to the external API documentation for detailed schema definitions of
IExpenseFilterandIExpenseOrderBy. - Consult your API provider’s guide on authentication and rate limits.
- n8n documentation on how to configure credentials and use JSON input properties effectively.