Simulates bulk manual transaction adds to mint.com. Mint manual transactions are submitted as "cash transactions" which will mean it shows in your cash / all accounts transaction list. You cannot submit manual transactions against credit cards or other integrated bank accounts (even in Mint's UI this is not possible and ends up as cash transaction).
Simulating manual transactions from UI is based on Nate H's proof of concept from https://www.youtube.com/watch?v=8AJ3g5JGmdU
Credit to https://github.com/ukjimbow for his work on Mint imports for UK users in https://github.com/ukjimbow/mint-transactions
Run the code by typing the following from the directory the code is located in
./import.py
- csv
- json
- datetime
- os
- random
- requests
- time
- urllib.parse
- Make sure you have venv on your system, using the following command based on your python version
pip3 install virtualenv
- Make sure you are in repo root
- (where import.py and requirements.txt are)
- Create a virtual environment
virtualenv venv
- Turn on the virtual environment (these should work on both but depends on your version you may need to explicitly run the sh or bat file)
- Mac / Linux in terminal or bash: venv/Scripts/activate
- Windows in powershell: venv\Scripts\activate
- Install Requirements
pip3 install -r requirements.txt
if you do not want to use venv you can manually install any dependencies with the following:
pip3 install $name
Example: pip3 install csv
- Import CSV
- Process date for correct format and HTTP encode result
- Process merchant for HTTP encode
- Process categories change your banks category name into a mint category ID (limited in scope based on the categories I needed when I wrote this)
- Process amount for positive or negative value indicating income or expense
- Send POST Request to mint as new transaction.
- Force Randomized Wait Time before starting next request
Support is limited to the categories I needed at the time, if you need to map more you can. To get category ids:
- Go to mint
- Add a transactions
- Right click "inspect-element" on the category you want
- The ID is in the
- item that encapsulates the a href
- Add mapping here based on string match from your CSV to the catID you got from mint (following existing examples)
- Replace curl command string generation with parameterized curl class constructor
- Add support for the rest of the manual transaction items