Adding a Manual Transaction using Google Apps Script

I’m trying to automate more things in my Tiller sheet, one of them being adding credit card payments as manual/future transactions, so I can see my account balance projection over time. I’m able to pull my statement data into my spreadsheet using some scripts with my Gmail account, but now I’d like to automate adding those statements as manual transactions for reconciliation.

I found some helpful information in the comments of the “Adding & Reconciling Manual Transactions” page, but at this point I’d like for someone from Tiller to help me understand which path will work better for this.

  1. Manually add a row to my Transactions sheet, adding the JSON object to the Metadata column so it can be reconciled later. (I can do this now, but the transaction is added at the bottom of the sheet. Is there a way to trigger a refresh/force this transaction to remain in the correct date order?)
  2. Trigger the Add Transaction workflow from my own custom script, inserting my statement amount/date/account automatically instead of using the sidebar for data entry.

Any suggestions would be greatly appreciated.

@mttandrsn, I can’t speak to the scripting side of things, but we do already have some manual transaction add and reconciliation features available in the Tiller Money Labs add-on if you’re into using that.

I don’t work for Tiller, but in a spreadsheet I use to manage tasks, I add the new task to the end of the list, and then I do a sort, which corrects the order:

var fullList = sheet.getRange(2,1,getLastRow(),getLastColumn());
fullList.sort([{column: 1, descending: false}, 1]);

In mine, I have different way of entering the last row and column, but I think the functions I show here should work if you define ‘sheet’.

Thanks for the reply! I am currently using the Labs add-on to add these transactions, I was just hoping to be able to further automate that process. I’ll be still doing the reconciliation manually.

I appreciate the tip, I’ll give this a shot. If this solves my sorting issue, maybe I don’t need to use the manual dialog.