Actions22
- Accounts Actions
- Categories Actions
- Payees Actions
- Payee Locations Actions
- Months Actions
- Transactions Actions
- Scheduled Transactions Actions
Overview
This node integrates with the YNAB (You Need A Budget) API to automate budget management tasks. Specifically, the "Get Transaction by Category" operation fetches all transactions associated with a specified category within a user's budget. It optionally supports filtering transactions starting from a given date.
Common scenarios where this node is beneficial include:
- Retrieving all spending or income transactions for a particular category to analyze budgeting habits.
- Automating financial reports that group transactions by category.
- Integrating YNAB transaction data into other systems or workflows based on category filters.
For example, a user might use this node to get all transactions categorized as "Groceries" since the start of the month to track food expenses automatically.
Properties
| Name | Meaning |
|---|---|
| Category ID | The unique identifier of the category for which to retrieve transactions. |
| Since | Optional date filter to fetch transactions on or after this date (date only, time ignored). |
Output
The output JSON contains the raw response data from the YNAB API endpoint that lists transactions for the specified category. This includes an array of transaction objects with details such as amount, date, payee, memo, cleared status, and any subtransactions.
No binary data is output by this operation.
Example structure snippet of the output JSON:
{
"data": {
"transactions": [
{
"id": "transaction_id",
"date": "YYYY-MM-DD",
"amount": 12345,
"memo": "Transaction memo",
"cleared": "cleared_status",
"category_id": "category_id",
"payee_id": "payee_id",
"subtransactions": [ ... ]
},
...
]
}
}
Dependencies
- Requires an active YNAB API key credential configured in n8n for authentication.
- The node dynamically constructs the base URL using the budget ID obtained from credentials or configuration.
- Uses the
luxonlibrary internally to format dates according to YNAB API requirements.
Troubleshooting
- Invalid or missing Category ID: Ensure the Category ID provided exists in your YNAB budget; otherwise, the API will return an error.
- Date formatting issues: The "Since" date must be a valid ISO date string. Invalid dates may cause request failures.
- Authentication errors: Verify that the API key credential is correctly set up and has access to the specified budget.
- API rate limits: If many requests are made in a short period, the YNAB API may throttle requests. Implement retry logic or reduce request frequency.
- Empty results: If no transactions appear, confirm that transactions exist for the category and date range specified.