YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node operation updates an existing transaction in a YNAB (You Need A Budget) budget. It allows users to modify various details of a transaction such as the amount, account, date, payee, category, memo, cleared status, and subtransactions. This is useful for automating financial record keeping, correcting transaction details, or integrating with other systems that manage budgeting data.

Practical examples include:

  • Correcting the amount or date of a previously recorded transaction.
  • Changing the account associated with a transaction after a bank reconciliation.
  • Adding or updating subtransactions to reflect split expenses.
  • Updating payee information based on new data from external sources.

Properties

Name Meaning
Transaction ID The unique identifier of the transaction to update. Required to specify which transaction will be modified.
Amount The new amount for the transaction. Specified as a number with two decimal places.
Account ID The identifier of the account used for the transaction.
Date The date of the transaction in ISO 8601 format. Cannot be set to a future date.
Additional Fields A collection of optional fields to further specify transaction details:
- Payee ID Identifier of the payee associated with the transaction.
- Payee Name Name of the payee. If Payee ID is not provided, this name will be used to resolve or create a payee.
- Category ID Identifier of the category for the transaction. Leave empty if configuring split transactions via subtransactions.
- Cleared Status of the transaction clearance. Options are: "Cleared", "Uncleared", or "Reconciled".
- Memo Additional notes or description for the transaction.
- Sub Transactions Allows specifying multiple subtransactions for split transactions. Each subtransaction requires:
- Amount Amount of the subtransaction (must sum to the main Amount).
- Payee ID Payee identifier for the subtransaction.
- Payee Name Payee name for the subtransaction, used if Payee ID is null.
- Category ID Category identifier for the subtransaction. Credit Card Payment categories are ignored if supplied.
- Memo Notes for the subtransaction.

Output

The output JSON contains the updated transaction object returned by the YNAB API. This includes all the transaction details after the update has been applied, such as the transaction ID, amount, date, account ID, payee info, category, memo, cleared status, and any subtransactions.

No binary data output is produced by this operation.

Dependencies

  • Requires an authenticated connection to the YNAB API using an API key credential.
  • The node expects a valid budget ID configured either in credentials or dynamically resolved.
  • Uses the YNAB REST API endpoint https://api.ynab.com/v1/budgets/{budgetId}/transactions/{transactionId} with HTTP PUT method to update the transaction.

Troubleshooting

  • Invalid Transaction ID: If the specified transaction ID does not exist, the API will return an error. Verify the transaction ID before updating.
  • Amount Mismatch in Subtransactions: The sum of subtransaction amounts must equal the main transaction amount; otherwise, subtransactions will be ignored. Ensure amounts are consistent.
  • Future Date Error: Setting the transaction date to a future date is not allowed. Use a valid past or current date.
  • Authentication Errors: Ensure the API key credential is correctly configured and has access to the specified budget.
  • Category Restrictions: Credit Card Payment categories are not permitted in subtransactions and will be ignored if supplied.
  • API Rate Limits: Frequent updates may hit API rate limits; handle errors accordingly and consider retry logic.

Links and References

Discussion