Introducing AutoKitten, an alternative to AutoCat

AutoCat is great, however there were a few things I had difficulty with:

  • Rules are not flexible enough - I needed some complex logic and to change descriptions or adjust amounts;
  • Adding rules is very slow;
  • Editing rules is an absolute pain - the format of AutoCat rules is very sparse and unpleasant to work with;
  • Execution is slow when there are many rules (I have about 400), and I can’t see progress during execution.

So I figured I’d roll my own solution called AutoKitten. Here’s a summary of its features:

  • Rules are powerful, including if/else chains, arithmetic comparisons, case-sensitive/insensitive comparisons, the option to continue applying rules after one is triggered.
  • Yet rules are simple, easy to read and understand, and easy to modify.
  • Actions include setting fields, prepending/appending to fields, multiplication by a constant (e.g. -1 changes the sign), and setting the color
  • Action is incremental - you can see the changes being made and if any interruption occurs progress will have been saved.

To run, go to the “Action” menu then select “AutoKitten”. There’s also a function to import rules from AutoCat into AutoKitten.

Feel free to take a look at this example (backup your data first!):

To copy, make sure you copy the AutoKitten sheet and the Apps Script code.

NOTE per @m00 ‘s post below: there are subtle differences between regular expressions as used in AutoCat (Google Sheets’ engine RE2) and those used in AutoKitten (Javascript). Make sure you back up and test rules appropriately.

4 Likes

this is very interesting!
But, I changed the first transaction in transactions to “Watcher Joint International” and changed the action value in the first rule in “Autokitten” to “clothing”. I ran the script, and it didn’t change it? I guess I don’t know how to work this! Any chance for some documentation on how to run it?

1 Like

The script works only on empty categories. To test things, you may want to delete the existing category first.

Interesting, seems like this should be moved to the Show-and-Tell forum category :thinking:

2 Likes

Thanks, I posted there - pending for approval.

That’s what I thought. I’ll look at it further.
Thanks for the clarification

1 Like

Man I can’t wait to try this. Good job

1 Like

It’s working now if category is empty in Transactions. But nothing if I try this:
Category equals Mortgage set Description New DESCRIPTION and next
The category in Transactions is “Mortgage” and the description is blank.

Am I doing it wrong?

1 Like

t’s working now if category is empty in Transactions. But nothing if I try this:
Category equals Mortgage set Description New DESCRIPTION and next
The category in Transactions is “Mortgage” and the description is blank.

Thanks for giving it a try! The script examines only rows in which the “Category” column is empty. Technically it is easy to have it iterate all rows, but it’s very impractical. The iteration speed is limited by the (slow) Google Sheets API (we’re talking like one row per second) and most “Transactions” sheets have many rows, which means the script would run for a very long time.

If there’s interest in going over all rows I’d be glad to provide that as an option, with the proviso that it will be as slow as pushing molasses uphill on a cold day.

1 Like

And Apps Script runtime is limited to 6 min/execution.
Quotas for Google Services

1 Like

Tested and working quite wonderfully! Thanks for creating this. However, an option to set up a “contains (ignore case)” condition seems to be missing. Transactions don’t always come in consistent descriptions so this option would be valuable. How would I go about doing that?

1 Like

@lamjenn thanks for taking a look. I’ve added the “contains (ignore case)” feature to the template linked above. Just in case you want to play with it further, to effect the changes I edited two places:

  1. In the script, after the lines:
    case "contains":
      return value.includes(conditionValue);

I added the lines:

    case "contains (ignore case)":
      return value.toLowerCase().includes(conditionValue.toLowerCase());
  1. In the AutoKitten sheet, I selected from the menu “Data”/“Data Validation” and for column C2:C I added the item contains (ignore case).

Wow. Thanks for the speedy response and making the tweaks. Tested and it works! Much appreciated.

1 Like

Hi,

This looks very useful, but I am struggling to get it working. I opened the template, copied the AutoKitten sheet to my TillerFoundation workbook, but I’m not sure how to copy the Apps Script Code.

Can someone please refer me to instructions for installing this? Seems that it is not available under Community Solutions.

Thanks in advance
Reinier

1 Like

@reinier.mostert The simplest way is to open the AutoKitten sheed shared above while being logged in your Google account, then from menu “File” select “Make a copy”.

Once you have your own copy, it’s easy!

  1. On the AutoKitten sheet tab, right next to the “AutoKitten” text, there’s a small arrow. Click on that and you’ll see a context menu. From the menu choose “Copy to” and then “Existing Spreadsheet” and select your Tiller spreadsheet.

  2. To copy the script part, click “Extensions” → “Apps Script” in both your copy of AutoKitten and your Tiller spreadsheet. Then you can use classic text copy/paste to move code around.

Once you did the above, refresh your Tiller page and you’ll see a new menu entry at the top called “Actions”.

Don’t forget to back things up etc. Good luck!

1 Like

Thanks!

I got this far, and have the Actions menu showing up in my sheet. However, I get the error:
Script function not found: convertAutoCatToAutoKitten
when I click to “Import Autocat Rules…”.

This function is not in the page of code that I copied (starting with “function onOpen()”), and I can’t find any other places where it can be. I see only 4 functions:
onOpen
autoKitten
checkCondition
performAction

Thanks for your help!
Reinier

1 Like

@reinier.mostert that’s on me, sorry. Forgot to copy the conversion function. I’ve now updated the template, please proceed once more. Hope it’s worth all the aggravation.

1 Like

Hey @andrei! Sorry to be late to the party in seeing this.

It’s super cool and well implemented. I definitely appreciate the power and graphic nature of the rules— it’s like a very simple programming language.

  • I like how can execute multiple operations after a single query match.
  • I was able to create a rule with multiple match criteria— that was intuitive.
  • You did a nice job setting up a sample spreadsheet with rules and transactions to demonstrate the functionality.
    -I also hadn’t appreciated the power of emoji prefixes in a Transactions sheet until I saw your rules and the powerful prepend command.

Thanks for sharing and helping out all the interested community members!
Randy

P.S. Sorry about the mixup with the “pending approval” flag. That was my bad. I lost track of the review notification. I’m moving this to Show & Tell and deleting the duplicate, unapproved post (since all of the community discussion is in this version).

1 Like

Fantastic, thanks very much @randy for your review and kind words!

1 Like

Consider doing a rule that sets the description based on whatever you decide should be categorized as Mortgage, and THEN make a rule to set category to Mortgage.