Actions99
- Expenses Actions
- Group Accounts Actions
- Group Account Codes Actions
- Accounts 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, Get Expenses, retrieves a list of expense records from an external service based on specified filtering, sorting, and pagination criteria. It is useful for workflows that need to fetch detailed expense data for accounting, auditing, reporting, or integration with other financial systems.
Typical use cases include:
- Extracting expenses for a specific account within a date range.
- Filtering expenses by status, category, supplier, or other metadata.
- Paginating through large sets of expenses to process them in batches.
- Sorting expenses by creation date, amount, or other fields.
For example, you might use this node to get all approved expenses created in March 2023 for a particular account, sorted by the date they were settled.
Properties
| Name | Meaning |
|---|---|
| Account Id | Identifier of the account whose expenses are to be retrieved. This is a required string property. |
| Filter | A JSON-stringified and URL-encoded filter expression object conforming to an expense filter schema. It allows complex filtering on various fields such as id, status, createdAt, settledAt, title, type, category.id, createdBy.id, document-related dates and numbers, amounts, supplier name, card id, and supports logical operators like $and and $or. Date filters ignore time parts and compare only by date. |
| Order By | A JSON-stringified and URL-encoded sort expression object defining how to order the returned expenses. The schema supports specifying fields and directions for sorting. |
| 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. Limits the size of the result set, with a maximum allowed value of 1000. |
Output
The node outputs an array of expense objects in the json field of the output data. Each expense object contains detailed information about an individual expense, including but not limited to identifiers, status, dates (creation, settlement, review), title, type, category, creator, document details (dates, numbers), reconciliation amounts, supplier information, and associated card IDs.
No binary data output is indicated for this operation.
Dependencies
- Requires connection to an external API service that manages expense data.
- Needs an API authentication token or API key credential configured in n8n to authorize requests.
- The base URL for the API must be configured in the node credentials or environment variables.
Troubleshooting
- Invalid Filter or OrderBy JSON: If the filter or order by properties contain malformed JSON or invalid schema, the API may reject the request. Ensure JSON strings are properly formatted and URL-encoded.
- Authentication Errors: Missing or incorrect API credentials will cause authorization failures. Verify that the API key or token is correctly set up.
- Pagination Limits: Setting
Takeabove the maximum allowed (1000) may result in errors or truncated results. KeepTakewithin limits. - Empty Results: If no expenses match the filter criteria, the output will be an empty array. Adjust filters accordingly.
- Date Filtering: Date filters ignore time components; ensure date values are correct and in ISO format.
Links and References
- [JSON Schema for Expense Filters and Ordering] (Not provided here, but typically available in the API documentation)
- [API Documentation for Expense Management] (Refer to the external service's official API docs)
- n8n Documentation on HTTP Request Nodes and JSON Handling
If you need further details on other operations or resources, please provide their names.