{
  "name": "Automate multi-bank transaction sync & reporting with GoCardless & Maybe Finance",
  "nodes": [
    {
      "id": "c7580a81-6327-4da4-b01a-9afe9d9d3b22",
      "name": "Get access token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -820,
        -80
      ]
    },
    {
      "id": "8c0c26ef-083a-4028-a866-2b3857dc47c3",
      "name": "Get Revolut Pro transactions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        -180
      ]
    },
    {
      "id": "61fb2bc6-abf0-469d-9ade-ef7aec5429fe",
      "name": "Get Revolut Personal transactions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        60
      ]
    },
    {
      "id": "878df10c-1704-48f5-b1a2-ac9a4ff4a5f2",
      "name": "Get accounts id from Maybe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -480,
        -540
      ]
    },
    {
      "id": "524015a4-4d7b-4836-b8da-125f995d9ca4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -680
      ],
      "parameters": {
        "width": 1440,
        "height": 340,
        "content": "## Run once - Configuration\nAfter getting the access token, follow the GoCardless steps from their docs and run these nodes accordingly in the right order.\nGoCardless docs: https://developer.gocardles"
      }
    },
    {
      "id": "cda3a7d7-f434-4d64-bdc9-0f9d6c04b5a3",
      "name": "Step 2 - Get institution id",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        -540
      ]
    },
    {
      "id": "96ea05dd-27a5-41b7-8049-ef0be4036662",
      "name": "Step 5 - Get account id",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        -540
      ]
    },
    {
      "id": "5367c00b-97f5-4002-a7b3-b2bc111b63c0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -680
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## Set up weekly workflow\nAfter linking the bank accounts, you can request access token (lasts 24h) and use that to request the transactions from all your bank accounts. You have 4 requests per bank a"
      }
    },
    {
      "id": "ba89f635-926c-4750-a862-b5e335852cc0",
      "name": "Create transactions to Maybe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        840,
        -80
      ]
    },
    {
      "id": "56f290e1-9e12-40f6-8883-93ff25e9227d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -320
      ],
      "parameters": {
        "width": 840,
        "height": 640,
        "content": "## GoCardless - Fetch transactions\nFirst we fetch transactions from GoCardless for all bank accounts that we have connected. Change the <account_id> to your own id."
      }
    },
    {
      "id": "cebfa4eb-2e0b-42ea-b637-c285e822e7ac",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -320
      ],
      "parameters": {
        "width": 1440,
        "height": 640,
        "content": "## Maybe Finance - Create transactions\nCombine transactions in one object, call the API recursively for each of the transaction to create them to Maybe Finance. Change account id in the json to your o"
      }
    },
    {
      "id": "afdeeee2-8f96-436b-8011-a3a507c341f0",
      "name": "Merge all transactions in one array",
      "type": "n8n-nodes-base.merge",
      "position": [
        580,
        -80
      ]
    },
    {
      "id": "07bd503d-d842-459e-8e07-f240f08fc039",
      "name": "Resend",
      "type": "n8n-nodes-resend.resend",
      "position": [
        1060,
        -80
      ]
    },
    {
      "id": "7ed11872-a6e8-4c36-a137-dcb527a8394d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -680
      ],
      "parameters": {
        "width": 540,
        "height": 340,
        "content": "## Get Maybe Finance accounts\nAfter creating the respective accounts in Maybe Finance, run a GET request to fetch all account ids to insert them to the \"Set\" nodes later."
      }
    },
    {
      "id": "061da286-bf40-41b3-9bd6-52c579067451",
      "name": "Extract booked - Revolut Personal",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        40,
        60
      ]
    },
    {
      "id": "eb8d3441-4d25-4ee7-a94e-4073294914b9",
      "name": "Extract booked - Revolut Pro",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        40,
        -180
      ]
    },
    {
      "id": "305021b2-cf36-4d29-9ddd-fd31eca8902d",
      "name": "Set transactions for Revolut Pro",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        -180
      ]
    },
    {
      "id": "6205fdc5-b59c-41b9-9c00-c3a6a9d67a72",
      "name": "Set transactions for Revolut Personal",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        60
      ]
    },
    {
      "id": "2b010267-68da-4c25-81e1-547ea4795c45",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1220,
        -80
      ]
    },
    {
      "id": "f22aa661-1a95-4dbe-b37a-4322bfb7251c",
      "name": "Step 4 - Building link with Revolut",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        840,
        -540
      ]
    },
    {
      "id": "496d6d35-6844-4b72-90ff-4daa2d8ae9fa",
      "name": "Step 3a - User agreement with first Revolut Account",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        280,
        -540
      ]
    },
    {
      "id": "1d76a8c1-10fd-4252-80a7-cece9a0e8e6e",
      "name": "Step 3a - User agreement with second Revolut Account",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        560,
        -540
      ]
    }
  ],
  "connections": {
    "Get access token": {
      "main": [
        [
          {
            "node": "Get Revolut Personal transactions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Revolut Pro transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get access token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get accounts id from Maybe": {
      "main": [
        []
      ]
    },
    "Create transactions to Maybe": {
      "main": [
        [
          {
            "node": "Resend",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract booked - Revolut Pro": {
      "main": [
        [
          {
            "node": "Set transactions for Revolut Pro",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Revolut Pro transactions": {
      "main": [
        [
          {
            "node": "Extract booked - Revolut Pro",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set transactions for Revolut Pro": {
      "main": [
        [
          {
            "node": "Merge all transactions in one array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract booked - Revolut Personal": {
      "main": [
        [
          {
            "node": "Set transactions for Revolut Personal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Revolut Personal transactions": {
      "main": [
        [
          {
            "node": "Extract booked - Revolut Personal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge all transactions in one array": {
      "main": [
        [
          {
            "node": "Create transactions to Maybe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set transactions for Revolut Personal": {
      "main": [
        [
          {
            "node": "Merge all transactions in one array",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Step 3a - User agreement with second Revolut Account": {
      "main": [
        []
      ]
    }
  }
}