YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node integrates with the YNAB (You Need A Budget) API to automate budget management tasks. Specifically, the "Get Transaction by Month" operation under the "Transactions" resource retrieves all transactions for a specified month within a YNAB budget.

This operation is useful for financial reporting, auditing monthly expenses, or syncing transaction data with other systems. For example, a user can fetch all transactions from March 2024 to generate a monthly spending report or analyze cash flow trends.

Properties

Name Meaning
Month The year and month for which to retrieve transactions. Only the year and month parts of the date are used. The input is a date-time value but only formatted as yyyy-MM internally.

Output

The output JSON contains the data returned by the YNAB API for transactions in the specified month. It includes an array of transaction objects with details such as date, amount, account ID, payee, category, memo, cleared status, and any subtransactions.

No binary data output is produced by this operation.

Example structure snippet:

{
  "transactions": [
    {
      "id": "string",
      "date": "YYYY-MM-DD",
      "amount": number,
      "account_id": "string",
      "payee_id": "string",
      "category_id": "string",
      "memo": "string",
      "cleared": "cleared_status",
      "subtransactions": [ ... ]
    }
  ]
}

Dependencies

  • Requires an active YNAB API key credential configured in n8n.
  • Needs the budget ID to be set either via credentials or dynamically retrieved.
  • Uses the YNAB REST API endpoint: https://api.ynab.com/v1/budgets/{budgetId}/months/{year-month}-01/transactions.
  • Relies on the luxon library for date formatting.

Troubleshooting

  • Invalid Date Format: If the "Month" property is not a valid ISO date string, the node may fail to format the date correctly. Ensure the input is a proper date-time string.
  • Authentication Errors: Missing or invalid API key will cause authentication failures. Verify that the API key credential is correctly set up.
  • Budget ID Issues: If the budget ID is missing or incorrect, the API call will fail. Confirm the budget ID is properly configured.
  • API Rate Limits: Frequent calls might hit YNAB API rate limits; consider adding delays or error handling for rate limit responses.
  • Empty Results: If no transactions exist for the specified month, the output will contain an empty transactions array.

Links and References

Discussion