YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node operation creates a scheduled transaction in a YNAB (You Need A Budget) budget. Scheduled transactions are recurring or planned transactions that happen automatically based on a defined frequency, such as monthly bills, subscriptions, or regular income. This node is useful for automating the management of these recurring financial events within your budgeting workflow.

For example, you can use this node to schedule your monthly rent payment, weekly grocery budget, or yearly insurance premium, ensuring they are tracked consistently without manual entry each time.

Properties

Name Meaning
Amount The amount of money for the scheduled transaction. Must be a number with two decimal places.
Account ID The identifier of the account from which the scheduled transaction will be made.
Date The date when the scheduled transaction starts. It cannot be set in the future beyond the current date.
Frequency How often the transaction recurs. Options include: Never, Daily, Weekly, Every Other Week, Twice a Month, Every 4 Weeks, Monthly, Every Other Month, Every 3 Months, Every 4 Months, Twice a Year, Yearly, Every Other Year.
Additional Fields Optional extra details for the scheduled transaction:
- 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 find or create a payee.
- Category ID Identifier of the category for the transaction.
- Memo A note or memo describing the transaction.
- Sub Transactions A collection of subtransactions. Each subtransaction must have an amount (sum must equal the main amount), optional payee ID/name, category ID, and memo.

Output

The node outputs a JSON object representing the created scheduled transaction as returned by the YNAB API. This includes all details of the scheduled transaction such as:

  • id: Unique identifier of the scheduled transaction.
  • date: Start date of the scheduled transaction.
  • amount: Amount in milliunits (amount * 1000).
  • account_id: Account identifier.
  • frequency: Recurrence frequency.
  • payee_id / payee_name: Payee information.
  • category_id: Category identifier.
  • memo: Memo text.
  • subtransactions: Array of any subtransactions included.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the YNAB API using an API key credential configured in n8n.
  • The node uses the budget ID from credentials or environment to construct API requests.
  • Uses the Luxon library for date formatting.
  • Requires internet access to communicate with the YNAB API endpoint.

Troubleshooting

  • Invalid Date Error: The date property must not be in the future. Ensure the date is today or earlier.
  • Amount Mismatch in Subtransactions: If subtransactions are provided, their amounts must sum exactly to the main amount; otherwise, subtransactions will be ignored.
  • Authentication Errors: Make sure the API key credential is valid and has access to the specified budget.
  • Missing Required Fields: Amount, Account ID, Date, and Frequency are mandatory. Omitting them will cause errors.
  • API Rate Limits: Frequent calls may hit YNAB API rate limits; handle errors accordingly.
  • Payee Resolution: If only payee name is provided without ID, the node attempts to resolve or create the payee. Failure here may cause errors.

Links and References

Discussion