YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node integrates with the YNAB (You Need A Budget) API to automate financial budgeting tasks. Specifically, the Create Transactions operation under the Transactions resource allows users to batch-create multiple financial transactions in their YNAB budget by providing a JSON array of transaction objects.

Common scenarios where this node is beneficial include:

  • Importing bulk transaction data from external sources or spreadsheets into YNAB.
  • Automating recurring transaction entries for bookkeeping.
  • Migrating historical transaction data into YNAB for analysis and tracking.

For example, a user can prepare a JSON array of transactions with details such as date, amount, account ID, memo, payee, and category, then use this node to create all those transactions in one API call, saving time and reducing manual entry errors.

Properties

Name Meaning
Transactions JSON A JSON array string representing multiple transactions to create. Each transaction object supports:
- date (required): Transaction date in ISO format.
- amount (required): Amount in decimal currency units.
- account_id (required): Identifier of the account.
- memo: Optional text note.
- cleared: Status of the transaction clearance.
- payee_id: Identifier of the payee.
- category_id: Identifier of the category.
- payee_name: Name of the payee (alternative to payee_id).

This property enables batch creation of transactions by submitting an array of such objects.

Output

The node outputs the response from the YNAB API after creating the transactions. The main output field is:

  • json: Contains the created transactions data returned by YNAB. This includes detailed information about each transaction as stored in YNAB, such as assigned IDs, dates, amounts (in milliunits), account references, memos, payees, categories, and cleared status.

The node does not output binary data.

Dependencies

  • Requires an active connection to the YNAB API via an API key credential configured in n8n.
  • The node dynamically constructs the base URL using the budget ID obtained from credentials or parameters.
  • Uses the luxon library internally for date formatting.
  • Requires proper permissions on the YNAB API key to create transactions within the specified budget.

Troubleshooting

  • Invalid JSON Format: If the Transactions JSON input is not valid JSON, the node will fail parsing it. Ensure the JSON string is correctly formatted.
  • Missing Required Fields: Each transaction must have date, amount, and account_id. Omitting these will cause API errors.
  • Amount Scaling: Amounts are multiplied by 1000 internally to convert to YNAB's expected milliunits. Providing amounts in incorrect units may lead to unexpected values.
  • API Authentication Errors: Ensure the API key credential is valid and has access to the specified budget.
  • Budget ID Issues: The budget ID must be correctly set in credentials or parameters; otherwise, requests will fail.
  • Rate Limits or Network Issues: Standard API rate limits or connectivity problems may cause failures; retry or check network settings.
  • Error Handling: If the node is set to continue on failure, failed items will include error details in the output for debugging.

Links and References

Discussion