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 multiple transactions from external sources or CSV files into YNAB in one go.
  • Automating recurring bulk transaction entries for business or personal finance workflows.
  • Synchronizing transactions from other financial systems or apps into YNAB automatically.

Example use case: A user exports bank transactions as JSON and uses this node to create all those transactions in YNAB at once, saving manual entry time.

Properties

Name Meaning
Transactions JSON A JSON array string representing multiple transactions to create. Each transaction object supports these fields:
- date (required): The date of the transaction in ISO format.
- amount (required): The amount in major currency units (e.g., dollars).
- account_id (required): The ID of the account to which the transaction belongs.
- memo: Optional memo text.
- cleared: Status of the transaction clearance.
- payee_id: ID of the payee.
- category_id: ID of the category.
- payee_name: Name of the payee.
Note: Amounts are internally converted to milliunits (multiplied by 1000) before sending to the API.

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 details such as transaction IDs, dates, amounts (in milliunits), account associations, and any additional metadata provided by the API.

The node does not output binary data.

Dependencies

  • Requires an active connection to the YNAB API.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The node dynamically constructs the base URL using the budget ID obtained from credentials or helper functions.
  • Uses the luxon library internally for date formatting.

Troubleshooting

  • Invalid JSON input: If the "Transactions JSON" property contains malformed JSON, the node will throw a parsing error. Ensure the JSON is valid and properly formatted.
  • Missing required fields: Each transaction must have date, amount, and account_id. Omitting these will cause API errors.
  • Amount scaling: Amounts must be provided in major currency units (e.g., dollars), but the node multiplies them by 1000 to convert to milliunits as required by YNAB. Providing amounts already scaled may result in incorrect values.
  • Authentication errors: If the API key or budget ID is missing or invalid, the node will fail to authenticate. Verify credentials and budget configuration.
  • API rate limits or downtime: Network issues or YNAB API limits can cause request failures. Retry or check YNAB service status if errors persist.

Links and References

Discussion