YNAB-Subworkflow für den Vermögenswert

Experte

Dies ist ein Personal Productivity, Multimodal AI-Bereich Automatisierungsworkflow mit 17 Nodes. Hauptsächlich werden If, Set, Crypto, Discord, HttpRequest und andere Nodes verwendet. Automatisierung der Immobilienaktualisierungen in YNAB mit Rentcast.io und Discord-Benachrichtigungen

Voraussetzungen
  • Discord Bot Token oder Webhook
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "d3bI8kfQ6uKjfER3",
  "meta": {
    "instanceId": "ae3a7d69e340d9eec0196c03fd00e81b6e376d3084103c5850dd2cee1ac033f6"
  },
  "name": "YNAB Property Value Subworkflow",
  "tags": [],
  "nodes": [
    {
      "id": "d46c4d7e-10ff-498c-a009-9f684bd895f4",
      "name": "Keine Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1344,
        144
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e6ee1747-c27b-4cfc-94fd-4e3aa9daea9d",
      "name": "Felder bearbeiten",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "288b3077-cf0f-4e97-b8ee-460cbd788e54",
              "name": "rentcast_api",
              "type": "string",
              "value": "={{ $json.rentcast_api }}"
            },
            {
              "id": "18b6218a-822d-4458-9cfd-abd3e9682139",
              "name": "ynab_api",
              "type": "string",
              "value": "={{ $json.ynab_api }}"
            },
            {
              "id": "18f5b320-426b-4d62-97e4-dbfc2b9698be",
              "name": "address",
              "type": "string",
              "value": "={{ $json.address }}"
            },
            {
              "id": "87861b17-9350-4c75-aea1-e802a4801dbe",
              "name": "propertyType",
              "type": "string",
              "value": "={{ $json.propertyType }}"
            },
            {
              "id": "c0e713a4-aad3-4d6f-b757-232ee6e148bd",
              "name": "bedrooms",
              "type": "number",
              "value": "={{ $json.bedrooms }}"
            },
            {
              "id": "96902f6b-ba5a-45af-9ccc-a354e915bf52",
              "name": "bathrooms",
              "type": "number",
              "value": "={{ $json.bathrooms }}"
            },
            {
              "id": "9e0e7ad0-1eac-47cf-a9c4-77d9abb55d88",
              "name": "squareFootage",
              "type": "number",
              "value": "={{ $json.squareFootage }}"
            },
            {
              "id": "6a079c8e-e3f2-455c-8749-d5f0634ea2c5",
              "name": "ynab_budget",
              "type": "string",
              "value": "={{ $json.ynab_budget }}"
            },
            {
              "id": "c4bce4a9-816f-4c72-a1d3-84181a2c1c63",
              "name": "ynab_account",
              "type": "string",
              "value": "={{ $json.ynab_account }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "73000abb-1a23-4f86-a091-d47973c40710",
      "name": "YNAB Asset Value",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        672,
        48
      ],
      "parameters": {
        "url": "=https://api.ynab.com/v1/budgets/{{$('Edit Fields').item.json.ynab_budget}}/accounts/{{$('Edit Fields').item.json.ynab_account}}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Edit Fields').item.json.ynab_api }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f36fdf71-cc82-4c9f-a3e4-2201a34a40a6",
      "name": "Wert abrufen",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ce68c03d-a486-4fb1-a688-5b4b92b79b14",
              "name": "data.account.balance",
              "type": "number",
              "value": "={{ $json.data.account.balance /1000}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8cd50113-3a53-43fa-a0a9-d381d49d7ad0",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1c3b354c-9fc2-4468-8130-1c14bc674645",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ Math.round(($('Get Property Value').item.json.price * 1000) - $('Get Value').item.json.data.account.balance * 1000) }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e81cd156-355e-4add-8f1c-783f2910b87a",
      "name": "Immobilienwert abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        48
      ],
      "parameters": {
        "url": "=https://api.rentcast.io/v1/avm/value?address={{encodeURIComponent($json.address)}}&propertyType={{encodeURIComponent($json.propertyType)}}&bedrooms={{$json.bedrooms}}&bathrooms={{$json.bathrooms}}&squareFootage={{$json.squareFootage}}&compCount=5",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $json.rentcast_api }}"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a5d5449c-be98-4f57-81d8-23c625fcf9aa",
      "name": "HTTP-Anfrage",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1568,
        -48
      ],
      "parameters": {
        "url": "=https://api.ynab.com/v1/budgets/{{ $('Edit Fields').item.json.ynab_budget }}/transactions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"transaction\": {\n    \"account_id\": \"{{ $('Edit Fields').item.json.ynab_account }}\",\n    \"date\": \"{{$today.format('yyyy-MM-dd')}}\",\n    \"amount\": {{ Math.round(($('Get Property Value').item.json.price * 1000) - $('Get Value').item.json.data.account.balance * 1000) }},\n    \"payee_name\": \"n8n\",\n    \"memo\": \"n8n adjustment from rentcast.io\",\n    \"cleared\": \"reconciled\",\n    \"approved\": true,\n    \"flag_color\": \"yellow\",\n    \"subtransactions\": [],\n    \"import_id\": \"{{ $json.data }}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Edit Fields').item.json.ynab_api }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "639257f6-0f8e-4306-bdeb-32f7d1bf4536",
      "name": "Verschlüsselung",
      "type": "n8n-nodes-base.crypto",
      "position": [
        1344,
        -48
      ],
      "parameters": {
        "action": "generate"
      },
      "typeVersion": 1
    },
    {
      "id": "d1740d6a-2c15-4bfc-9ccd-37ab0834a707",
      "name": "Start",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        16,
        48
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "rentcast_api"
            },
            {
              "name": "ynab_api"
            },
            {
              "name": "address"
            },
            {
              "name": "propertyType"
            },
            {
              "name": "bedrooms",
              "type": "number"
            },
            {
              "name": "squareFootage",
              "type": "number"
            },
            {
              "name": "ynab_budget"
            },
            {
              "name": "ynab_account"
            },
            {
              "name": "bathrooms",
              "type": "number"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "b12c0b5d-21a5-450c-907e-111d0ed59cfb",
      "name": "Discord No Change",
      "type": "n8n-nodes-base.discord",
      "position": [
        1568,
        144
      ],
      "webhookId": "2dbc856f-8ac7-46ee-92df-46157dd4ed35",
      "parameters": {
        "content": "=No change in property value\nAddress: {{ $('Edit Fields').item.json.address }}\nValue: {{ '$' + ($('Get Value').item.json.data.account.balance).toLocaleString('en-US') }}",
        "options": {
          "username": "n8n Equity Watcher",
          "avatar_url": "https://www.iconsdb.com/icons/download/navy-blue/house-64.png"
        },
        "authentication": "webhook"
      },
      "credentials": {
        "discordWebhookApi": {
          "id": "jtusjd0AfNR35Ocl",
          "name": "Discord Webhook Budget Items"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8d434762-5406-45a4-bdab-111f5e63d9c5",
      "name": "Discord Changed",
      "type": "n8n-nodes-base.discord",
      "position": [
        1824,
        -48
      ],
      "webhookId": "2dbc856f-8ac7-46ee-92df-46157dd4ed35",
      "parameters": {
        "content": "=💵 Property Value Changed \nAddresss: {{ $('Edit Fields').item.json.address }}\nValue: {{ '$' + ($('Get Property Value').item.json.price).toLocaleString('en-US') }}\n\n",
        "options": {
          "username": "n8n Equity Watcher",
          "avatar_url": "https://www.iconsdb.com/icons/download/navy-blue/house-64.png"
        },
        "authentication": "webhook"
      },
      "credentials": {
        "discordWebhookApi": {
          "id": "jtusjd0AfNR35Ocl",
          "name": "Discord Webhook Budget Items"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9d58ca53-e05e-4cae-ad81-c6198cb15834",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -240
      ],
      "parameters": {
        "width": 2064,
        "height": 688,
        "content": "## YNAB Property Value\n### Leverages the rentcast.io api to fetch approximate value of real estate. \n### It then creates an adjustment transaction in YNAB to reflect the asset value. \n### Rentago provides 50 free api requests per month, then its $0.20 per request. \n"
      },
      "typeVersion": 1
    },
    {
      "id": "693b592c-0e99-4851-9d03-15a355821e15",
      "name": "Haftnotiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -32
      ],
      "parameters": {
        "color": 4,
        "width": 208,
        "height": 256,
        "content": "### rentago.io api fetch"
      },
      "typeVersion": 1
    },
    {
      "id": "8ddbddb4-009f-4886-bd1d-c1571e25c186",
      "name": "Haftnotiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -32
      ],
      "parameters": {
        "color": 4,
        "height": 256,
        "content": "### If property value has changed 0 dollars, do nothing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8e9ef8fb-002a-48ba-94e4-72b58a807ec7",
      "name": "Haftnotiz3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -32
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 256,
        "content": "### Compare rentago property value with the current asset value in YNAB"
      },
      "typeVersion": 1
    },
    {
      "id": "0d4a761c-9789-4af8-b0a1-587434aa311a",
      "name": "Haftnotiz4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -32
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 256,
        "content": "### This workflow is intended to be a subworkflow that can be called multiple times (once per property)"
      },
      "typeVersion": 1
    },
    {
      "id": "88898c45-2502-4cb0-8187-de6d8efc9b5d",
      "name": "Haftnotiz5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        -128
      ],
      "parameters": {
        "color": 4,
        "height": 256,
        "content": "### Create adjustment transaction in YNAB\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "dba17b05-6291-482b-8e8c-dcec6454254a",
  "connections": {
    "8cd50113-3a53-43fa-a0a9-d381d49d7ad0": {
      "main": [
        [
          {
            "node": "Crypto",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d1740d6a-2c15-4bfc-9ccd-37ab0834a707": {
      "main": [
        [
          {
            "node": "e6ee1747-c27b-4cfc-94fd-4e3aa9daea9d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f36fdf71-cc82-4c9f-a3e4-2201a34a40a6": {
      "main": [
        [
          {
            "node": "8cd50113-3a53-43fa-a0a9-d381d49d7ad0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e6ee1747-c27b-4cfc-94fd-4e3aa9daea9d": {
      "main": [
        [
          {
            "node": "e81cd156-355e-4add-8f1c-783f2910b87a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "8d434762-5406-45a4-bdab-111f5e63d9c5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73000abb-1a23-4f86-a091-d47973c40710": {
      "main": [
        [
          {
            "node": "f36fdf71-cc82-4c9f-a3e4-2201a34a40a6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e81cd156-355e-4add-8f1c-783f2910b87a": {
      "main": [
        [
          {
            "node": "73000abb-1a23-4f86-a091-d47973c40710",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing": {
      "main": [
        [
          {
            "node": "b12c0b5d-21a5-450c-907e-111d0ed59cfb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte - Persönliche Produktivität, Multimodales KI

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes17
Kategorie2
Node-Typen8
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34