Amazon Order History to Markdown table in Day One

Back in the spring I wrote an automator action that incorporated some Python code to take a downloaded Amazon Order History file and massage it into a nice Markdown table and creates a Day One entry.

A few months back though the Day One command line tool stopped working and that broke this action. But surprise!!! The command line tool works again (although not as well as it used to). So I modified the automator action to get it working again. 

So, pop this workflow in your ~/Library/Services folder and you can just right click on the downloaded Amazon order history file to create a Day One entry from the purchases. 

Screen Shot 2020 01 08 at 7 59 24 AM


This is what the Markdown table looks like as a Day One entry (atypically expensive month, FWIW 🙂

Screen Shot 2020 01 08 at 8 02 20 AM


Turn Amazon Order History into a Markdown Table for Day One

The other day I posted about using Keyboard Maestro to automate the process of getting my monthly Amazon Order history into a Day One Journal entry. That was the first step of the automation of this task.

This has been a bit more challenging to automate than I was first thinking. I’m working towards this 3 step process:

  • Step 1: open up Day One and in Safari open up the URL for Amazon Order History report screen. [Done]
  • Step 2: automatically download this month’s Amazon Order History report [Need to figure this out]
  • Step 3: create a journal entry from a downloaded Amazon Order History .csv file [Now Done]

I am still messing around with Keyboard Maestro for step 2 but was able to hack together a pretty handy Automator workflow for step 3. It’s a python + BASH script that

  • takes a .csv file, strips out the unnecessary columns,
  • totals up the amount spent for the month
  • create a Markdown table of the important columns from the .csv
  • creates a Day One Journal entry and tags it “Money”