YNAB icon

YNAB

Node for automating YNAB budget

Overview

This node integrates with the YNAB (You Need A Budget) API to automate budget management tasks. Specifically, the "Create Account" operation under the "Accounts" resource allows users to create a new financial account within a specified YNAB budget. This is useful for automating the setup of new accounts such as checking, savings, credit cards, loans, and other asset or liability types.

Practical examples include:

  • Automatically creating a new checking account when onboarding a new client.
  • Adding a new credit card account to track expenses programmatically.
  • Setting up various loan accounts in bulk from an external system.

Properties

Name Meaning
Account Name The name of the new account to be created.
Balance The starting balance of the new account, specified as a number with two decimal precision.
Account Type The type of the account. Options include: Checking, Savings, Cash, Credit Card, Line of Credit, Other Asset, Other Liability, Mortgage, Auto Loan, Student Loan, Personal Loan, Medical Debt, Other Debt.

Output

The output JSON contains the newly created account object returned by the YNAB API. This includes details such as the account's unique ID, name, type, current balance (in milliunits), and other metadata provided by YNAB.

No binary data is output by this operation.

Example output structure (simplified):

{
  "account": {
    "id": "string",
    "name": "string",
    "type": "string",
    "balance": 123456,
    "cleared_balance": 123456,
    "uncleared_balance": 0,
    "transfer_payee_id": null,
    "deleted": false
  }
}

Dependencies

  • Requires an active connection to the YNAB API via an API key credential.
  • The node expects a valid budget ID to be configured or dynamically retrieved.
  • Network access to https://api.ynab.com/v1/budgets/{budgetId}/accounts endpoint.
  • The node uses n8n's built-in HTTP request helper with authentication.

Troubleshooting

  • Invalid API Key or Authentication Failure: Ensure the API key credential is correctly set up and has permissions to access the specified budget.
  • Budget ID Not Found or Invalid: Verify that the budget ID used in the node configuration exists and is accessible.
  • Validation Errors on Input Fields:
    • Account Name must be non-empty.
    • Balance should be a valid number; note that internally it is converted to milliunits (multiplied by 1000).
    • Account Type must be one of the supported options.
  • API Rate Limits or Network Issues: Check network connectivity and YNAB API rate limits if requests fail intermittently.
  • Error Messages: The node throws errors with context about the item index for easier debugging. Use the error messages to identify which input caused the failure.

Links and References

Discussion