Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Import transactions from mint export #1873

Closed
1 of 2 tasks
twk3 opened this issue Nov 7, 2023 · 13 comments
Closed
1 of 2 tasks

[Feature] Import transactions from mint export #1873

twk3 opened this issue Nov 7, 2023 · 13 comments
Labels
wontfix This will not be worked on

Comments

@twk3
Copy link
Contributor

twk3 commented Nov 7, 2023

Verified feature request does not already exist?

  • I have searched and found no existing issue

💻

  • Would you like to implement this feature?

Pitch: what problem are you trying to solve?

Allow importing of mint transaction exports into actual.

Mint's export feature works on the current filtered view of transactions. The export is in csv with the following format:

Date Description Original Description Amount Transaction Type Category Account Name Labels Notes
7/15/2023 Debit sample debit transaction Debit sample debit transaction 200 debit Financial Free Chequing Free Debit XXXX
7/14/2023 Purchase sample purchase transaction Purchase sample purchase transaction 27 debit Gas & Fuel Free Chequing Free Debit XXXX
7/12/2023 Direct deposit sample transaction direct deposit sample transaction 12290.02 credit Paycheck Free Chequing Free Debit XXXX
7/01/2023 Interest Paid Interest Paid 1.69 credit Interest Income Sample Savings XXXX

Mint allows an export of up to 10 000 transactions a time.

Sanitised export file:
mint-2account-6month-300transactions.csv

The biggest issue that prevents users from importing any of these transactions today without editing the csv is the fact that the transaction type is a separate field.

Additionally the category information is all lost.

Describe your ideal solution to this problem

A mint importer to go alongside the ynab importers.

  • Create the accounts from the account name information.
  • Create categories for each the the category names found in the csv
  • [consider] Auto setting budget to monthly actuals for categories?

What we don't have is the budgets. Or the category groups.

Teaching and learning

Users should be advised (in the docs) to limit their imports to months that they won't be later importing account transaction file imports for. As duplicate matching won't work well, especially for split transactions.

@twk3 twk3 added the feature This issue is a feature request label Nov 7, 2023
@github-actions github-actions bot added the needs votes Please upvote this feature request if you would like to see it implemented! label Nov 7, 2023
Copy link
Contributor

github-actions bot commented Nov 7, 2023

✨ Thanks for sharing your idea! ✨

This repository uses lodash style issue management for enhancements. That means enhancement issues are automatically closed. This doesn’t mean we don’t accept feature requests, though! We will consider implementing ones that receive many upvotes, and we welcome contributions for any feature requests marked as needing votes (just post a comment first so we can help you make a successful contribution).

The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment with 👍!

@github-actions github-actions bot closed this as completed Nov 7, 2023
@youngcw
Copy link
Member

youngcw commented Nov 8, 2023

We can start with that file description, but if you have a real file export that would be best. Its ok if its a reduced size and sanitized, its just needs to be representative of a full file.

@twk3
Copy link
Contributor Author

twk3 commented Nov 8, 2023

@youngcw I've updated the description with a sanitised file.

I called the file 2account, but it looks like it actually has three. A chequing, a savings, and a cash (cash is a bad name, but just another account).

Mint has a split transaction features, but the transactions in the export are all post-split. So users will have to be wary of duplicates when they start importing their new transactions.

Split transactions share the same original description, and date. So maybe there is something that can be done there.

@twk3
Copy link
Contributor Author

twk3 commented Nov 8, 2023

Based on the likely number of edge cases, and the fact that this will be short lived. (mint ending support in January). I wonder if it's better to just get an easy transaction converter up in gh-pages for folks like https://github.com/aniav/ynab-csv rather than change anything in acutal.

@youngcw
Copy link
Member

youngcw commented Nov 8, 2023

I don't think there is likely to be a full importer because of that. I like the idea of a csv cleaner to make the import easier.

To be honest my recommendation would be to start fresh in Actual and then either use a separate budget file, or some other storage like excel, for the old stuff. Since Mint doesn't export any budget data (and its a different budget style iirc), any data import from Mint will result in a borked budget that will be non-trivial to fix.

@youngcw
Copy link
Member

youngcw commented Nov 13, 2023

Here is a quick and dirty importer to try https://github.com/youngcw/actual_mint_importer

@youngcw
Copy link
Member

youngcw commented Nov 13, 2023

Ive tested that larger file and things look to have worked. Some notes are that the upload failed, probably because of the size. There are some environment variables that should help with that. But if not, I had success by running the script again and ending early so the end sync didn't happen again and cause duplication.

@twk3
Copy link
Contributor Author

twk3 commented Nov 14, 2023

@youngcw thanks for getting that quick import up! I myself don't use mint anymore for several years, but a few of my family members do, so having the historic data in actual would be good.

Supporting larger import sizes, and figuring out a way to specify which categories are for income. (It doesn't look like we can easily move categories to the income group after the fact?). Other than that the import looked good.

I agree with the idea that you put in the readme this should be held in a different budget file just for reporting and whatnot. And that you are better off starting fresh for your continued months.

@twk3
Copy link
Contributor Author

twk3 commented Nov 16, 2023

Just to followup https://github.com/youngcw/actual_mint_importer seems to work well enough. I've used it on some other family members mint exports and it's seems to be working pretty good considering it doesn't have any of the budget data.

For most users, a fresh start is going to be a nicer experience. But being that mint is shutting down. It's nice to have your categorised transactions from mint still available if wanted in actualbudget.

@psybers
Copy link
Contributor

psybers commented Jan 27, 2024

Is this request still relevant? It looks like if I try to directly import a mint-exported CSV file, I can set an option to pick the 'credit/debit' column and it will properly mark the amount as an inflow/outflow as appropriate. You have to tell it to use the string 'debit' as the outflow. See this example:

image

The only thing I can see that is a sticking point is the fact there are multiple accounts in a single CSV. The importer itself does not seem to handle that so you have to split them into separate files. That can be done with a simple script:

#!/usr/bin/env bash

awk -F'"' -v OFS='\t' '{print $14, NR, $0}' "${@:--}" |
sort -k1,1n -k2,2n |
cut -f3- |
awk -F'"' '
    { curr = $14 }
    curr != prev {
        close(out)
        out = "file_" (++cnt) ".csv"
        prev = curr
    }
    { print > out }
'

This would generate a single file_#.csv for each account. Then you can import them one by one into the proper Actual account.

I played a bit with youngcw's importer. It works but doesn't quite do what I had hoped. This approach of splitting the files and then importing them actually seems to work quite well for me.

@youngcw
Copy link
Member

youngcw commented Jan 27, 2024

@psybers I think the only thing missing form the internal csv importer is that it doesn't create categories, where the api importer does

@youngcw
Copy link
Member

youngcw commented Oct 18, 2024

Since Mint is long dead now do we still need this request open?

@twk3
Copy link
Contributor Author

twk3 commented Oct 24, 2024

Nope. Not needed anymore at this point.

@twk3 twk3 added wontfix This will not be worked on and removed feature This issue is a feature request needs votes Please upvote this feature request if you would like to see it implemented! labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants