Giter Site home page Giter Site logo

ynab-amazon-importer's Introduction

Synopsis

This project should allow a user to export orders successfully from Amazon, and into the new YNAB (https://app.youneedabudget.com). It does it by downloading a couple of order exports from amazon, parsing the data, and spitting out a CSV which can be dragged into the you need a budget interface.

Code Example

Output a file to STDOUT:

./bin/ynab_transactions amazon_orders_and_shipments.csv amazon_items.csv

Output a file to a csv file

./bin/ynab_transactions amazon_orders_and_shipments.csv amazon_items.csv > amazon_transactions.csv

Motivation

I spend a lot of money on Amazon. I spend even more time importing my transactions into YNAB.

Manually going through my order history, clicking on each individual invoice (to determine which transactions map to a specific shipment), and THEN categorizing is expensive.

Hopefully this project eventually makes most of the busy work go away.

Installation

git clone https://github.com/hjhart/ynab-amazon-importer.git
cd ynab-amazon-importer
bundle install

How to use

Go here: https://www.amazon.com/gp/b2b/reports

Export two different CSVs, with Report Type set to 'Items' and one for 'Orders and shipments'.

"Order Report Histroy Screenshot"

Once they fully export (takes a while) you'll use both of these as inputs for the ruby script.

./bin/ynab_transactions amazon_orders_and_shipments.csv amazon_items.csv > amazon_transactions.csv

Now, drag navigate to the new YNAB, click on the credit card account that you use on amazon, and the amazon_orders.csv file anywhere in the browser. It should then show an import message with all of your transactions.

Assumptions:

You use one credit card for Amazon. We want to generate one CSV from all your amazon orders from one credit card right now. If an item doesn't have a shipment date, do not import the transaction. If an item doesn't have a tracking number, do not import the transaction.

Todo:

• Sometimes the date charged on amazon is not the day that the CC company charges it. • When there are multiple items in a fulfillment, divvy up the tax and shipping costs amongst it proportionately. • Support split transactions when a single shipment has multiple items. • If "release date" in the items CSV is in the future, schedule a transaction. • Support multiple credit cards. • Very complicated case: This order: 107-1647786-1817828 Paired with spec/fixtures/amazon_items_do_not_add_up_to_fulfillment_total.csv and spec/fixtures/amazon_orders_and_shipments_do_not_add_up.csv • Sometimes multiple fulfillments are only one charge. See: order: 106-4656789-9498659

Helpful URLS: https://www.amazon.com/gp/your-account/order-details/ref=oh_aui_or_o08_?ie=UTF8&orderID=#{your_order_id_here} https://www.amazon.com/gp/css/summary/print.html/ref=oh_aui_pi_o06_?ie=UTF8&orderID=#{your_order_id_here}

Tests

git clone https://github.com/hjhart/ynab-amazon-importer.git
cd ynab-amazon-importer
bundle install
bundle exec rspec

Contributors

James Hart Your name here!!!

License

MIT

Special Thanks

YNAB CSV generator

Those on /r/ynab who responded to my initial post.

ynab-amazon-importer's People

Contributors

hjhart avatar octosteve avatar

Stargazers

Tomer Shvueli avatar PN avatar Justin Haaheim avatar Tanner Hallman avatar Tim Kersey avatar Evan Weaver avatar agentd00nut avatar  avatar Cameron Spear avatar Andy McPherson avatar Caitlin Quintero Weaver avatar Jeff R avatar Eric Weitz avatar Andrew Burks avatar Jody avatar Theron Boerner avatar 1uca5x avatar  avatar Justin Smestad avatar André Arko avatar Aidan Gibson avatar Joseph Lisee avatar  avatar Scott Weldon avatar JasonSoCal avatar Jonathan Hult avatar Geoff Russell avatar  avatar

Watchers

 avatar James Cloos avatar Eric Weitz avatar  avatar Geoff Russell avatar 1uca5x avatar  avatar

Forkers

octosteve

ynab-amazon-importer's Issues

`memo': undefined method `>'

Hi,

I get the following error when I try to use the program as described in the documentation:

/ynab-amazon-importer/app/models/item.rb:10:in memo': undefined method >' for nil:NilClass (NoMethodError)

Here is the command I ran:
./bin/ynab_transactions ./01-Dec-2017_to_25-Feb-2018_Order.csv ./01-Dec-2017_to_25-Feb-2018_Items.csv

Thank you!

Reports Endpoint is gone

Clicking the link to the b2b report redirects to your order history. As of right now, there's no way to export an itemized report. At least I don't think there is.

where da filez at?

Did you forget to git add your script? All I see in the repo is the license, readme, and an image.

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.