YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node operation allows you to create a scheduled transaction in YNAB (You Need A Budget). Scheduled transactions are recurring or planned transactions that automatically repeat based on a specified frequency. This is useful for automating regular payments such as rent, subscriptions, or salary deposits.

Typical use cases include:

  • Setting up monthly rent payments.
  • Scheduling weekly grocery budget allocations.
  • Automating bi-weekly paycheck entries.
  • Planning yearly insurance premium payments.

By creating scheduled transactions, users can better forecast their budget and cash flow without manually entering repetitive transactions.

Properties

Name Meaning
Amount The amount of the scheduled transaction. Must be a number with two decimal places.
Account ID The identifier of the account from which the transaction will be made.
Date The date of the first occurrence of the scheduled transaction. Cannot be set in the future.
Frequency How often the transaction repeats. 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 fields to provide more details about 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. Subtransactions allow splitting the main transaction into parts.

Output

The output JSON contains the created scheduled transaction object returned by the YNAB API. This includes all details of the scheduled transaction such as:

  • id: Unique identifier of the scheduled transaction.
  • date: The date of the scheduled transaction.
  • amount: The amount in milliunits (amount * 1000).
  • account_id: The account linked to the transaction.
  • frequency: The recurrence frequency.
  • payee_id / payee_name: Payee information.
  • category_id: Category assigned.
  • memo: Any notes.
  • subtransactions: Array of subtransaction objects if provided.

No binary data is output by this node.

Dependencies

  • Requires an active YNAB API key credential configured in n8n for authentication.
  • The node uses the YNAB REST API v1 endpoint, specifically the /scheduled_transactions resource.
  • The budget ID must be set either via credentials or dynamically resolved within the node context.
  • Uses the luxon library internally for date formatting.

Troubleshooting

  • Invalid Date Error: The Date property cannot be in the future. Ensure the date is today or earlier.
  • Amount Mismatch in Subtransactions: If subtransactions are provided, their summed amounts must exactly equal 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.
  • Invalid Account or Category IDs: Verify that the provided account and category IDs exist in your YNAB budget.
  • Frequency Value Issues: Use one of the predefined frequency options; invalid values will cause errors.
  • Payee Resolution: If only a payee name is provided without an ID, the node attempts to resolve or create the payee. Failure here may result in errors.

Links and References

Discussion