Coder Social home page Coder Social logo

actual-simplefin-sync's Introduction

Sync ActualBudget via SimpleFIN

PREREQUISITES

TODO

  • Better security for storage of SimpleFIN AccessKey
  • Allow custom date ranges for sync

USAGE

  • Sync - If the app hasn't been configured yet, you'll be run through the setup steps, otherwise it will sync the current month for all accounts.

    node app.js
    
  • Setup - Change your SimpleFIN token, which budget file to use, and how the accounts are linked.

    node app.js --setup
    
  • Link - Change or add any new linked accounts

    node app.js --link
    

actual-simplefin-sync's People

Contributors

lancepick avatar

Stargazers

Matt avatar  avatar Jason Stelzer avatar  avatar  avatar Marcel Darvas avatar Eric Hamilton avatar  avatar  avatar Randy Meyer avatar  avatar Mark Chaney avatar

Watchers

TJ Finlinson avatar  avatar  avatar

actual-simplefin-sync's Issues

Stopped working with actual-server V24+

The following error is thrown after upgrading to actual server v24.1.0:

Initializing Actual Budget...
Database is out of sync with migrations: {
  appliedIds: [
    1548957970627, 1550601598648,
    1555786194328, 1561751833510,
    1567699552727, 1582384163573,
    1597756566448, 1608652596043,
    1608652596044, 1612625548236,
    1614782639336, 1615745967948,
    1616167010796, 1618975177358,
    1632571489012, 1679728867040,
    1681115033845, 1682974838138,
    1685007876842, 1686139660866,
    1688749527273, 1688841238000,
    1691233396000, 1694438752000,
    1697046240000, 1704572023730,
    1704572023731, 1707267033000
  ],
  available: [
    '1548957970627_remove-db-version.sql',
    '1550601598648_payees.sql',
    '1555786194328_remove_category_group_unique.sql',
    '1561751833510_indexes.sql',
    '1567699552727_budget.sql',
    '1582384163573_cleared.sql',
    '1597756566448_rules.sql',
    '1608652596043_parent_field.sql',
    '1608652596044_trans_views.sql',
    '1612625548236_optimize.sql',
    '1614782639336_trans_views2.sql',
    '1615745967948_meta.sql',
    '1616167010796_accounts_order.sql',
    '1618975177358_schedules.sql',
    '1632571489012_remove_cache.js',
    '1679728867040_rules_conditions.sql',
    '1681115033845_add_schedule_name.sql',
    '1682974838138_remove_payee_rules.sql',
    '1685007876842_add_category_hidden.sql',
    '1686139660866_remove_account_type.sql',
    '1688749527273_transaction_filters.sql',
    '1688841238000_add_account_type.sql',
    '1691233396000_add_schedule_next_date_tombstone.sql',
    '1694438752000_add_goal_targets.sql',
    '1697046240000_add_reconciled.sql'
  ]
}
Error updating Error: out-of-sync-migrations
    at checkDatabaseValidity (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:44308:31)
    at Module.migrate (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:44316:17)
    at async runMigrations (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:48024:17)
    at async updateVersion (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:48043:17)
    at async loadBudget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43914:21)
    at async handlers.load-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43744:27)
    at async handlers.download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43714:17)
    at async handlers.api/download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:34861:34)
TypeError: Cannot read properties of undefined (reading 'timestamp')
    at _fullSync (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:47369:96)
    at /app/node_modules/@actual-app/api/dist/app/bundle.api.js:47281:38
    at onceFn (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:48220:35)
    at initialFullSync (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:47267:36)
    at handlers.sync-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43729:92)
    at handlers.download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43717:55)
    at async handlers.api/download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:34861:34)
[Exception] TypeError: Cannot read properties of undefined (reading 'timestamp')
    at _fullSync (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:47369:96)
    at /app/node_modules/@actual-app/api/dist/app/bundle.api.js:47281:38
    at onceFn (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:48220:35)
    at initialFullSync (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:47267:36)
    at handlers.sync-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43729:92)
    at handlers.download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:43717:55)
    at async handlers.api/download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:34861:34)
Full error details {
  message: "Cannot read properties of undefined (reading 'timestamp')",
  reason: undefined,
  meta: undefined
}
/app/node_modules/@actual-app/api/dist/app/bundle.api.js:34866
                        throw new Error((0, _shared_errors__WEBPACK_IMPORTED_MODULE_2__.getDownloadError)(result.error));
                              ^

Error: Something went wrong trying to download that file, sorry! Visit https://actualbudget.org/contact/ for support. (reason: undefined)
    at handlers.api/download-budget (/app/node_modules/@actual-app/api/dist/app/bundle.api.js:34866:31)

Node.js v21.4.0

I can verify the sync still works on v23.12.1, but unfortunately, I can't roll back my database to older version.

Data not updated in Actual

The connection to SimpleFin Bridge and Actual are good, but no data syncs. The account I created in Actual and linked to is empty.

Budget ID: XXXXXXXXXXXXXXX
Downloading budget
Loading fresh spreadsheet
Syncing since 2024-01-21T18:29:18.905Z-XXXX-XXXXXXXXXXXXXXXX 0 (attempt: 0)
Got messages from server 7
Loaded spreadsheet from cache (712 items)
Budget downloaded
Getting all accounts and transactions from ActualBudget
Getting all transactions from SimpleFIN
2024-01-16 - 2024-02-01
_____________________________________________________
|          Account          |   Added   |  Updated  |
+---------------------------+-----------+-----------+
| XXXXXXX XXXXXX            |         0 |         0 |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Re-downloading budget to force sync.
Loaded spreadsheet from cache (712 items)
Syncing since 2024-01-21T18:34:18.917Z-XXXX-XXXXXXXXXXXXXXXX 0 (attempt: 0)
Got messages from server 0
Syncing since 2024-01-21T18:34:18.917Z-XXXX-XXXXXXXXXXXXXXXX 0 (attempt: 0)
Got messages from server 0
Clearing temporary budget files.

Docker?

Is it possible to run this as a docker container? I run Actual-Server on Unraid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.