Autorun AI Docs
Process DesignerBusiness FunctionBusiness Functions Reference

15. Banking


getBankStatements([from], [to])

async · returns List<BankStatementDto>

Retrieves bank statements from the connected banking integration (Enable Banking). Both parameters are optional — omitting them returns all available statements.

Prop

Type

const now = new Date();
const thirtyDaysAgo = new Date(now.setDate(now.getDate() - 30));

const statements = await context.functions.getBankStatements(thirtyDaysAgo, new Date());
log("Received " + statements.length + " bank statements");

Returned value — a list of BankStatementDto objects:

[
  {
    "Id": "txn_001",
    "AccountId": "acc_hr_main",
    "Amount": -450.00,
    "Currency": "EUR",
    "Description": "Office supplies - Staples",
    "TransactionDate": "2026-03-10T00:00:00Z",
    "ValueDate": "2026-03-10T00:00:00Z",
    "BalanceAfter": 12340.50,
    "Type": "debit"
  },
  {
    "Id": "txn_002",
    "AccountId": "acc_hr_main",
    "Amount": 5000.00,
    "Currency": "EUR",
    "Description": "Client payment - Invoice #84",
    "TransactionDate": "2026-03-11T00:00:00Z",
    "ValueDate": "2026-03-11T00:00:00Z",
    "BalanceAfter": 17340.50,
    "Type": "credit"
  }
]

Banking integration objects do not carry the standard entity system fields. They use their own Id, AccountId, TransactionDate, and related fields.