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 by querying the "Expenses" resource. It is useful for workflows that need to fetch expense data for reporting, auditing, or integration with other financial systems. For example, you could use this node to get all expenses for a specific account within a date range or filter expenses by status or category.
Properties
| Name | Meaning |
|---|---|
| Account Id | Identifier of the account whose expenses you want to retrieve. This is a required string property. |
| Filter | A JSON-stringified and URL-encoded filter expression object conforming to the IExpenseFilter schema. It allows filtering expenses by various fields such as creation date, status, title, type, category, creator, document details, supplier name, card ID, and more. Date filters ignore time and compare only the date part. Example: filtering expenses created on March 26th would be done by { "createdAt": { "$equal": "2023-03-26T23:59:59.000Z" } }. The filter supports complex logical operators like $and and $or. |
| 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 (e.g., by date ascending or descending). |
| 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. Use this to limit the size of the response. 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 array corresponds to an expense object containing fields such as:
- Expense identifiers
- Status and dates (created, settled, reviewed)
- Title, type, and category information
- Creator details
- Document metadata (document date, number, due date, service date)
- Reconciliation amounts
- Supplier and card information
No binary data output is indicated by the source code.
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.
Troubleshooting
Common issues:
- Invalid or missing Account Id will cause the request to fail.
- Malformed JSON in the Filter or Order By properties can lead to errors; ensure proper JSON formatting and URL encoding.
- Request limits: requesting more than 1000 items via the Take property may be rejected.
- Network or authentication errors if API credentials are incorrect or expired.
Error messages:
- "Unauthorized" or "Authentication failed": Check API credentials and permissions.
- "Invalid filter format": Validate the JSON structure of the filter expression.
- "Request entity too large" or similar: Reduce the Take value or simplify the filter.
Links and References
- No direct links provided in the source code.
- Users should refer to the external API documentation for the Expenses resource and its filtering/sorting schemas (
IExpenseFilter,IExpenseOrderBy) for detailed usage examples.