The intention of this project is to read emails coming from a bank regarding information of a transaction.
The output right now is an csv file delimited by pipes ("|") but the goal is to return a json with all the information so you can be able to use this on your mobile, desktop or web applications.
Output Example:
date|currency|amount|merchant|status|type|
21/12/19 23:40|RD|91.12|None|Reversada|Compra
21/12/19 23:40|RD|91.12|UBR* PENDING.UBER.COM|Aprobada|Compra
21/12/19 20:32|RD|125.53|UBR* PENDING.UBER.COM|Aprobada|Compra
🚧 Work in progress
✅ When task is done
⏰ Pending
- Banco BHD León (Dominican Republic) ✅
- Banco Vimenca (Dominican Republic) 🚧
- When running the main file, one parameter should be the user email to determine which mail service to use
- Right now it's only expecting multipart emails (threads) not single messages
- How to handle email credentials?
- How to handle email authentication token?
- Add Outlook Email service
- Add a new Email Service
- Currently only Gmail is supported. Stay tunned for instructions on how to add a new service.
- Gmail: Using the Google api with readonly permission
-
Python versions that I can assure this work with:
3.6.9
-
You, as a developer, need a
credential.json
file provided by Gmail with thereadonly gmail api
activated. The file should be placed along side themain.py
file. You can find instructions on how to get it from this Quickstart Guide. It looks something like this:
{
"installed": {
"client_id": "the_cliente_id",
"project_id": "the_project_id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "the_client_secret",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
]
}
}
- Install requirements:
python -m pip install -r requirements.txt
- After having that, all you need is run:
python main.py bhdleon example@gmail.com